Skip to content
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

Friends of Hue Smart Switch #22

Closed
mabels opened this issue Sep 3, 2019 · 67 comments
Closed

Friends of Hue Smart Switch #22

mabels opened this issue Sep 3, 2019 · 67 comments

Comments

@mabels
Copy link

mabels commented Sep 3, 2019

Hi,

i have these:

https://new.abb.com/low-voltage/products/residential-product/remote-control/friends-of-hue-smart-switch

and it seams not supported in zigbee2mqtt, that i will try in the next step.

I started to figure out how it works.
First I found it is not able to pair at all.
Than I made a PacketSniffing on zigbee, and found out that the device sends Broadcast if it is pressed and released.
Yesterday i dived into the sourcecode to do an "Proove of Concept" how to support that kind of device. But after hours of reading i figured out that I knew not enough about the CC2531 API how to get broadcast packets at all.
It would be very helpful if somebody could give me a hint how to capture broadcast packets with the "zigbee-herdsman"?
I will attach the packet trace later today.

thx in advance

meno

@Koenkk
Copy link
Owner

Koenkk commented Sep 3, 2019

These are green power devices which are currently not supported by zigbee-herdsman, note that if you want to experiment with this, you need z-stack 3 (z-stack 1.2 doesn't support green power).

I've also done some investigations into green power but didn't manage to configure it correctly yet.

@mabels
Copy link
Author

mabels commented Sep 3, 2019

Many thx for comeback so fast.
I saw your tries. I will continue after i tried to build z-stack 3 from source, and read abit in the sources to get a better understanding how this zigbee api works. For me most of the terms are new and that has to change first.

@mabels
Copy link
Author

mabels commented Sep 3, 2019

Hi i set the pan_id to 0xffff and got this, if i press the button:

  serialport/bindings/poller received "readable" +22s
  serialport/binding-abstract read +22s
  serialport/bindings/unixRead Starting read +22s
  serialport/bindings/unixRead Finished read 26 bytes +1ms
  serialport/stream binding.read finished +22s
  unpi:parser <-- [254,21,85,3,0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,95,0,0,0,13,18] +22s
  unpi:parser --- parseNext [254,21,85,3,0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,95,0,0,0,13,18] +0ms
  unpi:parser --> parsed 21 - 2 - 21 - 3 - [0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,95,0,0,0,13] - 18 +1ms
  cc-znp Frame {
  cc-znp   type: 'AREQ',
  cc-znp   subsystem: 21,
  cc-znp   commandID: 3,
  cc-znp   data:
  cc-znp    [ 0, 100, 146, 112, 1, 100, 146, 112, 1, 0, 0, 0, 0, 0, 2, 1, 95, 0, 0, 0, 13 ],
  cc-znp   length: 21,
  cc-znp   fcs: 18,
  cc-znp   csum: 18,
  cc-znp   sof: 254,
  cc-znp   len: 21,
  cc-znp   subsys: 'GREENPOWER',
  cc-znp   cmd: 'secReq',
  cc-znp   payload:
  cc-znp    { applicationID: 0,
  cc-znp      srcID: 24154724,
  cc-znp      gdpIeeeAddr: '0x0000000001709264',
  cc-znp      endpoint: 0,
  cc-znp      gpdfSecurityLevel: 2,
  cc-znp      gpdfSecurityFrameCounter: 1,
  cc-znp      dgpStubHandle: 95 } } +22s
  unpi:parser --- parseNext [] +2ms
  serialport/stream _read reading +3ms
  serialport/binding-abstract read +4ms
  serialport/bindings/unixRead Starting read +3ms
  cc-znp:AREQ <-- GREENPOWER:secReq, { applicationID: 0, srcID: 24154724, gdpIeeeAddr: '0x0000000001709264', endpoint: 0, gpdfSecurityLevel: 2, gpdfSecurityFrameCounter: 1, dgpStubHandle: 95 } +22s
  zigbee-shepherd:msgHdlr IND <-- GREENPOWER:secReq +22s
  serialport/bindings/unixRead waiting for readable because of code: EAGAIN +0ms
  serialport/bindings/poller Polling for "readable" +5ms
  serialport/bindings/poller received "readable" +0ms
  serialport/binding-abstract read +1ms
  serialport/bindings/unixRead Starting read +1ms
  serialport/bindings/unixRead Finished read 26 bytes +0ms
  serialport/stream binding.read finished +1ms
  unpi:parser <-- [254,21,85,3,0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,95,0,0,0,14,17] +1ms
  unpi:parser --- parseNext [254,21,85,3,0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,95,0,0,0,14,17] +0ms
  unpi:parser --> parsed 21 - 2 - 21 - 3 - [0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,95,0,0,0,14] - 17 +1ms
  cc-znp Frame {
  cc-znp   type: 'AREQ',
  cc-znp   subsystem: 21,
  cc-znp   commandID: 3,
  cc-znp   data:
  cc-znp    [ 0, 100, 146, 112, 1, 100, 146, 112, 1, 0, 0, 0, 0, 0, 2, 1, 95, 0, 0, 0, 14 ],
  cc-znp   length: 21,
  cc-znp   fcs: 17,
  cc-znp   csum: 17,
  cc-znp   sof: 254,
  cc-znp   len: 21,
  cc-znp   subsys: 'GREENPOWER',
  cc-znp   cmd: 'secReq',
  cc-znp   payload:
  cc-znp    { applicationID: 0,
  cc-znp      srcID: 24154724,
  cc-znp      gdpIeeeAddr: '0x0000000001709264',
  cc-znp      endpoint: 0,
  cc-znp      gpdfSecurityLevel: 2,
  cc-znp      gpdfSecurityFrameCounter: 1,
  cc-znp      dgpStubHandle: 95 } } +3ms
  unpi:parser --- parseNext [] +1ms
  serialport/stream _read reading +2ms
  serialport/binding-abstract read +2ms
  serialport/bindings/unixRead Starting read +2ms
  cc-znp:AREQ <-- GREENPOWER:secReq, { applicationID: 0, srcID: 24154724, gdpIeeeAddr: '0x0000000001709264', endpoint: 0, gpdfSecurityLevel: 2, gpdfSecurityFrameCounter: 1, dgpStubHandle: 95 } +3ms
  zigbee-shepherd:msgHdlr IND <-- GREENPOWER:secReq +3ms
  serialport/bindings/unixRead Finished read 26 bytes +0ms
  serialport/stream binding.read finished +0ms
  unpi:parser <-- [254,21,85,3,0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,95,0,0,0,15,16] +0ms
  unpi:parser --- parseNext [254,21,85,3,0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,95,0,0,0,15,16] +0ms
  unpi:parser --> parsed 21 - 2 - 21 - 3 - [0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,95,0,0,0,15] - 16 +0ms
  cc-znp Frame {
  cc-znp   type: 'AREQ',
  cc-znp   subsystem: 21,
  cc-znp   commandID: 3,
  cc-znp   data:
  cc-znp    [ 0, 100, 146, 112, 1, 100, 146, 112, 1, 0, 0, 0, 0, 0, 2, 1, 95, 0, 0, 0, 15 ],
  cc-znp   length: 21,
  cc-znp   fcs: 16,
  cc-znp   csum: 16,
  cc-znp   sof: 254,
  cc-znp   len: 21,
  cc-znp   subsys: 'GREENPOWER',
  cc-znp   cmd: 'secReq',
  cc-znp   payload:
  cc-znp    { applicationID: 0,
  cc-znp      srcID: 24154724,
  cc-znp      gdpIeeeAddr: '0x0000000001709264',
  cc-znp      endpoint: 0,
  cc-znp      gpdfSecurityLevel: 2,
  cc-znp      gpdfSecurityFrameCounter: 1,
  cc-znp      dgpStubHandle: 95 } } +2ms
  unpi:parser --- parseNext [] +2ms
  serialport/stream _read reading +2ms
  serialport/binding-abstract read +2ms
  serialport/bindings/unixRead Starting read +2ms
  cc-znp:AREQ <-- GREENPOWER:secReq, { applicationID: 0, srcID: 24154724, gdpIeeeAddr: '0x0000000001709264', endpoint: 0, gpdfSecurityLevel: 2, gpdfSecurityFrameCounter: 1, dgpStubHandle: 95 } +2ms
  zigbee-shepherd:msgHdlr IND <-- GREENPOWER:secReq +2ms
  serialport/bindings/unixRead waiting for readable because of code: EAGAIN +0ms
  serialport/bindings/poller Polling for "readable" +4ms
  serialport/bindings/poller received "readable" +130ms
  serialport/binding-abstract read +130ms
  serialport/bindings/unixRead Starting read +130ms
  serialport/bindings/unixRead Finished read 26 bytes +1ms
  serialport/stream binding.read finished +131ms
  unpi:parser <-- [254,21,85,3,0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,96,0,0,0,16,48] +131ms
  unpi:parser --- parseNext [254,21,85,3,0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,96,0,0,0,16,48] +0ms
  unpi:parser --> parsed 21 - 2 - 21 - 3 - [0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,96,0,0,0,16] - 48 +0ms
  cc-znp Frame {
  cc-znp   type: 'AREQ',
  cc-znp   subsystem: 21,
  cc-znp   commandID: 3,
  cc-znp   data:
  cc-znp    [ 0, 100, 146, 112, 1, 100, 146, 112, 1, 0, 0, 0, 0, 0, 2, 1, 96, 0, 0, 0, 16 ],
  cc-znp   length: 21,
  cc-znp   fcs: 48,
  cc-znp   csum: 48,
  cc-znp   sof: 254,
  cc-znp   len: 21,
  cc-znp   subsys: 'GREENPOWER',
  cc-znp   cmd: 'secReq',
  cc-znp   payload:
  cc-znp    { applicationID: 0,
  cc-znp      srcID: 24154724,
  cc-znp      gdpIeeeAddr: '0x0000000001709264',
  cc-znp      endpoint: 0,
  cc-znp      gpdfSecurityLevel: 2,
  cc-znp      gpdfSecurityFrameCounter: 1,
  cc-znp      dgpStubHandle: 96 } } +134ms
  unpi:parser --- parseNext [] +3ms
  serialport/stream _read reading +3ms
  serialport/binding-abstract read +4ms
  serialport/bindings/unixRead Starting read +3ms
  cc-znp:AREQ <-- GREENPOWER:secReq, { applicationID: 0, srcID: 24154724, gdpIeeeAddr: '0x0000000001709264', endpoint: 0, gpdfSecurityLevel: 2, gpdfSecurityFrameCounter: 1, dgpStubHandle: 96 } +135ms
  zigbee-shepherd:msgHdlr IND <-- GREENPOWER:secReq +135ms
  serialport/bindings/unixRead waiting for readable because of code: EAGAIN +1ms
  serialport/bindings/poller Polling for "readable" +5ms
  serialport/bindings/poller received "readable" +0ms
  serialport/binding-abstract read +1ms
  serialport/bindings/unixRead Starting read +0ms
  serialport/bindings/unixRead Finished read 26 bytes +0ms
  serialport/stream binding.read finished +1ms
  unpi:parser <-- [254,21,85,3,0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,96,0,0,0,17,49] +2ms
  unpi:parser --- parseNext [254,21,85,3,0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,96,0,0,0,17,49] +0ms
  unpi:parser --> parsed 21 - 2 - 21 - 3 - [0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,96,0,0,0,17] - 49 +0ms
  cc-znp Frame {
  cc-znp   type: 'AREQ',
  cc-znp   subsystem: 21,
  cc-znp   commandID: 3,
  cc-znp   data:
  cc-znp    [ 0, 100, 146, 112, 1, 100, 146, 112, 1, 0, 0, 0, 0, 0, 2, 1, 96, 0, 0, 0, 17 ],
  cc-znp   length: 21,
  cc-znp   fcs: 49,
  cc-znp   csum: 49,
  cc-znp   sof: 254,
  cc-znp   len: 21,
  cc-znp   subsys: 'GREENPOWER',
  cc-znp   cmd: 'secReq',
  cc-znp   payload:
  cc-znp    { applicationID: 0,
  cc-znp      srcID: 24154724,
  cc-znp      gdpIeeeAddr: '0x0000000001709264',
  cc-znp      endpoint: 0,
  cc-znp      gpdfSecurityLevel: 2,
  cc-znp      gpdfSecurityFrameCounter: 1,
  cc-znp      dgpStubHandle: 96 } } +3ms
  unpi:parser --- parseNext [] +2ms
  serialport/stream _read reading +3ms
  serialport/binding-abstract read +3ms
  serialport/bindings/unixRead Starting read +3ms
  cc-znp:AREQ <-- GREENPOWER:secReq, { applicationID: 0, srcID: 24154724, gdpIeeeAddr: '0x0000000001709264', endpoint: 0, gpdfSecurityLevel: 2, gpdfSecurityFrameCounter: 1, dgpStubHandle: 96 } +3ms
  zigbee-shepherd:msgHdlr IND <-- GREENPOWER:secReq +3ms
  serialport/bindings/unixRead Finished read 26 bytes +0ms
  serialport/stream binding.read finished +0ms
  unpi:parser <-- [254,21,85,3,0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,96,0,0,0,18,50] +1ms
  unpi:parser --- parseNext [254,21,85,3,0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,96,0,0,0,18,50] +0ms
  unpi:parser --> parsed 21 - 2 - 21 - 3 - [0,100,146,112,1,100,146,112,1,0,0,0,0,0,2,1,96,0,0,0,18] - 50 +0ms
  cc-znp Frame {
  cc-znp   type: 'AREQ',
  cc-znp   subsystem: 21,
  cc-znp   commandID: 3,
  cc-znp   data:
  cc-znp    [ 0, 100, 146, 112, 1, 100, 146, 112, 1, 0, 0, 0, 0, 0, 2, 1, 96, 0, 0, 0, 18 ],
  cc-znp   length: 21,
  cc-znp   fcs: 50,
  cc-znp   csum: 50,
  cc-znp   sof: 254,
  cc-znp   len: 21,
  cc-znp   subsys: 'GREENPOWER',
  cc-znp   cmd: 'secReq',
  cc-znp   payload:
  cc-znp    { applicationID: 0,
  cc-znp      srcID: 24154724,
  cc-znp      gdpIeeeAddr: '0x0000000001709264',
  cc-znp      endpoint: 0,
  cc-znp      gpdfSecurityLevel: 2,
  cc-znp      gpdfSecurityFrameCounter: 1,
  cc-znp      dgpStubHandle: 96 } } +4ms
  unpi:parser --- parseNext [] +1ms
  serialport/stream _read reading +2ms
  serialport/binding-abstract read +2ms
  serialport/bindings/unixRead Starting read +2ms
  cc-znp:AREQ <-- GREENPOWER:secReq, { applicationID: 0, srcID: 24154724, gdpIeeeAddr: '0x0000000001709264', endpoint: 0, gpdfSecurityLevel: 2, gpdfSecurityFrameCounter: 1, dgpStubHandle: 96 } +2ms
  zigbee-shepherd:msgHdlr IND <-- GREENPOWER:secReq +3ms
  serialport/bindings/unixRead waiting for readable because of code: EAGAIN +1ms
  serialport/bindings/poller Polling for "readable" +6ms

@mabels
Copy link
Author

mabels commented Sep 5, 2019

I testest yesterday a bit more. And the Z-Stack 3.0 CC2531 sadly stops working completly after around 4-5 Received messages from the Switch.
Do you have any idea why, or how to debug?

@Koenkk
Copy link
Owner

Koenkk commented Sep 5, 2019

I've also experienced this with my Hue Tap. I think that the device needs to be commissioned into the network, but it's unclear for me how to do this (that's where I got stuck).

@stale
Copy link

stale bot commented Nov 4, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 4, 2019
@jk
Copy link

jk commented Nov 4, 2019

Any news? Issue should not be closed by the bot.

@Koenkk
Copy link
Owner

Koenkk commented Nov 15, 2019

I've did some initial implementation but I need your help guys to test (very experimental).

On a bare metal install:

# Go to zigbee2mqtt directory
cd node_modules
rm -rf zigbee-herdsman
git clone https://github.com/Koenkk/zigbee-herdsman.git -b feature/greenpower
cd zigbee-herdsman
npm install 
npm run build # this will give 3 errors but can be ignored

After this start zigbee2mqtt and start sniffing the network (https://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html).

Also make sure that there is at least one Hue bulb in the network (this will act as the green power proxy).

Now reset the device, on the Hue tap I needed to hold either buttton 1, 2 or 3 depending on the channel (1=15, 2=20, 3=25) for 10 seconds.

After this zigbee2mqtt should log output when pressing a button on the device. If it doesn't work please share the sniffer logs.

@cmorlok
Copy link

cmorlok commented Nov 24, 2019 via email

@Koenkk
Copy link
Owner

Koenkk commented Nov 25, 2019

@cmorlok I haven't seen any other devices providing this yet.

@cmorlok
Copy link

cmorlok commented Nov 25, 2019 via email

@Koenkk
Copy link
Owner

Koenkk commented Nov 25, 2019

@cmorlok it's not a hardware limitation, hopefully in the future we might be able to adapt the firmware correctly.

@gvdhoven
Copy link

@Koenkk great work so far, is my assumption correct that:

  • Support for the Hue Smart Switch is experimental
  • If you reset your Friends of Hue Smart Switch this way; it will no longer be connected to the Hue app?
  • But you will gain immediate feedback when pressing a button without the need for a high polling frequency on the Hue bridge?

@Koenkk
Copy link
Owner

Koenkk commented Nov 27, 2019

I don't know anything about how it works with the hue bridge, but when connected with zigbee2mqtt, the hue hub is completely out of the picture.

@gvdhoven
Copy link

gvdhoven commented Nov 27, 2019

Also make sure that there is at least one Hue bulb in the network (this will act as the green power proxy).

@Koenkk would a powered router also suffice like you have described in your documentation? Or can only a Hue bulb act as a 'sink' (excuse the terminology knowledge gap)?

@Koenkk
Copy link
Owner

Koenkk commented Nov 28, 2019

@webunity for know only Hue bulbs provide this, but could possibly be added to a CC2531 router firmware later. (but I first want to know if this feature works at all).

@oepoemoepoe
Copy link

@Koenkk I will test your instructions as soon as I get my CC2531 and set everything up. I will also contribute 1 or 2 new lights. I just found out about this possibility to connect more Zigbee devices than with my Hue and must say I love the fact that contributing to it is so easy!

@swannes
Copy link

swannes commented Dec 18, 2019

Can we sponsor hardware to Koen so he can work on this directly (without any promisses regarding suport for said device!!)

@TheNetStriker
Copy link

TheNetStriker commented Dec 23, 2019

@Koenkk I've just tried to test this but I've got the following compilation error:

> [email protected] build /opt/zigbee2mqtt_master/node_modules/zigbee-herdsman
> tsc

src/controller/greenPower.ts:33:32 - error TS2339: Property 'znp' does not exist on type 'Adapter'.

33             await this.adapter.znp.request(5, 'extAddGroup', {endpoint: 242, groupid: 0x0b84, namelen: 0, groupname:[]});
                                  ~~~

src/zcl/buffaloZcl.ts:180:21 - error TS2339: Property 'message' does not exist on type 'Options'.

180         if (options.message.commandID === 224) {
                        ~~~~~~~

src/zcl/zclFrame.ts:231:25 - error TS2339: Property 'message' does not exist on type 'Options'.

231                 options.message = payload;
                            ~~~~~~~


Found 3 errors.

I've tried it with the release and master branch but always got those errors. What am I doing wrong?

Edit: I just read that those errors are normal. I was able to start the software but I didn't receive any messages from my Hue Tap. I checked if the packets are sent with the SmartRF Sniffer from Texas Instruments and I could see the packages from the Hue Tap on my channel. Any idea what could be missing? Do I need a newer firmware to get this to work? (I've installed the CC1352P_2_20191106 firmware)

By the way, the Hue Tap has 4 buttons to set channels. (1=11, 2=15, 3=20, 4=25)

@Koenkk
Copy link
Owner

Koenkk commented Dec 26, 2019

@TheNetStriker can you share the sniffer logs?

@TheNetStriker
Copy link

@Koenkk No problem, I've uploaded a capture file from the SmartRF Packet Sniffer to my Dropbox: https://www.dropbox.com/s/i0o42ibaelqim3a/HueTap.psd?dl=0

There are three packets for every button press. I pressed every button on the Hue tap, so there are 12 packets captured.

@Koenkk
Copy link
Owner

Koenkk commented Jan 1, 2020

@TheNetStriker sorry but could you please sniff with wireshark? https://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html

@TheNetStriker
Copy link

@Koenkk I've just uploaded the Wireshark capture here: https://www.dropbox.com/s/pk1jt5h5yvtkb36/HueTap.pcapng?dl=0

I could not register for the ZBOSS software because I didn't get the activation e-mail, so I created a capture using the zsmartsystems sniffer. I hope this also works for you.

@Koenkk
Copy link
Owner

Koenkk commented Jan 7, 2020

@TheNetStriker do you also have a hue bulb in range of the hue tap? Can you provide the sniffer logs when starting with:

Now reset the device, on the Hue tap I needed to hold either buttton 1, 2 or 3 depending on the channel (1=15, 2=20, 3=25) for 10 seconds.

#22 (comment)

@Josov
Copy link

Josov commented Mar 13, 2020

@Koenkk I have several models a double rocker for HUE only and GENERIC Zigbee switches single and double rocker. The HUE switch is currently in The Netherlands. I propose to send you one of each.

@Koenkk
Copy link
Owner

Koenkk commented Apr 7, 2020

Thanks to @Josov I've got an initial implementation.

Demo:

@juamiso
Copy link

juamiso commented Apr 8, 2020

I really want to install battery-less Switches at home to use them via zigbee and iobroker. Do you recommend the friends of hue smart switch or which one do you plan to support? I've read that the Philips hue tap ist not very good in haptic.
Great job!

@TheNetStriker
Copy link

@Koenkk Looks great! Is it already possible to test this myself?

@cmorlok
Copy link

cmorlok commented Apr 9, 2020

@TheNetStriker The branch where the development happens was mentioned above: https://github.com/Koenkk/zigbee-herdsman/commits/feature/greenpower

@Koenkk
Copy link
Owner

Koenkk commented Apr 9, 2020

Soon it will be available.

@mdhom
Copy link

mdhom commented Apr 9, 2020

Absolutely amazing! Will it instantly support all GreenPower devices, or only the two mentioned above? I've got the Gira Friends of Hue Switch which i'd love to integrate...

@Koenkk
Copy link
Owner

Koenkk commented Apr 9, 2020

Probably all of these friends of hue switch will be supported (only tested with a Niko but I expect others will also work).

Koenkk added a commit to Koenkk/zigbee2mqtt.io that referenced this issue Apr 9, 2020
@Koenkk
Copy link
Owner

Koenkk commented Apr 9, 2020

Implemented, discussion: Koenkk/zigbee2mqtt#3322

@Koenkk Koenkk closed this as completed Apr 9, 2020
Koenkk added a commit to Koenkk/zigbee2mqtt.io that referenced this issue Apr 17, 2020
@JHurk
Copy link

JHurk commented May 1, 2020

@mdhom I am interested in buying one or more Senic Gira Friends of Hue switches, can you confirm that they work with the current version of Zigbee2MQTT? I see you have them and asked @Koenkk if they work, I would really like to know before I buy one of them.

@mdhom
Copy link

mdhom commented May 1, 2020

I haven't tested it yet because i a had other big troubles with my Installation, but i could test it tomorrow!

@JHurk
Copy link

JHurk commented May 1, 2020

@mdhom thanks that would be nice. Look forward to hear from you, take your time, no rush.

@mdhom
Copy link

mdhom commented May 2, 2020

@Koenkk is there already a docker image available containing the new Feature?

@Koenkk
Copy link
Owner

Koenkk commented May 2, 2020

@mdhom green power support is available in the latest release (zigbee2mqtt 1.13.0)

@mdhom
Copy link

mdhom commented May 2, 2020

It somehow worked and somehow didn't 😅 Tested it with the Senic Friends of Hue Smart Switch. I was prepared to keep the up right button pressed for some time for pairing (read that anywhere), but exactly when i pressed that button, the following error appeared (but only in console, not in log file):

(node:51436) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
    at Cipheriv.update (internal/crypto/cipher.js:155:11)
    at GreenPower.encryptSecurityKey (C:\s\Koenkk\zigbee2mqtt\node_modules\zigbee-herdsman\dist\controller\greenPower.js:50:34)
    at GreenPower.<anonymous> (C:\s\Koenkk\zigbee2mqtt\node_modules\zigbee-herdsman\dist\controller\greenPower.js:57:34)    at Generator.next (<anonymous>)
    at C:\s\Koenkk\zigbee2mqtt\node_modules\zigbee-herdsman\dist\controller\greenPower.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (C:\s\Koenkk\zigbee2mqtt\node_modules\zigbee-herdsman\dist\controller\greenPower.js:4:12)
    at GreenPower.onZclGreenPowerData (C:\s\Koenkk\zigbee2mqtt\node_modules\zigbee-herdsman\dist\controller\greenPower.js:54:16)
    at Controller.<anonymous> (C:\s\Koenkk\zigbee2mqtt\node_modules\zigbee-herdsman\dist\controller\controller.js:405:37)
    at Generator.next (<anonymous>)
(node:51436) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:51436) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Shortly after that error message, the following log appeared, looking like actually pairing was successfull:

info  2020-05-02 20:07:23: Device '0x0000000001715f61' joined
info  2020-05-02 20:07:23: Successfully interviewed '0x0000000001715f61', device has successfully been paired
info  2020-05-02 20:07:23: Device '0x0000000001715f61' is supported, identified as: GreenPower On/off switch (GreenPower_On_Off_Switch)
info  2020-05-02 20:07:23: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":{"friendly_name":"0x0000000001715f61"}}'
info  2020-05-02 20:07:23: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_successful","meta":{"friendly_name":"0x0000000001715f61","model":"GreenPower_On_Off_Switch","vendor":"GreenPower","description":"On/off switch","supported":true}}'

Now, when i press one of the four buttons, i can see these logs:

info  2020-05-02 20:07:48: MQTT publish: topic 'zigbee2mqtt/0x0000000001715f61', payload '{"action":"recall_scene_1","linkquality":78}'
info  2020-05-02 20:07:48: MQTT publish: topic 'zigbee2mqtt/0x0000000001715f61', payload '{"linkquality":13,"action":"recall_scene_5"}'
info  2020-05-02 20:07:52: MQTT publish: topic 'zigbee2mqtt/0x0000000001715f61', payload '{"linkquality":144,"action":"press_1_of_2"}'
info  2020-05-02 20:07:52: MQTT publish: topic 'zigbee2mqtt/0x0000000001715f61', payload '{"linkquality":141,"action":"release_1_of_2"}'
info  2020-05-02 20:07:57: MQTT publish: topic 'zigbee2mqtt/0x0000000001715f61', payload '{"linkquality":81,"action":"recall_scene_1"}'
info  2020-05-02 20:07:57: MQTT publish: topic 'zigbee2mqtt/0x0000000001715f61', payload '{"linkquality":0,"action":"recall_scene_5"}'
info  2020-05-02 20:08:02: MQTT publish: topic 'zigbee2mqtt/0x0000000001715f61', payload '{"linkquality":144,"action":"recall_scene_1"}'
info  2020-05-02 20:08:03: MQTT publish: topic 'zigbee2mqtt/0x0000000001715f61', payload '{"linkquality":0,"action":"recall_scene_5"}'
info  2020-05-02 20:08:05: MQTT publish: topic 'zigbee2mqtt/0x0000000001715f61', payload '{"linkquality":144,"action":"recall_scene_0"}'
info  2020-05-02 20:08:05: MQTT publish: topic 'zigbee2mqtt/0x0000000001715f61', payload '{"linkquality":5,"action":"recall_scene_4"}'

recall_scene_XY logs appear when i press / release one single button, press_XY_of_2 appears when i press both upper / lower buttons at the same time.

And then, after some playing around with the switch, suddenly my only light bulb switched on (on a completely blank installation, no clue how that could happen?!). And shortly after that, i got error log:

zigbee2mqtt:error 2020-05-02 20:08:23: Adapter disconnected, stopping
zigbee2mqtt:info  2020-05-02 20:08:23: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'offline'
zigbee2mqtt:info  2020-05-02 20:08:23: Disconnecting from MQTT server
zigbee2mqtt:error 2020-05-02 20:08:23: Failed to stop zigbee
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\maxdh\AppData\Roaming\npm-cache\_logs\2020-05-02T18_08_23_875Z-debug.log

The content of that log file can be found here: https://pastebin.com/vz0cMgyk

@Koenkk
Copy link
Owner

Koenkk commented May 4, 2020

@mdhom what firmware are you running? Have you been able to start it after this?

@hb0nes
Copy link

hb0nes commented Feb 3, 2021

Hey Koenkk. I have an EnOcean switch here (Senic & Gira 4 button switch) but don't have any Hue devices yet. Am I correct in assuming this is why I see nothing in my zigbee2mqtt logs?

@Koenkk
Copy link
Owner

Koenkk commented Oct 30, 2021

@hb0nes probably yes, you will need a green power proxy (which I know hue devices are capable of)

@bamaas
Copy link

bamaas commented Nov 18, 2021

Hi Koen, I've paired the Gira Senic switch (Seen as EnOcean PTM 215Z) but no action/clicks are being registered. I'm running zigbee2mqtt 1.22.

Do I maybe need to update the router/stick?

@Koenkk
Copy link
Owner

Koenkk commented Nov 18, 2021

@bamaas do you see anything in the debug log when clicking?

See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable debug logging.

@bamaas
Copy link

bamaas commented Nov 19, 2021

@Koenkk No. I only see the device being configured in the logging. I've attached the debug log for your reference.

IEEE address: 0x000000000174d06f (0xD06F)
Friendly name: 0x000000000174d06f

Coordinator type: zStack3x0

debuglog.txt

@Koenkk
Copy link
Owner

Koenkk commented Nov 19, 2021

I see this info is not listed on the PTM 215Z page, but did you confirm the channel after selecting the channel? See the pairing procedure of the PTM 216Z: https://www.zigbee2mqtt.io/devices/PTM_216Z.html#pairing

@bamaas
Copy link

bamaas commented Nov 20, 2021

Ow great! I've finally get it to work. The missing step was indeed the confirm channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests