-
Notifications
You must be signed in to change notification settings - Fork 507
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
Zigbee Light Link #266
Comments
Interesting, it would seem that the Hue bridge still supports being touch linked into an existing network, see #117. And you don't need a Living Colors remote! Does the Hue bridge show as a router (yellow) or as a gateway (blue) in the deCONZ GUI? This setup might actually be preferred over configuring deCONZ as a router on the Hue bridge network, see #21. Still, the usual caveats would apply: typically devices can only report to one gateway/bridge and you don't want multiple gateways/bridges polling the same lights. |
OK, I can factory-new reset the v2 Hue bridge when holding the link button through deCONZ touchlink as well as through the Hue dimmer switch (holding On and Off for 10 seconds). It seems the link button doesn't light up when the bridge is in factory new state. deCONZ touchlink confirms its on panid 0xfffe. However, I seem to be stuck here. I have two Trådfri remotes and one Trådfri motion sensor linked to deCONZ, but their light doesn't come on when holding the link button on the back for 10 seconds, while keeping them next to the Hue bridge (still in factory new state) while holding the bridge's link button. I double-checked that the remote will pair to an IKEA bulb while holding the link button on the back, joining the bulb to the deCONZ network. |
During Touchlink various messages are exchanged which also contain information about the device type, I reckon the IKEA remotes will only proceed then the other device matches specific attributes (lights for example). In the sniffer you should see the scan request and responses, which give more insight. |
The remote i used in last steps came from an existing Ikea network, and was initiated with touchlink! I think i have read somewhere that it is not allowed to touchlink a remote that are initiated in a HA network with trust center! If you reset the remote and one bulb and let them create a new "non trustcenter" network, can that remote then be used in the last step? |
Then in shouldn't have touch linked the light, shouldn't it? When the Hue dimmer switch is paired with deCONZ, we set a manufacturer specific attribute to disable touch linking, just as the Hue bridge does. I'm not aware of something similar for the Trådfri remote.
I haven't tried that, but that would make the Hue bridge join the ad-hoc network created by the remote, not the network created by deCONZ (or rather by the RaspBee).
Maybe I'll try that next week, time permitting. For now, busy resetting my Hue lights to join them to the Hue bridge to update their firmware... |
Done that tonight also Erik. Thanks for the hint of resetting lights with the dimmerswitch in another thread... saved me lots of time! |
I've been playing a bit more with this and extended rest_touchlink.cpp to be able to transmit a "join end device" packet. The idea behind this is to see if an Ikea remote that has been touchlinked works differently than if it has been joined with "classic commissioning", and also to see if Hue can be joied from within deConz without extra remote. Missing part before I can test it is to calculate and encrypt network key. Is there any functionality in the deconz API I can use to do AES encrypt, or do I need to bring in some external library or code for that? According to ZLL spec transaction identifiers from request and response should be merged and used for AES encryption with the "secret" master key! |
The problem is that per default deCONZ is running as trust center with default trust center network key. As per ZigBee specification it is not allowed to join devices via touchlink to a trust center network. The hue bridge would just ignore the command because of that, regardless if it is send by deCONZ or a remote in the deCONZ network. Therefore deCONZ must be configured to run in
Since the network key must be encrypted with the master key we can do that in the RaspBee/ConBee firmware and send it to deCONZ so that the key is available to rest_touchlink.cpp, this would have the advantage to use the AES unit on the rf module and it works on every platform without external libraries. |
Just a brainstormed thought. Instead of having Hue bridge join the same network as Deconz, perhaps its possible to migrate the same network into Hue. Hue has a migration process that allows you to migrate the current zigbee network from their v1 bridge to their v2+ bridge. I'm not sure if the data is migrated over via zigbee or tcp, but when I performed this, the network was cloned over and v2 bridge had control all without doing anything to the bulbs. If this process is reproduceable, it might acquire the same network and link keys as the existing deconz network |
Uploaded my tests here, https://github.com/mtornblad/deconz-rest-plugin. After checkout you need to change rest_touchlink.cpp It works to lightlink a Hue hub First do a scan to get ID of device to link, then use command /api/"apikey"/touchlink/"id"/join |
@mysteryan: Could not find any clues in how to use backup file. Some info about how to create and restore backup you have below: OPTIONS http://192.168.1.159/backup Content-Type {"devicetype" : "mattias"} Sample Request Content-Type {"backup":{"status":"startmigration"}} Sample Request Content-Type Sample Request HEADERS Content-Type And to restore it is similar to backup but upload to /restore instead of download from /backup |
So after the lightlink of the Hue bridge, both the bridge and deCONZ are on the same ZigBee network (PANID and key)? Does the bridge join the deCONZ network or does deCONZ join the Hue network? Are both the bridge and RaspBee/ConBee ZigBee gateways (blue nodes in the deCONZ GUI) or did the one become a ZigBee router (yellow node)? |
Sorry for bringing this up, but is this a way to get Hue bulbs to update? I.e. can the hue bridge touchlinked to the deCONZ network update the bulbs? Is there any drawback of doing this? Is the bridge and deCONZ still fighting for the same bindings etc.? |
Unlike for Ikea due the lack of Philips Hue update files it's needed to update the lights with the Hue bridge. The bridge can't be linked to the deCONZ network.
Yes there is little we can do here, since the two controllers can't easily sync settings. |
I have been able to join a Hue Bridge v2.1 with latest firmware into an ZLL network created by Ikea Gateway. It is working but is a bit unstable in the different way lamps are working, some lamps can only be reached through Ikea App, some from Hue App, and some can be controlled from both apps. I would like to join deConz into this network to find out more what is happening. Is that possible? I have found this links but none of them seems to work:
#21 ZLL Commissioning
Quick start guide deCONZ ZigBee Light Link
Since there are no clear guide on how to join Hue Bridge to an existing network, this is what I found out after a lot of reading and trial & errors!
//Mattias
The text was updated successfully, but these errors were encountered: