-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two SP600 devices - one reports power, the other doesn't. #2352
Comments
I did some debugging to help narrow down. I noticed that they appear quite differently in database.db
Non-working device:
When they are reporting status, they both seem to start with a smilar 5 byte data packet: Working device:
... Non-working device:
Any ideas where I should look next to try to fix this? Happy to try any suggestions out. |
Try re-pairing after removing non-working device using zigbee2mqtt/bridge/config/remove (https://www.zigbee2mqtt.io/information/mqtt_topics_and_message_structure.html for more information). Maybe device did not get configured properly when pairing. |
I removed the device entirely from the database.db file and configuration.yaml while zigbee2mqtt was stopped. Not sure if that is the same as above. Then re-added the device. Same behaviour. |
I also have this issue, after a fix was implementing for scaling on the SP600 I had, I bought a further 2, and both of these (a newer firmware in db reported - appversion 25 does not work but appversion 20 does) have a different database structure, and no longer report power. Hoping they've just moved the power reporting, as they advertise this capability still |
Yes, I too have app version 20 as ok and 25 not working. But I think it should work on both because zigbee2mqtt is receiving a 5 byte data packet in both cases, with almost identical values (see end of debug output lines above). I am struggling to debug this - I am not familiar with node.js and I am finding it hard to discover the call stack or even the entry point in order to follow the execution. Is there an IDE or other toolchain that can help, or documentation of the zigbee2mqtt architecture? |
@davet2001 the 5 byte data packet is from the on/off cluster, this only contains the on/off state of the device. The best way to start debugging is to see if the power measurements are actually send by the device, this can be done by sniffing the traffic: https://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html. |
Ok will do. I’ve ordered a second cc2531 to do the sniffing. |
I received my extra cc2531 and started sniffing.
The non-working device never seems to report 'instantaneous demand', it just reports OnOff:
Another difference is that *5e:bf is talking all the time, whereas *:f1:4f says almost nothing. @Koenkk Next question: is the amount and type of things a zigbee device communicates dependent on the coordinator configuration/handshake in some way, or will a device always broadcast all of it's variables using 'report attributes' commands regardless of the network configuration? If the latter, then I think it means one of these SP600 reports power and the other doesn't. |
Ok, I think I'm getting somewhere now with this. I completely removed both devices by stopping zigbee2mqtt, then editing configuration.yaml and database.db, deleting the lines for both devices. Then started it up again and re-paired them. Now they both communicate, but neither of them report power. This time both devices appear in the database.db with a much shorter description (compare with the listing in my first post): Previously 'working' device - now doesn't report power:
Previously 'not working' device, still doesn't report power:
So my interpretation is that the old combination of firmware/zigbee2mqtt/zigbee-herdsman/zigbee-herdsman-converters worked for pairing SP600 devices & reporting their power, while the new combination can pair devices but newly paired devices don't report power. Old entries in the database do. Maybe the problem was introduced with the fix to: |
I can confirm this above behaviour - I repaired the working device, and now also doesn't report power |
Not sure why, but restoring the database file does not seem to restore behaviour, even if i powercycle and reset the usb stick. My original 'working' device doesn't seem to be able to report any power now. Please advise if there's anything I can do to help resolve this. Definitely seems to be a zigbee2mqtt issue rather than an SP600 issue. |
Spent some time trying to narrow down when this problem started. I can confirm that commit eb69ea6 on 9 sep 2019 is working fine. Shortly after that on the same date we have Unfortunately d83085e is a massive commit with 57 changed files, 6,322 additions and 13,423 deletions. I expect one of these changes is what broke the SP600 pairing routine. |
What are the firmwares on those devices, is the working one newer? |
They have slightly different firmware versions - as you can see from the post at the top. But I don’t think that is the main problem any more. Both work if I go back and re-pair with eb69ea6. Neither work if I use a version later than that. |
Ok narrowed down to a single commit now, but no idea why this is breaking it. Slight correction on the commits, it broke a bit earlier in the history than I thought. Heres how to turn the problem on and off:
Result: database.db contains the 'long' form cluster info for the SP600 device. Console shows power level regularly updating.
Result: database.db contains the 'short' form cluster info for the SP600 device. Console shows power level either zero or constantly at one value. I've tried this multiple times. Always behaves the same way. Now looking at the diff. The only thing that has changed is the version from 1.5.1 to 1.6.0:
If I manually modify the version to 1.5.1 in the above files, it still doesn't work. But if I do a git checkout it works. Something must be happening that I don't understand. I'm not really an expert on node.js or git, so that could be why. I can't see how the a checkout of eb69ea6 can behave any differently to a checkout of e26ad2a that has been modified to match eb69ea6. I'm stumped now for how to fix this, but all of my devices definitely work if I use an old version of zigbee2mqtt. |
Attached log of debug output during pairing for working and not working. It looks like in the working case, even after the 'Successfully configured ' debug output, there are several more incoming readRsp messages, and these relate to the missing items (e.g. 'msTemperatureMeasurement') that only appear in database.db in the working configuration. Somehow it looks like there is a bit more configuration going on after the 'succesfully configured'. In the non working case, there are no more incoming messages displayed after the 'successfully configured' message, until I turned the power on/off a couple of times a few seconds later. Does that give anyone any ideas what might be wrong? |
Looks like I’ve got a solution now by updating zigbee-herdsman-converters. |
@davet2001 yes, it is available in the dev branch now, I assume this can be closed. |
What happened
Added two SP600 sockets to my network.
Only one of them reports power levels.
2019-11-16T21:55:33: MQTT publish: topic 'zigbee2mqtt/salus_socket1', payload '{"state":"OFF","linkquality":57,"power":1}'
2019-11-16T21:54:13: MQTT publish: topic 'zigbee2mqtt/salus_socket2', payload '{"state":"ON","linkquality":18}'
What did you expect to happen
Both visible on the network, both report on/off status, link quality and power
How to reproduce it (minimal and precise)
Connect both devices to network.
Turn the socket off via homeassistant.
Turn the socket on via homeassistant.
Repeat for second device.
Observe the zigbee2mqtt logs.
Debug Info
zigbee2mqtt version:
1.6.0
CC253X firmware version:
20190608
Edit: it seems to be significant that the working device was added to zigbee2mqtt and database.db while running an older version of zigbee2mqtt
The text was updated successfully, but these errors were encountered: