My ConBee/deconz Zigbee network drops Ikea lights every now and then.
I have now a second ConBee set up as a sniffer in order to smoke out why.
In OH2 I am polling the REST API into a http cache every 2s.
There are a total of 33 light that can be randomly dropped.
I need to log a timestamp and an ID when the field reachable becomes false for any of the lights.
The JSON cache updated every 2s is on this format:
{
"1": {
"ctmax": 454,
"ctmin": 250,
"etag": "4151a447a499ff12ca18c79218f0256b",
"hascolor": true,
"manufacturername": "IKEA of Sweden",
"modelid": "TRADFRI bulb E27 WS opal 980lm",
"name": "Light 1/1",
"state": {
"alert": "none",
"bri": 3,
"colormode": "ct",
"ct": 454,
"on": false,
"reachable": true
},
"swversion": "1.2.217",
"type": "Color temperature light",
"uniqueid": "90:fd:9f:ff:fe:05:75:33-01"
},
"2": {
"ctmax": 454,
"ctmin": 250,
"etag": "4151a447a499ff12ca18c79218f0256b",
"hascolor": true,
"manufacturername": "IKEA of Sweden",
"modelid": "TRADFRI bulb E27 WS opal 980lm",
"name": "Light 1/2",
"state": {
"alert": "none",
"bri": 3,
"colormode": "ct",
"ct": 454,
"on": false,
"reachable": true
},
"swversion": "1.2.217",
"type": "Color temperature light",
"uniqueid": "90:fd:9f:ff:fe:08:fe:24-01"
},
"3": {
"ctmax": 454,
Please help me come up with a clever way of triggering an event when any of the 33 lights get their reachable field set to false, and also print out that ligt’s uniqueid that will tell where to look in the WireShark log.
I’m sure there is a clever way to do this other than defining 33 discrete items?
Here is my http.cfg:
# deCONZ lights
LightsCache.url=http://127.0.0.1:8090/api/0950775C33/lights
LightsCache.updateInterval=2000
Example of a single light item:
String Trumpet4PolledBri { http="<[LightsCache:900:JSONPATH($.30.state.bri)]" }