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
Adding ZStack driver for CC253x dongles #101
Conversation
I have a couple cc2531 dongles. What firmware do I need to flash on them in order to test this? |
I tested with latest ZStack 3.0.2. See https://github.com/agendek78/zigbee-adapter/tree/master/firmware |
I've been really busy in the past little bit, and I just wanted to let you know that I should get a chance to try this out/review the code in the next week. |
Any updates? I’ve tried it with xiaomi devices (with zstack 3.0.2 firmware), devices are able to join to the network but they leave after about 5 seconds. With zstack 1.2. firmware (from this repo https://github.com/Koenkk/Z-Stack-firmware/tree/dev) devices don’t leave the network but I noticed some delay after sending first two or three on/off commands to plug, and after that all next commands send immediately |
Sorry - I've been totally swamped. The xiami devices are "special" and don't completely adhere to the spec. From the research I've done online, the parent sends a NWK Leave request with rejoin flag set, and the xiami devices don't rejoin. Apparently there are some outlets which they work with, and I believe that the ConBee zigbee dongle has special code to deal with them. So I generally avoid the xiami devices. With the Digi dongle, all of my battery powered xiami devices are gone within 24 hours. |
@dhylands I'm not sure that issue with devices leaving is only related to Xiaomi/Aqara, I have the same problems with Tradfri Bulbs on 3.0.2 firmware, with 1.2. firmware almost everything works fine |
I've fixed the issue with devices leaving, it turned out that we need to add New firmware: CC2531ZNP-3.0.2.zip |
I've also notices the following warning:
I receive this message on every start and, as I understand, it's related to permit join event (subsys: 5) |
Any updates? I've got a CS2531 dongle, a Raspberry and an IKEA bulb and I was hoping CS2531 support would happen sooner or later to try it out. |
Also have problems with the CS2531 dongle. But the line before it says it is found.. Flashed the stick but still not working.. |
Is there any progress on this PR? |
ff16b68
to
5aa2ab5
Compare
Question to @dhylands : I added property notification in zb-driver.js in RESOLVE_SET_PROPERTY command - is this correct? Without this change setting property of zigbee light didn't work as gateway core wasn't notified about successful change of it. I have only CC2531 dongle to check - but don't see also reason why it should work for other dongles without this change. |
Normally, when you set a property, there would be a config report setup and a binding done. Setting the property should then report a change. There are some devices which don't support config reports and/or don't report the changes. You can set the attribute fireAndForget to true on a property, and that will "fake" a notification when setting the value of a property. So far, this has been device specific and not driver specific. So if you look through the zb-classifier.js file you'll see devices where fireAndForget gets set. Having RESOLVE_SET_PROPERTY do a notification would be like setting fireAndForget for all properties (so putting the notification there isn't correct). The purpose of RESOLVE_SET_PROPERTY is that when you call setValue on a Property, it returns a promise that is resolved once the value has been "set". Since the command to set a value is queued, this can happen sometime in the future. Setting a value queues up a command to set the value, wait for an acknowledgement that the command was actually set and then resolve the Promise. The zigbee device should then send back a notification that the value changed, which is what normally triggers the notification (or the fake notification if fireAndForget is set). |
has this been merged into the main repo? If not, how do I integrate this into the raspberry pi gateway image? |
There still must be fixed property changed notification, because current implementation is not correct. |
any estimate on when that will be ready? or anything I can do to help? |
Would love to be able to use this adapter, anybody still working on this? |
Currently I'm involved in different project. Maybe in Feb/2020 I will look at this issue. |
Please check now this PR. There was problem with parsing destination address of the BIND request and bind operation was not successful. Now it works as expected - bind succeeds and reports are sent by device on attribute change. |
One request: can you create a README.md in this repo and add info about flashing a dongle with the required firmware? |
firmware for cc2531 dongle is included in this PR |
@agendek78 I know, but not everybody knows how to flash that firmware (myself included), so instructions would help. |
CC2531 flashing instruction |
Has onyone gotten this to work ok? I bought a $4 preflashed Itead dongle from Aliexpress. It would rock if a $4 dongle could replace an almost ten times more expensive Conbee II dongle. |
Hello all. I too would love to see the CC2531 dongles supported. Or are they already? |
Already supported. 🙂 |
Thanks @mrstegeman I realised this five seconds after posting but could not find my post to delete it for some reason (just vanished) :-) |
Is there anything I need to do to get the dongle to work? Should it be plug and play? |
flash included on the repo firmware |
Ah, but I was hoping a commercially available $4 pre-flashed dongle could work. That would lower the barrier for beginners (both financially and technically). |
From description on the itead.cc, I see, the dongle they sell, should have proper firmware to work with this plugin. |
I just tried it again with an IKEA power socket that had never connected to another network. At the fourth attempt.. it worked!! Brilliant! Are there any major downsides to using this $4 dongle over the $40 Conbee 2? Can it handle less devices? Is it less compatible somehow? |
Cool, would you mind adding it to the list of supported Zigbee dongles on the wiki, along with any firmware version you need to flash onto it in order for it to work? https://github.com/WebThingsIO/wiki/wiki/Supported-Hardware (I don't have one myself so can't provide any feedback on how reliable it is). |
I suspect that the reason my other devices don't work was because I tried devices that are 'sibling' devices. For example, the IKEA motion sensor is designed to be paired with a lamp directly. I believe the Conbee USB stick uses some trickery to make these devices believe they are paired with a lamp. Am I correct in my assumption that these USB sticks might not support this trickery? |
You're probably thinking about touchlinking - in that case devices that are commissioned this way, have separate network and won't work because USB dongle is acting as a coordinator and it forms another network itself (with own channel, PANID, etc...) - this applies at least to CC253x adapter implementation. To make those devices work in this setup you have to use 'classic join' commissioning method on all devices and then use 'bind' function to connect specific remotes/sensors with lamps/switches. |
Yes, the Conbee can simulate another device in order for switches and that motion sensor to connect. I'm not sure which others can do it but the Digi Xstick definitely can't (found out the hard way) and I can't see anything suggesting the CC253x dongles could do it. |
@Astiolo Thanks. So there's still a good reason to keep using the more expensive Conbee stick I guess. |
broken link |
Initial version of CC253x driver
Fixes #152