In this section, we will describe how to build a Node.js application to simulate reading time series data from sensors connected to an asset (in this case, a Raspberry Pi hub). Furthermore, we will give instructions on how to create an instance of the Time Series service and enable the application to send data to it.
Adding Predix time series data to assets
Building an app to read time series data
To build and deploy a Node.js app that simulates reading time series data from sensors, proceed as follows:
Make sure to specify the correct data source in the asset attributes (in this example, devices: /device/raspberry).
- Create the assets folder:
mkdir assets && cd assets
- Create the package.json file and paste the...