The Easy Setup for adding sensors is intended to provide you with an intuitive and easy experience that will lead you through the setup steps in adding the sensors.
The Easy Setup contains 3 basic steps. Follow the sections in this article:
- Generate a Sensor Script
- Enable the Sensor Script on the Edge Device
- Assign the Sensor Script to the Edge Device
The generated Sensor Script is a template.
The Sensor Script prints metric values of a sensor in JSON format and each metric is described as a variable that 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.
- Most sensors will be detected automatically when connected to your Edge Device. Other sensors may not be detected automatically; please refer to the Owners Manual of said sensor to get more information on how to connect the sensor to the Edge Device properly.
- You will get an error message if input values are not permissible. You’ll need to adjust them accordingly.
There are thousands of different sensors in the world. Some of them would need special libraries or custom development to get a data from. If you have trouble with the setup of sensors, contact TeamViewer.
What you will need
Make sure that you have prepared the following points:
Generate a Sensor Script
1. To log in to the Embedded Management Console, open https://iot.teamviewer.com/ and use your TeamViewer account credentials.
2. From the left menu select Devices.
3. On the right side from the dropdown menu select Add Sensor.
4. Click Easy Setup.
5. From the dropdown menu select the device with the sensor you would like to add.
6. Type in a unique sensor name.
7. Click (+) to add a metric. To configure the metric, provide a metric name and a unique ID. The fields Value Type and Value Unit are optional. (When a metric becomes superfluous click on the bin icon to remove it.)
8. When all metrics are configured click Download the generated Template.
The downloaded zip file contains template examples for Python and Bash.
9. On your local PC extract the zip file.
10. Pick one of the extracted files as your Sensor Script.
Keep the Management Console open and continue with Enable the Sensor Script on the Edge Device.
Enable the Sensor Ccript on the Edge Device
In this task, you’ll need to transfer the previously downloaded Sensor Script to the Edge Device. Then you’ll give the Sensor Script fitting permissions to be executed.
- Transfer the Sensor Script to your Edge Device by using the Transfer Files feature. Remember the full path (
FULLPATH) of the Sensor Script on the Edge Device.
- Access the edge device remotely (Access the Edge Device via Remote Terminal).
- Give the Sensor Script fitting permissions. In the terminal type in the following command and press return. Replace
FULLPATH with the full path from the previous step.
sudo chmod +x FULLPATH
Assign the Sensor Script to the Edge Device
After you enabled the Sensor Script on the Edge Device you’ll need to continue where you left off from Generate a Sensor Script.
1. Type in the
FULLPATH you remembered from Enable the Sensor Script on the Edge Device.
2. Select the frequency by which the data will be sent to the TeamViewer Embedded Cloud. It can be defined in seconds or minutes.
3. To finish the Easy Setup click Add.