TeamViewer IoT Agent
The TeamViewer IoT Agent is a software which provides remote access to a connected
device and offers an external CMI (=Control and Monitoring Interface) that can be
used to push sensor data to the TeamViewer IoT Cloud.
Getting Started
Downloading
You can download the latest package for the sysWORXX CTR-700 at https://download.teamviewer-iot.com/sysworxx/1.1.1238/armv7/teamviewer-sysworxx_1.1.1238_armhf.deb
Installing
Once you have downloaded the package teamviewer-sysworxx_[...]_armhf.deb from the
TeamViewer IoT Labs page, you can install the agent using
$ dpkg -i teamviewer-sysworxx_[...]_armhf.deb
Provisioning Guide
teamviewer-iot-agent needs to be assigned to your TeamViewer account to make it accessible. If you do not currently have a TeamViewer account, you can create one by navigating to the TeamViewer IoT dashboard https://teamviewer-iot.com/.
Start agent
The agent has a command line user interface; all commands are prefixed with teamviewer-iot-agent.
The agent needs to be manually started, run
$ [sudo] teamviewer-iot-agent start
and follow the instructions on the screen. You will be prompted to enter your TeamViewer account credentials. Upon provisioning completion, the device will be assigned to your account and be added to your TeamViewer Contacts. Your device will be automatically added to the TeamViewer IoT Cloud https://teamviewer-iot.com/
Starting agent on more than one CTR-700
If you like to start the agent on more than one CTR-700 you can follow the steps mentioned below. Please make sure that the avahi-daemon is running on the device and following package are installed:
"libavahi-client3, libavahi-common3, libavahi-common-data"
The CTR-700 devices have to be in the same LAN as your TeamViewer Desktop Client:
1. Run the command:
$ ssh [user@]hostname '[sudo] teamviewer-iot-agent start -y -nw'
Note: The "-y" means you directly accept the TeamViewer IoT EULA
2. In the Computers & Contacts list of the TeamViewer Desktop Client, click the Add item icon.
3. Select Nearby contacts and devices. A list of all devices in the LAN with TeamViewer installed will appear.
4. Locate the device host name in the list.
5. Double-click on the device hostname and the device will be assigned to your
account.
6. Double-click on the entry in our Computers & Contacts list to establish a
connection
Information
You can get some information about the current state of the agent when you call
$ [sudo] teamviewer-iot-agent info
The output looks similar to this:
/*******************************************/
Package version: 1.1.8
TeamViewer Id:
Device is assigned to:
Status: Online
SystemHealthMonitoring: Active
/*******************************************/
Remote AppControl
Note: Currently it is only possible to use a recent Windows TeamViewer Desktop Client https://www.teamviewer.com/en/download/windows/ to open a remote AppControl session.
After the agent is started and the assignment of the device is done, you can establish a connection by double-clicking on the device entry in our Computers & Contacts list of the TeamViewer Desktop Client.
By default the agent connects to the web server via port 1880 (NodeRed Editor), when the Server is running. If you like to change that you can use the following command:
$ teamviewer-iot-agent configure set WebControlPort <PORT_NUMBER>
$ teamviewer-iot-agent restart
There is also a navigation panel available in the AppControl window which you can activate or deactivate with the following command (0 means deactivate and 1 means activate):
$ teamviewer-iot-agent configure set WebControlNavigationPanel [0|1]
$ teamviewer-iot-agent restart
Remote Terminal
The teamviewer-iot-agent also provides Remote Terminal access to your device. It is deactivated by default. You can activate or deactivate the function via the following commands
Activate:
$ teamviewer-iot-agent configure set EnableRemoteShell 1
$ teamviewer-iot-agent restart
Deactivate:
$ teamviewer-iot-agent configure set EnableRemoteShell 0
$ teamviewer-iot-agent restart
Monitoring
The teamviewer-iot-agent comes with an external CMI (Control and Monitoring Interface) that can be used to push sensor data to the TeamViewer IoT Cloud.
Cloud Connection
Reporting data to the TeamViewer IoT Cloud is enabled by default. You can disable the connection by running the following command
$ teamviewer-iot-agent disable monitoring
To enable reporting into the Cloud call
$ teamviewer-iot-agent enable monitoring -i
Note: This command does not disable the API as it may be used for other purposes, it only prevents sensor data to be transmitted into the TeamViewer IoT Cloud.
System health monitoring
The teamviewer-iot-agent comes with a pre-configured monitor for monitoring the system health of the IoT device.
To activate this monitor, you will need to run the following command:
$ teamviewer-iot-agent start systemhealth
After the start, the agent needs some time (up to 5 minutes) to send the data to the dashboard.
To stop this monitor, call the following command:
$ teamviewer-iot-agent stop systemhealth
To deactivate this monitor, you will need to run the following command:
$ teamviewer-iot-agent disable monitoring -s
Remote Client
By default, TeamViewer IoT Agent only allows localhost connections; to enable remote connection:
1. Enable remote connections to allow non-localhost devices to create Clients.
$ teamviewer-iot-agent enable remoteClientProvision
2. From your remote device, create a Client by generating a trusted certificate
Reference: https://download.teamviewer-iot.com/docs/agentapi/index.html
Note: Replace localhost with the hostname of the device running the TeamViewer IoT Agent in the publish/subscribe examples
3. Once your Client(s) has been created, disable the remote Client provisioning access to prevent unauthorized access from other hosts on the network. Disabling remote Client provisioning only allows certificate based secure access from remote hosts.
$ teamviewer-iot-agent disable remoteClientProvision
4. Enable remote data for Clients to securely connect to the TeamViewer IoT Agent to send data
$ teamviewer-iot-agent enable remoteData
5. From your remote device, securely register metrics and push data to the TeamViewer IoT Agent
Reference: https://download.teamviewer-iot.com/docs/agentapi/index.html
Note: Replace localhost with the hostname of the device running the TeamViewer IoT Agent in the publish/subscribe examples
6. To provision additional remote clients enable the remote Client provisioning
$ teamviewer-iot-agent enable remoteClientProvision
Note: For security purposes, disable the remote Client provisioning when no longer needed
7. For security purposes, when remote connections are no longer needed for Clients to send data, disable remote data
$ teamviewer-iot-agent disable remoteData
8. For security purposes, when remote connections are no longer needed for client provisioning or sending data, disable ALL remote connections
$ teamviewer-iot-agent disable remoteClients
Update
Just use your preferred package manager (apt-get or aptitude or ...) and update the package. After the update you have to check if the agent is running
$ [sudo] teamviewer-iot-agent info
if not call
$ [sudo] teamviewer-iot-agent start
Help
For more information about the IoT Agent and what you can do with it, call
$ man teamviewer-iot-agent
ERRORS
### After starting the system health monitor no sensors or metrics are shown in the dashboard.
After the first start, it takes a while until the data arrive the dashboard. So please wait at least five minutes and then reload the dashboard. If there is still no information about the sensors or metrics then you can call
$ teamviewer-iot-agent reset systemhealth
This command sets the system health monitor configuration back to factory setting and triggers the sensor provisioning.
Authors
TeamViewer GmbH
https://www.teamviewer.com/en/support/contact
License
If you want to use this software, you have to agree to the terms stated in TeamViewer IoT End-User License Agreement