Hi,
I've been using the MakerAPI for a few days now and was wondering if we can tell if a device is 'offline'? For an outlet maybe that means it's unplugged.. or a light bulb was turned off at the switch.
As an example, I tried to send a 'OFF' request to this device but never got an update (I'm using a websocket to listen for updates). If I can tell the device is offline I won't send the request.. or, is there some error/timeout message I should be getting?
NOTE: I do see that "power" attribute which is "0". But, I also see that value for another device which is online so not sure it's helpful here
REQUEST: GET http://192.168.0.202/apps/api/38/devices/66/off
RESPONSE:
{
"id" : "66",
"name" : "Generic Zigbee Outlet",
"label" : "Outlet 1",
"attributes" :
[
{
"name" : "power",
"currentValue" : 0,
"dataType" : "NUMBER"
},
{
"name" : "switch",
"currentValue" : "on",
"dataType" : "ENUM",
"values" :
[
"on",
"off"
]
},
{
"name" : "switch",
"currentValue" : "on",
"dataType" : "ENUM",
"values" :
[
"on",
"off"
]
}
],
"capabilities" :
[
"Switch",
{
"attributes" :
[
{
"name" : "switch",
"dataType" : null
}
]
},
"Configuration",
"PowerMeter",
{
"attributes" :
[
{
"name" : "power",
"dataType" : null
}
]
},
"Sensor",
"Actuator",
"Outlet",
{
"attributes" :
[
{
"name" : "switch",
"dataType" : null
}
]
}
],
"commands" :
[
"configure",
"off",
"off",
"on",
"on",
"refresh"
]
}