Skip to main content

Steps to work with CSID

Step1, Apply for a CSID

Contact us to apply for a CSID

1.1 Call Manage.addYoLinkDevice with device SN Code ( The QR-Code ) on device label.

Demo Data

Request: JSON of BDDP

{
"method":"Manage.addYoLinkDevice",
"time":${timestamp},
"params":{
"sn":"****060212B6481EBD4EC7696728****"
}
}

Response: JSON of BUDP

{
"code": "000000",
"time": 1572322745846,
"msgid": 1572322745,
"method": "Manage.addYoLinkDevice",
"data": {
"deviceId": "****4c160300****",
"deviceUDID": "****ae3685504566af434e0f093c****",
"name": "YoLink Hub",
"token": "****b642-781e-450f-ba86-df28bdea****",
"type": "Hub"
}
}

Step3, Control devices with device token

2.1 Call ${DeviceType}.* with Device Net Info(DeviceId & Net Token) obtained in Step 1.

Demo Data

Request: JSON of BDDP

{
"method":"Hub.getState",
"time":${timestamp},
"targetDevice":"****4c160300****",
"token":"****b642-781e-450f-ba86-df28bdea****",
"params":{
}
}

Response: JSON of BUDP

{
"code": "000000",
"time": 1572354630744,
"msgid": 1572354631,
"method": "Hub.getState",
"data": {
"version": "0316",
"wifi": {
"ssid": "YoSmart",
"enable": true,
"ip": "192.168.1.164",
"gateway": "192.168.1.1",
"mask": "255.255.255.0"
},
"eth": {
"enable": false
}
}
}

You can also call Manage.syncAccountDevice to get YoSmart account's devices.

You can receive msg reported by the device with Http Callback API or MQTT report topic

Here is A Simple YoSmart Client Demo for NodeJS.

Here is A Postman Test Collection and Postman ENV for Quick Start, You should Set Your ENVs at first.