Posted by

Create Widget Info in Dashboard - IoT Cloud API

We're developing an application using the IoT Cloud API. 
We want to add to our dashboard a widget, where one can read sensor information. For example, something like this
|  Sensor Info:                                 |
|             Name:  Temperature       |
|             S/N:  1564897                  |
|             Vendor:  My Company     |
I tried with Text type. This is my json structure in python
headers = {'Content-type': 'application/json'}
        payload = {
            "action": "create",
            "payload": {
                "dashboardId": dashboard_id,
                "name": "IO-Link-System Info",
                "type": 10,
                "metrics": [
                                    "Name":  "Temperature",
                                    "SerialNumber":  **Please do not post TeamViewer IDs**,
                                    "Company":     "my company"
                "layout": layout_position
but I got an error response from the API.
I could create Chart widget, with no problem.
Could you give me some hints about how I create this type of widget with your API?
1 Reply
1 Reply
Posted by TeamViewer Staff
TeamViewer Staff

Re: Create Widget Info in Dashboard - IoT Cloud API

Hi @daleonpz

It seems that the layout is not correct. Should be something like:

"layout": {
"width": 2,
"height": 6

Also, can you share the error message?



Tech Support IoT

Did my reply answer your question? Accept it as a solution to help others.
Find this helpful? Say thanks by clicking on the Thumbs Up button.