Request Network State
Retrieves information of current network state identified by network ID, requires use of API key and sessionId (Header: X-Casambi-Key, X-Casambi-Session). Related unit 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}/state
Path Parameters:
networkId: "networkId"
CURL Example:
curl "https://door.casambi.com/v1/networks/NETWORK-ID-HERE/state" \
-H "X-Casambi-Session:SESSION-ID-HERE" \
-H "X-Casambi-Key:API-KEY-HERE"
Response Example
{
"id": "VcrTwqLZJ26UYMXxTClmpfZxELcrPUAa",
"name": "Demo Room",
"revision": 125,
"grade": "EVOLUTION",
"address": "b02ef7956bcc",
"gateway": {
"name": "Demo iPad"
},
"type": "OPEN",
"timezone": "Europe/Helsinki",
"dimLevel": 0.5,
"activeScenes": [3, 4],
"photos": [
{
"name": "Photo",
"controls": [],
"image": "iR4aIP3vXcB348Pijif2d4Y7AnowFbdD",
"position": 0
}
],
"units": {
"15": {
"id": 15,
"address": "44363c069a45",
"name": "Sensor Z",
"position": 4,
"fixtureId": 45602,
"firmwareVersion": "32.10",
"groupId": 0,
"priority": 0,
"scene": 0,
"online": false,
"condition": 0,
"status": "ok",
"activeSceneId": 0,
"controls": [
[
{
"type": "Presence",
"status": "absent"
},
{
"level": 0,
"type": "Lux",
"value": 0
},
{
"type": "Switch"
}
]
],
"dimLevel": 0,
"type": "Sensor"
},
"18": {
"id": 18,
"address": "dfe579c30c88",
"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"
}
},
"scenes": {
"1": {
"name": "Timer",
"id": 1,
"position": 0,
"icon": 0,
"color": "#FFFFFF",
"type": "REGULAR",
"hidden": false,
"units": {
"12": {
"id": 12
}
}
}
},
"groups": {
"3": {
"id": 3,
"name": "Demo Group",
"position": 2,
"units": [
{
"0": 12,
"position": 0
}
]
}
}
}