TeamViewer IoT Device SDK for Node.js (JavaScript) - TeamViewer Support
<main>
<article class="userContent">
<p><em>This article applies to all TeamViewer IoT users who monitor their IoT network.</em></p><h2 data-id="general">General</h2><p>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. </p><h2 data-id="download-installation">Download & Installation</h2><h4 data-id="step-1-install-dependencies"><strong>Step 1 - Install dependencies</strong></h4><p>The SDK requires the following to be installed on the device:</p><ul><li>Node.js 6.14.0 (Recommended version 8.3.0) or higher Long Term Support (LTS) version</li><li>For details, reference: <a href="https://nodejs.org/en/blog/release/v8.3.0/" rel="nofollow noreferrer ugc">https://nodejs.org/en/blog/release/v8.3.0/</a></li><li>To identify the installed version run the following command:</li></ul><pre class="code codeBlock" spellcheck="false" tabindex="0">sudo node -v
</pre><h4 data-id="step-2-download-the-sdk"><strong>Step 2 - Download the SDK</strong></h4><p>Download the SDK by running the command in the CLI:</p><pre class="code codeBlock" spellcheck="false" tabindex="0">wget https://download.teamviewer-iot.com/sdks/nodejs/v1.0.3/teamviewer-iot-sdk-nodejs-v1.0.3.tar.gz
</pre><h4 data-id="step-3-extract-install-the-sdk"><strong>Step 3 - Extract & install the SDK</strong></h4><p>Upon download completion, extract the contents of the application:</p><pre class="code codeBlock" spellcheck="false" tabindex="0"><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>
</pre><h4 data-id="step-4-run-examples"><strong>Step 4 - Run Examples</strong></h4><p>To run the SDK example, execute the following commands:</p><pre class="code codeBlock" spellcheck="false" tabindex="0">sudo node ./examples/create_metric.js
</pre>
</article>
</main>