This article applies to all TeamViewer IoT users who monitor their IoT network.
General
The TeamViewer IoT Node.js SDK is a development kit to facilitate the integration of sensors to the IoT Agent MQTT API to allow for secure data registration and transfer to your TeamViewer IoT Cloud.
Download & Installation
Step 1 - Install dependencies
The SDK requires the following to be installed on the device:
- Node.js 6.14.0 (Recommended version 8.3.0) or higher Long Term Support (LTS) version
- For details, reference: https://nodejs.org/en/blog/release/v8.3.0/
- To identify the installed version run the following command:
sudo node -v
Step 2 - Download the SDK
Download the SDK by running the command in the CLI:
wget https://download.teamviewer-iot.com/sdks/nodejs/v1.0.3/teamviewer-iot-sdk-nodejs-v1.0.3.tar.gz
Step 3 - Extract & install the SDK
Upon download completion, extract the contents of the application:
<BR /><BR /><CODE class="bash functions">cd teamviewer-iot-sdk-nodejs sudo npm install<SPAN>sudo tar -zxvf teamviewer-iot-sdk-nodejs-v1.0.3.tar.gz</SPAN>
Step 4 - Run Examples
To run the SDK example, execute the following commands:
sudo node ./examples/create_metric.js