The TeamViewer Embedded Agent acts as a centralized hub bringing the TeamViewer Embedded solution to your IoT network. To securely integrate your IoT devices and sensors, you must create trusted Clients (see TeamViewer Embedded Agent MQTT API) which can communicate with the TeamViewer Embedded Agent.

Remote Clients allows you to extend your clients to trusted remote devices rather than being limited to the localhost (the device hosting the agent). The following procedure will illustrate how to enable Remote Clients and how to use the TeamViewer Embedded Agent MQTT API to remotely create clients and send your sensor data for monitoring and visualization.

⚠Caution: Enabling Remote Clients will allow any device on your local area network to initiate Client certificate generation. It is strongly encouraged to Disable Remote Client Provisioning & Remote Client Data connections when not in use.

What you will need

Make sure that you have prepared the following points:

Setup

1. Access the edge device remotely (Access the Edge Device via Remote Terminal).

2. Enable Remote Connections. In the terminal type in the following command and press return.

teamviewer-iot-agent enable remoteClientProvision

3. From your Edge Device, create a client by generating a trusted certificate.

  • For more information see TeamViewer Embedded Agent MQTT API.
  • Replace localhost with the hostname of the device running the TeamViewer Embedded Agent in the publish/subscribe examples.
  • Copy the Trusted CA Cert TeamViewerAuthority.crt, referenced in the publish/subscribe examples, to the Edge Device.

4. Once your Client 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. In the terminal type in the following command and press return.

teamviewer-iot-agent disable remoteClientProvision

5. Enable remote data for clients to securely connect to the TeamViewer Embedded Agent to send data. In the terminal type in the following command and press return.

teamviewer-iot-agent enable remoteData

6. From your Edge Device, securely register metrics and push data to the TeamViewer Embedded Agent.

  • For more information see TeamViewer Embedded Agent MQTT API.
  • Replace localhost with the hostname of the device running the TeamViewer Embedded Agent in the publish/subscribe examples.

7. To provision additional remote clients enable the Remote Client Provisioning. In the terminal type in the following command and press return.

teamviewer-iot-agent enable remoteClientProvision

Disable remote client provisioning

For security purposes, 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.

  1. Access the edge device remotely (Access the Edge Device via Remote Terminal).
  2. In the terminal type in the following command and press return.
teamviewer-iot-agent disable remoteClientProvision

Disable remote data

For security purposes, when remote connections are no longer needed for Clients to send data, disable Remote Data.

  1. Access the edge device remotely (Access the Edge Device via Remote Terminal).
  2. In the terminal type in the following command and press return.
teamviewer-iot-agent disable remoteData

Disable remote clients

For security purposes, when remote connections are no longer needed for client provisioning or sending data, disable all Remote Connections.

  1. Access the edge device remotely (Access the Edge Device via Remote Terminal).
  2. In the terminal type in the following command and press return.
teamviewer-iot-agent disable remoteClients