This article applies to all TeamViewer IoT users and requires TeamViewer IoT Agent 2.8.14 or higher.
The “Easy Setup“ feature for adding sensors is intended to provide an intuitive and easy user experience which will lead through the setup steps in adding the sensors.
How to setup
Login in TeamViewer IoT Management Console from navigation panel click on Inventory and from the ADD dropdown menu on the right select Add Sensor.
After, click on Easy setup button.
Note: There are thousands of different sensors in the world. Some of them would need special libraries or custom development to get a data from. That’s why we provide a custom solution which will help to setup sensors easily from TeamViewer IoT Management Console
Here, select the Device for which you add a sensor (when you used the Device menu, it will come preselected). Make sure the latest version of Agent installed on the device, otherwise a warning will be displayed, and it will not be possible to continue with the setup.
After selecting the device, you need to provide a unique Sensor name along with Metric name and ID.
Value Type and Value Unit fields are optional.
Sensor name is limited to 50 characters and alphanumeric and special characters can be used.
Metric name has a limitation of 30 characters.
Metric ID is limited to 32 characters and only Latin letters and numbers can be used (no special characters are allowed). You will get an error message if these rules are not followed.
Value Type default selection is “Number”.
Once you are done with configuring one metric, you can add the next one, as well as delete already configured metrics. Up to 10 metrics can be configured per sensor.
Now, when the Sensor and Metrics are configured, click on “download the generated template”. The zip downloaded file contains the template examples in Python and Bash.
Unzip the file and select your preferred template.
The template script prints metric values of a sensor in JSON format and each metric is described as a variable which gets a random value in between 1 and 20.
If you don't have a ready script, you might need to search for tutorials on how to read your sensor data, find a library or script that works with your sensor and make sure that your script's output prints the JSON formatted example as presented in the template.
Then place the ready script on the edge device and provide the full path information into the configuration page.
Note: The script path and name validations are done with predefined standards and the scripts are checked to have python or shell file extensions.
Don't forget to run "sudo chmod +x /<path to script>" on edge device to provide execution permissions to the script. It is advised also to manually execute the script on the device and check if the output matches the required JSON format. This will prevent further confusions.
Next, select the frequency by which the data will be sent to the TeamViewer IoT Cloud. It can be defined in seconds or minutes.
Press ADD button to send the configuration to the Agent, and once the Agent receives the configuration it will process with the data collection.