This article applies to TeamViewer IoT users who monitor their IoT networks.

The solution presented in this article requires TeamViewer IoT Agent v 1.1.102 (or higher).  To identify the version of your agent, run: sudo teamviewer-iot-agent info (an error, or no result, indicates an older version of the agent is installed).

Description

This article describes how to use the TeamViewer IoT Edge Device Management Application, which provides Real-Time Visualization on your IoT device, in addition to, a setup Wizard to provision your sensor network.

Note: This article guides the installation of the application to be under the following directory:

/usr/local/teamviewer-iot-agent/monitoring/

If you choose to install the application under a different directory, apply the same change to the paths identified in this article.

Installation

Step 1 - Install dependencies

The application requires the following to be installed on the device:

  • TeamViewer IoT Agent v 1.1.102 or greater
    • For details, reference: https://teamviewer-iot.com/
    • To identify the installed version, run the following command: (an error, or no result, indicates an older version of the agent is installed)
      sudo teamviewer-iot-agent info

Step 2 - Download & Extract the Application

  1. From your device running the TeamViewer IoT Agent, download the application: 
    wget https://download.teamviewer-iot.com/apps/teamviewer-iot-edge-device-management/1.3.0/teamviewer-iot-edge-device-management-1.3.0.tar.gz
  2. Upon download completion, extract the contents of the application:
    sudo mkdir -p /usr/local/teamviewer-iot-agent/monitoring/
    
    sudo tar -xzvf teamviewer-iot-edge-device-management-1.3.0.tar.gz -C /usr/local/teamviewer-iot-agent/monitoring/

Step 3 - Install the Application:

Install the application using the following commands:

cd /usr/local/teamviewer-iot-agent/monitoring/teamviewer-iot-edge-device-management/
sudo npm install

Step 4 - Starting & Stopping the Application:

To start the application on default port 80, use the following command:

sudo bin/start.sh

To stop the application, use the following command:

sudo bin/stop.sh

Step 5 - Configuration and Troubleshooting

If you have issues running the application or if the default TeamViewer IoT Agent settings have been changed, verify and update the application configurations as necessary:

If the configurations differ, update the application configuration parameters to match the TeamViewer IoT agent and restart the application.

  • TeamViewer IoT Web Port
    • Check the web port used by the TeamViewer IoT Agent
      sudo teamviewer-iot-agent configure show | grep WebControlPort
      • Note: an empty response means default port 80 is used
    • To change this port, use the following command, replacing XXXX with the desired port.  Note: Ports 0 to 1023 are reserved for privileged services and designated as well-known ports and should be avoided.
      sudo teamviewer-iot-agent configure set WebControlPort XXXX
      sudo teamviewer-iot-agent restart
  • The application Web Port is specified by the server.port parameter in the application configuration file
    • /usr/local/teamviewer-iot-agent/monitoring/teamviewer-iot-edge-device-management/config/config.js
    • If you make changes to the config file, use the Stop & Start commands identified above to restart the application
    • If you there are still issues running the application, ensure the configured port is not in use by another application

In case you need further troubleshooting, the application persists logs under:

/usr/local/teamviewer-iot-agent/monitoring/teamviewer-iot-edge-device-management/logs

Getting Started

After the installation is complete, you can use TeamViewer Client for Windows to remotely create secure applications, register sensors and metrics, and view real-time streaming data.

Note: Currently, Remote Access to TeamViewer IoT devices is only supported by TeamViewer Client for Windows.

To get started, log into your TeamViewer IoT Cloud Dashboard and Click on the Control button on the Devices page.  This will open the TeamViewer Client and start a secure connection to your IoT device.

Creating Secure Clients, Sensors & Metrics

This application provides a GUI wizard for you to create secure clients and define sensors and metrics, as defined by the TeamViewer IoT MQTT API. You will need to then push your sensor data as specified in the MQTT API Push Metric Values section to visualize it in real-time.

Using the wizard, you can create new Clients or authorize existing ones.

Creating New Clients

You can create new Clients either automatically or by using an existing Certificate Signing Request (CSR).  To create clients using a CSR, you must upload the CSR & the associated private key.

Once a secure Client has been created, you can download its credentials for use on remote devices (to easily integrate sensors on remote devices to your TeamViewer IoT Agent).  Reference Remote Clients for details.

Once a secure Client has been created, you can use the wizard to define the sensors and metrics you want to connect.  The wizard will provide you with the details and a template to use to push the sensors data as described in MQTT API Push Metric Values.

Authorizing Existing Clients

Any existing Client will automatically appear on your Clients lists. However, you must upload its Certificate credentials using the Clients page, to view it in real-time.

Viewing Data in Real-Time

Using the Metrics page, you can view a list of all your sensor metrics and quickly view each in real-time by clicking on the Metric name.

Note:  All Clients/Sensor/Metric metadata shown in the application is the same as displayed in the TeamViewer IoT Cloud Dashboard

Managing Certificates

All Client certificates, created by the application or uploaded by the user, are stored under:

/usr/local/teamviewer-iot-agent/monitoring/teamviewer-iot-edge-device-management/certs

The certificate file names contain the Client Id, as shown in the template below, in case the certificates are needed on remote devices Reference Remote Clients for details.

Public Key: cert-clientId.pem
Private Key: key-clientId.pem
CAUTION: Do not rename, delete, or modify files under the cert/ directory.  Doing so will cause data corruption.

 

Version history
Revision #:
18 of 18
Last update:
a month ago
Updated by:
 
Labels (5)
Contributors