Skip to content

Scenes and automations

Run and switch smart scenes.

Every call needs the project’s API key in x-header-apikey. See Authentication. Errors use the codes in Error codes.

GET https://openapi.rogo.com.vn/api/v2.0/iot-core/smart/{userId}
Parameter In Type Required Description
userId path string Yes
Terminal window
curl -X GET "https://openapi.rogo.com.vn/api/v2.0/iot-core/smart/<userId>" \
-H "x-header-apikey: $API_KEY"
Status Meaning
200
Example answer
[
{
"uuid": "string",
"label": "string",
"smid": 0,
"type": 0,
"subType": 0,
"userId": "string",
"locId": "string",
"ownerId": "string",
"fav": true,
"mode": 0
}
]
GET https://openapi.rogo.com.vn/api/v2.0/iot-core/smart/{userId}/{uuid}
Parameter In Type Required Description
userId path string Yes
uuid path string Yes
Terminal window
curl -X GET "https://openapi.rogo.com.vn/api/v2.0/iot-core/smart/<userId>/<uuid>" \
-H "x-header-apikey: $API_KEY"
Status Meaning
200
Example answer
{
"uuid": "string",
"label": "string",
"smid": 0,
"type": 0,
"subType": 0,
"userId": "string",
"locId": "string",
"ownerId": "string",
"fav": true,
"mode": 0
}
POST https://openapi.rogo.com.vn/api/v2.0/iot-core/smart/active

Activate a smart by smid and locId

Body

Field Type Required Description
smid number Yes
locId string Yes
Terminal window
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/smart/active" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"smid":0,"locId":"string"}'
Status Meaning
200 Activation successful
POST https://openapi.rogo.com.vn/api/v2.0/iot-core/smart/set-mode

0 = enable (default), 2 = disable. Syncs the owned schedule.

Body

Field Type Required Description
userId string Yes
uuid string Yes
mode 0 \ 2 Yes
Terminal window
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/smart/set-mode" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"userId":"string","uuid":"string","mode":0}'
Status Meaning
200
Example answer
{
"uuid": "string",
"label": "string",
"smid": 0,
"type": 0,
"subType": 0,
"userId": "string",
"locId": "string",
"ownerId": "string",
"fav": true,
"mode": 0
}