-
-
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
Feature: Zigbee Green Power support #3322
Comments
So If I'm reading the docs right, this won't work without a Philips Hue device, am I right? So even If I bought a Hue Tap only (without any bridges, other Hue devices, etc.) I wouldn't be able to use it. |
@electrofloat correct (and it needs to be in range) |
That's a shame.. I'd have liked to use it in itself (without any other devices). |
@electrofloat maybe in the future an additional CC2652R router can also be used for this. But for sure a "special device" is needed to make it work. |
Have you tried the green power firmware for xbee? I did see yesterday when I was trying to get xbee working with z2m they had a dedicated ZigBee green power firmware. Anything you want me to try? |
@Koenkk I've just tested this and I managed to get my two Hue Tap switches to pair. They are now in the database and I assigned a friendly name, but I cannot see anything in the debug log after the pairing when I push the buttons. There are also no mqtt messages on zigbee2mqtt/friendlyname. Are there any additional steps needed to get this to work or what am I doing wrong? By the way, I managed to get the devices paired on channel 11 by long clicking on the big button with the one dot that surrounds the smaller buttons. (The documentation states that only channel 15, 20 and 25 can be used) |
@TheNetStriker thanks for testing this, any chance you could sniff the traffic when joining the device and pressing buttons afterwards? https://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html |
@Koenkk I already uploaded a packet capture in the first thread about the Hue Tap. Here is the link to the pcap file: https://www.dropbox.com/s/pk1jt5h5yvtkb36/HueTap.pcapng?dl=0 Or do you need a fresh packet capture for this? I also found something about the Hue Tap in the log:
And in the state.json this is the only property that the device has: |
Green power devices don't respond to these LQI requests, so I've excluded them from the network scan (fixed in latest dev branch) Regarding the sniff, it doesn't contain useful information. I need a sniff in were they are also successfully paired with zigbee2mqtt. |
Congratulations on getting this working! Should the docs also specify that a Zigbee 3.0 firmware is needed for this to work, or did you manage to get it to work with Zigbee 1.2 as well? |
@ndfred it also works with 1.2 |
Just tried it with zStack12 on channel 20, worked wonderfully! Held the button for 10 seconds, paired immediately when I let go, all buttons work no problem. I went around the house to see if the taps would register everywhere (I wondered if it would use the mesh network or if it would only communicate through its gateway bulb) and it worked flawlessly everywhere. Super happy I could pair all my remotes now! A few nits that might be worth calling out in the documentation:
Specifically this is the configuration entry for the device (mine is a Philips Hue Tap switch which I bought in France ages ago):
TBH this is a super niche type of switch (expensive and not very nice to tap) so I would understand if you don't want to bother with that, but if you do I am more than happy to redo all the pairing with whatever debug logs you need to display the proper hardware profile. And thanks again for getting this to work! |
@ndfred thanks, added this to the docs. We cannot distinguish between e.g. a Hue Tap and a Friends of Hue Niko switch, Green Power device don't share such specific information. |
@Koenkk I've just uploaded a new packet capture to my Dropbox: https://www.dropbox.com/s/andvjbcpr78p8jk/HueTap.pcapng?dl=0 |
@TheNetStriker I need your network key in order to decrypt te sniff, please send them to me on telegram (@Koenkk). |
This is fantastic! This was the only thing keeping me from migrating away from my Hue bridge :) I tried this with a Niko Friends of Hue switch and a couple of Philips Hue bulbs, with a CC2531 USB stick. Some notes:
|
Sharing my experience with it, hoping it might be helpful to you, I have a Hue Tap and not a Niko one:
I have 17 devices including 6 remotes and one motion detector so really 10 devices that are always on the network, which is not a lot for the CC2531. My Hue Tap remote link quality is 10, which is less than other devices but I guess that is down to its low power budget. |
Because of point 1, we cannot further specify the actions, it make work for e.g. the hue tap but not for another device, currently I made the action match against the green power specification. |
@ndfred
Multiple seconds - up to 5.
I will do some more experiments in the next days.
Yes, my Hue bridge was running on a different channel (I had 2 zigbee networks running in parallel for the past year - one for the Hue bridge, one for zigbee2mqtt). It could be that the Hue Bridge channel was more robust, I will check that if none of the other suggestions help.
Good points, will check that later this week.
Yes, I run the USB stick from an USB extension cord. I do not use any PCB or antenna.
No, I shut it down. As mentioned above, it was running fine in parallel with zigbee2mqtt for the past year.
I have 29 devices (and 3 groups). I will do more tests during the weekend. Thanks for the help!
Ah, that helps! Might be a good idea to clarify that in the documentation. |
Additional testing pointed indeed to Openhab and its MQTT broker. After optimizing those, zigbee2mqtt + Green Power support now works similar to the old Hue bridge :-) |
Does anyone have experience using Z-Stack 3.0.x Router as a GPP? I have it working with Zigbee2mqtt but there are some problems with Z-Stack. I opened a thread over on the TI forum. |
@Koenkk: For your Information: The Philips Hue Tap can also join the Network on Channel 11 by pressing the "One-Dot-Button" for 10 Seconds. Works without any problems. Please add this to the docs. |
@Koenkk so no special zigbee hub/usb stick is needed to be 'compatible with' zigbee green power, correct? |
Works now :) |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
Good afternoon! Ideally, I would like the Niko Friends of Hue switch to influence a nearby Ubisys D1. That last one supports Zigbee Green Power, but is there in fact now way for them to work together unless a layer like NodeRED/Home Assistant/OpenHAB is used? Thanks for the clarification |
I just managed to get the "GreenPower_On_Off_Switch" in Zigbee2MQTT. Anything I'm missing here? |
@vandenbogerd The four buttons appear as the state of the relevant Tap switch's sensor in Home Assistant. So, in other words if you have a Tap switch with the friendly name of From there, you can use the state of the sensor to create triggers for automations like so. This example listens to presses from different buttons on two different switches to perform the same action but you could just as easily listen to just a single trigger: - id: switch_foyer_light
alias: Toggle Foyer Light from foyer switch and lounge switch
initial_state: true
trigger:
- platform: state
entity_id: sensor.tap_switch_foyer_action
to: toggle
- platform: state
entity_id: sensor.tap_switch_lounge_action
to: recall_scene_2
action:
- service: light.toggle
entity_id: light.foyer_light |
I'm in the process of moving my devices from deConz to Zigbee2mqtt. After pairing one of my Greenpower switches I noticed this combination doesn't seem to support a hold (long press) action. I just see press and release actions. deConz sent different codes for short and long press. Unfortunately I was using some of these long presses, so I'd like them supported:-). Is that something that is coming, or has someone found some sort of solution/workaround, either in Z2M or in Homeassistant? |
Consider staying with deconz. I went from zigbee2mqtt to deconz and the robustness has improved dramatically. At least in my case it has been rock solid (using green zigbee devices). |
Thanks, that obviously was not what I wanted to hear :-) :-)
|
I've read through the thread here and I'm still unsure how to use Green Power devices with Z2M. It is written that a prerequisite is that a Hue device has to be in range, but no further details are given. Will any Hue device work? |
Dear nickagian, Indeed, I found this somewhat surprising as well. I am sure that the Friends of Hue devices need a Hue device which is powered to 'decode' the messages. If Zigbee Green Power devices from other manufacturers have enough with the implemention on your Zigbee coordinator, that I can not confirm or deny. Perhaps you can post a question about it with a more experienced member? I would be interested to find out more. |
The doc also states that binding is not supported. However, z2m knows which device the command is coming from. So I wonder what the technical reason is that binding is not supported for Green Power devices... |
I also just switched from deCONZ to z2m and sadly realized, that PTM215Z (in my case Scenic Friends of Hue) does not support "long" press. I only get I'm not familiar with external converters, yet. Perhaps, it is possible to "fake" a long press. Like, if the time between |
I (sort of) implemented the long press in Homeassistant: pressing a button triggers an automation that sets a boolean to true, waits a second and switches it off again. Releasing triggers an automation that chooses between two different actions depending on the state of the boolean. Downside: the long press-action is not triggered on hold, but on release after hold. Takes a little getting used to, |
I only have a SunRicher SR-ZGP2801K4-DIM remote. I believe that the IKEA bulbs with newer firmware also works as Green Power proxies.
Is that only with green power devices? I don't like green power because I prefer to bind the remotes to the bulb's. and that correlates fine with the experience I hear from other places, where many has switched from Deconz to Z2M.
That is interesting. Do we really miss some info from these devices, or is the hold action from Deconz actually just a simulated event? @Koenkk ? |
I guess it does, you can see when the device sends a message by pressing button while debug logging is activated. See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable debug logging. |
As per the device specification, I am now quite sure it only sends press and release events.
|
I am really interested to see an automation either in Node Red or HA if someone managed to simulate a long press! |
I have had success by using the blueprint: it has 3 actions for each of the 4 buttons: I use it with the brightness_move command in Zigbee2MQTT, so the "Held" action sends a brightness_move command, and the "Released" action sends a brightness_stop command. I have also tried with the new version of Tasmota with the new "Dimmer >", "Dimmer !" and "Dimmer !" commands. I use this code for Tasmota:
not as accurate as zigbee control, but usable. |
Thanks a lot @Koenkk! I really appreciate the crazy amount of work you put in to this project! I have been using Zigbee2MQTT for a few years now (first with OpenHAB and now with Home Assistant) and it just keeps getting better and better! May I recommend every user to do what I have done: DONATE! |
I've just spend some time reading about Zigbee Green Power. It is feature set included in Zigbee 3.0 and it enables battery-less devices to communicate, by using the energy harvested by pressing buttons. The best technical, but still relatively high-level description of the requirements to run a Zigbee Green Power is found in the document from Texas Instruments: I think this explains the behaviour people in this thread are experiencing. Namely:
So, it is up to the rest of the manufacturers of mains-powered Zigbee 3.0 (sometimes also called "Zigbee PRO") to implement support for the Zigbee Green Power specification v.1.1.1. Alternatively (and I don't know if this is up to spec, instead of waiting for the lazy manufacturers, could it be possible to implement the Zigbee Green Power specification v.1.1.1 in the Coordinator firmware? I realise this would circumvent the whole mesh functionality of Zigbee, but it might work? Just maybe.. ? BTW: A nice breakdown has also been made here (zigpy/zigpy#341) but with ZHA in mind. A quick note: I hate the way the Zigbee standard has evolved. Standards within standards, confusing naming schemes and exception upon exceptions. I've spared you all the nasty details, to be able to provide as clear and precise a description as possible. I think they had pretty good intentions, but too much freedom was left for the manufacturers - in my opinion, that is. |
FYI, Silicon Labs EZSP ("EmberZNet Serial Protocol") based adapter support is still experimental in Zigbee2MQTT, and while Silabs EFR32MG1x/EFR32MG2x hardware and firmware have does have support "Zigbee Green Power" (ZGP, a.k.a. GreenPower) the ezsp adapter/driver code in the zigbee-herdsman library which Zigbee2MQTT depends on does not yet support "Zigbee Green Power" (ZGP, a.k.a. GreenPower) which Philips Hue Tap and a few other "Friends of Hue" batteryless devices uses, see development here -> Koenkk/zigbee-herdsman#319 So for now you need a Texas Instruments z-stack (CC2652 or CC1352 based) adapter/driver or if you are a Python developer yourself then you could help with coding for the project by mapping the correct missing frames needed for "Zigbee Green Power" (ZGP, a.k.a. GreenPower) into the ezsp adapter/driver code -> https://github.com/Koenkk/zigbee-herdsman/tree/master/src/adapter/ezsp so in conclusion the ezsp software code need some development work to specifically add "Zigbee Green Power" (ZGP, a.k.a. GreenPower) support -> https://github.com/Koenkk/zigbee-herdsman/search?q=green plus both more developers as well as more testers activly helping out on improving that ezsp adapter/driver code in the zigbee-herdsman library. Again, "Zigbee Green Power" (ZGP, a.k.a. GreenPower) is already supported by the z-stack adapter/driver (for Texas Instruments CC2652 or CC1352 based dongles), see Koenkk/zigbee-herdsman#92 |
Hello, how to add it with Zigbee2MQTT ? |
Hi NilkOne,
|
Did you ever got it to work ? I've ordered 2 and still could not get them online, however I didn't try sniffing the traffic yet. |
#19405 - here is the GitHub issue for this particular device. Closest I've gotten is registering button presses (but no distinction between which one) |
Zigbee Green Power support has now been added. This enables support for e.g. the Philips Hue Tap and Friends of Hue switches.
I've created this issue in order to discuss this functionallity.
The text was updated successfully, but these errors were encountered: