Request Network Unit State
Retrieves information of current unit state in network identified by network ID and unit ID, requires use of API key and sessionId (Header: X-Casambi-Key, X-Casambi-Session). This information is similar to one received along with WebSocket unitChanged events. Note that if unit is part of a group (groupId > 0) it will have position value of 0 as the actual position within the group will be found in related group information.
HTTP Request:
GET https://door.casambi.com/v1/networks/{networkId}/units/{unitId}/state
Path Parameters:
networkId: "networkId"
unitId: unitId
CURL Example:
curl "https://door.casambi.com/v1/networks/NETWORK-ID-HERE/units/UNIT-ID-HERE/state" \
-H "X-Casambi-Session:SESSION-ID-HERE" \
-H "X-Casambi-Key:API-KEY-HERE"
Response Example
{
"id": 18,
"address": "dfe579c30e4f",
"name": "TestUnit",
"image": "456ghkOxsfuE6GTR6utJl8OEAPkSqh",
"position": 4,
"fixtureId": 16574,
"firmwareVersion": "32.10",
"groupId": 0,
"priority": 3,
"scene": 0,
"online": true,
"condition": 134,
"status": "status_message",
"activeSceneId": 4,
"controls": [
[
{
"type": "Dimmer",
"value": 1
},
{
"source": "XY",
"type": "Colorsource"
},
{
"x": 0.14753297508549096,
"y": 0.13727405959941377,
"rgb": "rgb(136, 255, 255)",
"type": "Color"
},
{
"tw": 23.52941,
"min": 2700,
"max": 6000,
"type": "CCT",
"value": 6000,
"level": 1
}
]
],
"dimLevel": 1,
"type": "Luminaire"
}