This article explains how to move the Teamviewer Starter Kit from the preassigned account to another Teamviewer account.
Step 1: Find out the IP address of the gateway in the local networkStep 2: Install SSH clientStep 3: Unmanage the gatewayStep 4: Create a new TeamViewer IoT accountStep 5: Provision the gateway to the newly created account.Step 6: Configure the TeamViewer IoT Agent to receive measurements from Bosch XDK sensorsStep 7 - Configure the digital input and output (DIO) pinsStep 8Step 9: Restart the service for the GPIOsStep 10: Check if the DIOs are working
Step 1: Find out the IP address of the gateway in the local network
Option 1: Ask your network administrator to connect the gateway to the network and provide you with IP address
Option 2: You can remotely access the gateway from TeamViewer desktop client application as it is already assigned to the predefined account.
- Open TeamViewer desktop client application
- Login with the provided account credentials
- From the Contacts and Computers tab connect to your gateway
- Switch to the “Remote Terminal” tab
- In the Remote SSH window type “ifconfig” command and write down the IP address of the eth0 interface
- Close TeamViewer remote connection session
Step 2: Install SSH client
Install SSH client on your desktop computer (e.g Putty).
Open SSH connection to the gateway in the local network using the IP address obtained in Step 1.
Step 3: Unmanage the gateway
Use the bellow Linux command to unmanage the TV Agent from the current account
$ sudo teamviewer-iot-agent unmanage
Step 4: Create a new TeamViewer IoT account
- Open your web browser and navigate to https://teamviewer-iot.com.
- Click “Sign Up” and follow the instructions to create a new TeamViewer IoT account.
- Remember your E-Mail and Password that has been used for the account creation.
Step 5: Provision the gateway to the newly created account.
In your SSH session use the below command to provision the gateway to your new account using the E-Mail and Password obtained in Step 4 and follow the instruction.
$ sudo teamviewer-iot-agent setup
Upon successful provisioning of the gateway, you will have a new device in the TeamViewer desktop client application as well as in your cloud dashboard under the “Devices” tab. Its name will be the hostname of the gateway.
Step 6: Configure the TeamViewer IoT Agent to receive measurements from Bosch XDK sensors
Disable TeamViewer Monitoring Agent
$ sudo teamviewer-iot-agent disable system-health
Restore the configurations for the Monitoring Agent
$ sudo su
$ sudo cat /var/lib/teamviewer-iot-agent/system_monitors_kit.conf > /var/lib/teamviewer-iot-agent/system_monitors.conf
Enable TeamViewer Monitoring Agent
$ sudo teamviewer-iot-agent enable system-health
Step 7 - Configure the digital input and output (DIO) pins
To use the DIOs of the Dell gateway with TV Agent first you need to create corresponding Sensors/Metrics.
Open your web browser and type the IP address obtained in Step 1 to open the Edge Management application.
Navigate to the “API Clients” tab and create a new client.
Enter "Digital Out" as a client name and push the "Create" button then "Manage API Client".
Create "New Sensor" (name "Digital Outputs") with 8 metrics (names "Out 0...7") according to the screenshot below (Value Type: Bool, Display Unit: I/O).
After Pushing the “Create” button you will be provided with the Connector, Sensor and Metric IDs which will be required to edit “teamviewer_gpio.py” file in the next step.
Open the “teamviewer_gpio.py” file
$ sudo nano teamviewer_gpio.py
Replace the “client_id”, “sensor_id” and “Out0_id” to “Out7_id” on the top of the file with corresponding IDs obtained in the previous Step 7.
client_id = "5385da5e6c854abc8d65c0c80b5d79e9"
sensor_id = "e6218136a1144c8e9d117dc55a24297c"
Out0_id = "4ee43a05e70a4a97a20fe13e6baf286e"
Out1_id = "58f38038ea0b48519332a190688a325e"
Out2_id = "cf1aceeb62f3479fb07d81213dd21269"
Out3_id = "05f12c7970704172a374f777bedc83ef"
Out4_id = "d67d349dba2347699096bc0989f638c8"
Out5_id = "8dac154dfeef4d5aa4ec33b39a675ee4"
Out6_id = "cefdd235b1c243a2b6f7d89a6ce639e3"
Out7_id = "50835cca2df34f19bb13b8a5e0873ed2"
Step 9: Restart the service for the GPIOs
$ sudo service teamviewer_gpio restart
Step 10: Check if the DIOs are working
To control the DIOs from the dashboard user needs to pin the "Out 0..7" metric from the "Metrics" tab to the dashboard and configure it as a "Control" with "Toggle-Switch" function. Use "true" and "false" for the control values as presented in the below screenshot.