Сollect environmental data with Tibbo Project System devices, process it with Azure Stream Analytics and visualize using Power BI.
Step 0: Configure and Assemble the TPS
- Open LTPS Web Interface by simply entering its IP address in your browser, select the “Tibbits Layout” tab, and push the “Launch TPS Configurator…” button.
- Setup Tibbits Layout as shown on the screenshot below and click File/Save
Note: TPS needs to be rebooted to take new Tibbits Layout into effect.
- Assemble TPS according to the Tibbits Layout
Attention: it’s strongly recommended to shut down TPS before placing/removing Tibbits.
Step 1: First application
Node.js, Git and Python 2.7 are installed on each LTPS by default, but NPM is not.
- For installing, connect it to your device with SSH and do the following:
/opt/node-apps/ folder is proposed to be used for your Node.JS apps.
- In any IDE or even a text editor create azure-app-0.js file with your application:
Upload it to /environment folder and run:
Step 2: Setting Up Microsoft Azure IoT Hub
Microsoft Azure IoT Hub is a service that allows bi-directional communications between your devices and a solution back end. To complete this part of the tutorial you’ll need:
- TPS device(s) prepared as shown on the Step 0
- An active Azure account
- A PC with installed Node.js
Create an IoT Hub
- Sign in to the Azure Portal
- Choose New > Internet of Things > Azure IoT Hub
- Configure your IoT Hub, then click “Create”
- Wait a few minutes until your IoT Hub has been created then select All Resources > [name of your IoT hub] and click “Keys” icon.
- In the Shared access policies blade select the “iothubowner” item and then copy the value of “Connection string” field.
Step 3: Registering Device Identities
There are three ways to register device identities: with a script using Azure API, with GUI App (for Windows only) and with multiplatform CLI tool. The third way seems to be the most convenient one.
Note: To use iothub-explorer you need Node.js version 4.x or later installed
- On your PC run: