Zigbee device attributes #39
darrylb123
started this conversation in
Modules
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just started dabbling in Zigbee. I have a Sonoff Bridge Pro, a push button, a door switch and a GPO socket. I know I can use the zigbee TCP bridge from Home Assistant, but I would like to use the zigbee devices in native mode, ie create Tasmota rules and berry scripts to operate the devices. I still want Home assistant to also be able to do likewise.
The GPO socket has a relay and power monitoring. I would like to create a Berry script to auto configure Home Assistant to be able to operate the Zigbee devices. I've done similar in C++ for another project.
First thing I tried was to query the device state attributes , much like Home Assistant does over the TCP bridge. I can get the device generic attributes but not relay state or socket power etc from Berry. A bit more is available from the console, but not all attributes that are sent later.
15:03:34.704 CMD: zbinfo
15:03:34.714 MQT: tele/ZigbeeBridge/SENSOR = {"ZbInfo":{"DoorButton":{"Device":"0x2BBB","Name":"DoorButton","IEEEAddr":"0x9035EAFFFE02BD22","ModelId":"SNZB-01P","Manufacturer":"eWeLink","Endpoints":[1],"Config":[],"Reachable":true,"BatteryPercentage":100,"BatteryLastSeenEpoch":1711511893,"LastSeen":134,"LastSeenEpoch":1711515680,"LinkQuality":171}}}
15:03:34.728 MQT: tele/ZigbeeBridge/SENSOR = {"ZbInfo":{"WindowSwitch":{"Device":"0xFFC7","Name":"WindowSwitch","IEEEAddr":"0x00124B002928CAA1","ModelId":"DS01","Manufacturer":"eWeLink","Endpoints":[1],"Config":["A01.2"],"ZoneType":21,"ZoneStatus":12544,"Reachable":true,"BatteryPercentage":100,"BatteryLastSeenEpoch":1711507046,"LastSeen":2146,"LastSeenEpoch":1711513668,"LinkQuality":163}}}
15:03:34.740 MQT: tele/ZigbeeBridge/SENSOR = {"ZbInfo":{"Socket2":{"Device":"0x9CA2","Name":"Socket2","IEEEAddr":"0xA4C1383C55AF1B06","ModelId":"TS011F","Manufacturer":"_TZ3000_typdpbpg","Endpoints":[1,242],"Config":["O01","P01"],"Power":0,"RMSVoltage":230,"ActivePower":0,"Reachable":true,"LastSeen":128,"LastSeenEpoch":1711515686,"LinkQuality":142}}}
15:03:34.754 MQT: tele/ZigbeeBridge/SENSOR = {"ZbInfo":{"Socket1":{"Device":"0xE5FA","Name":"Socket1","IEEEAddr":"0xA4C1381DA407985F","ModelId":"TS011F","Manufacturer":"_TZ3000_typdpbpg","Endpoints":[1,242],"Config":["O01","P01"],"Power":0,"RMSVoltage":234,"ActivePower":0,"Reachable":true,"LastSeen":132,"LastSeenEpoch":1711515682,"LinkQuality":112}}}
15:03:34.767 MQT: stat/ZigbeeBridge/RESULT = {"ZbInfo":"Done"}
I could use a rule for every zbreceived and build my own database as the data comes in, then send a Home Assistant autoconfiguration MQTT message for the new data...
This is the console output when a socket is operated:
15:01:00.588 MQT: tele/ZigbeeBridge/SENSOR = {"ZbReceived":{"Socket1":{"Device":"0xE5FA","Name":"Socket1","Power":1,"Endpoint":1,"LinkQuality":131}}}
15:01:01.140 MQT: tele/ZigbeeBridge/SENSOR = {"ZbReceived":{"Socket1":{"Device":"0xE5FA","Name":"Socket1","ActivePower":101,"Endpoint":1,"LinkQuality":138}}}
15:01:01.748 MQT: tele/ZigbeeBridge/SENSOR = {"ZbReceived":{"Socket2":{"Device":"0x9CA2","Name":"Socket2","0006/8001":1,"Endpoint":1,"LinkQuality":171}}}
15:01:02.289 MQT: tele/ZigbeeBridge/SENSOR = {"ZbReceived":{"Socket1":{"Device":"0xE5FA","Name":"Socket1","RMSCurrent":3968,"ActivePower":786,"Endpoint":1,"LinkQuality":94}}}
15:01:02.439 MQT: tele/ZigbeeBridge/SENSOR = {"ZbReceived":{"Socket2":{"Device":"0x9CA2","Name":"Socket2","0006/8002":0,"Endpoint":1,"LinkQuality":167}}}
15:01:03.140 MQT: tele/ZigbeeBridge/SENSOR = {"ZbReceived":{"Socket1":{"Device":"0xE5FA","Name":"Socket1","ActivePower":750,"Endpoint":1,"LinkQuality":112}}}
15:01:04.142 MQT: tele/ZigbeeBridge/SENSOR = {"ZbReceived":{"Socket1":{"Device":"0xE5FA","Name":"Socket1","ActivePower":772,"Endpoint":1,"LinkQuality":123}}}
15:01:05.145 MQT: tele/ZigbeeBridge/SENSOR = {"ZbReceived":{"Socket1":{"Device":"0xE5FA","Name":"Socket1","ActivePower":783,"Endpoint":1,"LinkQuality":98}}}
15:01:06.192 MQT: tele/ZigbeeBridge/SENSOR = {"ZbReceived":{"Socket1":{"Device":"0xE5FA","Name":"Socket1","ActivePower":752,"Endpoint":1,"LinkQuality":116}}}
15:01:07.396 MQT: tele/ZigbeeBridge/SENSOR = {"ZbReceived":{"Socket2":{"Device":"0x9CA2","Name":"Socket2","RMSCurrent":0,"Endpoint":1,"LinkQuality":174}}}
15:01:08.197 MQT: tele/ZigbeeBridge/SENSOR = {"ZbReceived":{"Socket1":{"Device":"0xE5FA","Name":"Socket1","ActivePower":767,"Endpoint":1,"LinkQuality":131}}}
15:01:08.800 MQT: tele/ZigbeeBridge/SENSOR = {"ZbReceived":{"Socket2":{"Device":"0x9CA2","Name":"Socket2","RMSVoltage":230,"Endpoint":1,"LinkQuality":171}}}
Beta Was this translation helpful? Give feedback.
All reactions