Giter VIP home page Giter VIP logo

Comments (67)

Koenkk avatar Koenkk commented on July 17, 2024 11

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

Demo:

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024 3

Soon it will be available.

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024 2

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

from zigbee-herdsman.

mabels avatar mabels commented on July 17, 2024 1

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.

from zigbee-herdsman.

juamiso avatar juamiso commented on July 17, 2024 1

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!

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024 1

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

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

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.

from zigbee-herdsman.

mabels avatar mabels commented on July 17, 2024

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

from zigbee-herdsman.

mabels avatar mabels commented on July 17, 2024

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?

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

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).

from zigbee-herdsman.

stale avatar stale commented on July 17, 2024

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.

from zigbee-herdsman.

jk avatar jk commented on July 17, 2024

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

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

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.

from zigbee-herdsman.

cmorlok avatar cmorlok commented on July 17, 2024

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

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

from zigbee-herdsman.

cmorlok avatar cmorlok commented on July 17, 2024

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

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

from zigbee-herdsman.

gvdhoven avatar gvdhoven commented on July 17, 2024

@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?

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

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.

from zigbee-herdsman.

gvdhoven avatar gvdhoven commented on July 17, 2024

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)?

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

@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).

from zigbee-herdsman.

oepoemoepoe avatar oepoemoepoe commented on July 17, 2024

@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!

from zigbee-herdsman.

swannes avatar swannes commented on July 17, 2024

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

from zigbee-herdsman.

TheNetStriker avatar TheNetStriker commented on July 17, 2024

@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)

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

@TheNetStriker can you share the sniffer logs?

from zigbee-herdsman.

TheNetStriker avatar TheNetStriker commented on July 17, 2024

@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.

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

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

from zigbee-herdsman.

TheNetStriker avatar TheNetStriker commented on July 17, 2024

@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.

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

@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)

from zigbee-herdsman.

TheNetStriker avatar TheNetStriker commented on July 17, 2024

@Koenkk Yes I only have Hue bulbs in my network. (32 in total) there should be lots of lamps in range.

What exactly do you mean? Do you need sniffer logs when resetting the Hue Tap or do you need all packets from my network including the Hue Tap ones? If you need all packets there would be a lot of them because the high amount of lamps in my network.

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

I need the logs when resetting the hue tap including other devices (because an other device, e.g bulb commissions it into the network), perhaps you can setup a separate environment for this.

from zigbee-herdsman.

TheNetStriker avatar TheNetStriker commented on July 17, 2024

@Koenkk I have a second Zigbee usb stick. I could make a separate network for testing the Hue Smart Switch.

But does the Smart Switch really require such a commission into the network? As far as I know the Smart Switch just sends out a broadcast on the channel and every Zigbee controller can receive this broadcast, but the switch is not able to receive anything because of the limited amount of energy. The controller just needs to remember to which broadcast to react to and which to ignore. Did I understand this correctly or is there indeed a two way communication?

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

@TheNetStriker

Due to energy limitations, the message size of a Hue tap (= Green power device) are much smaller. This protocol is called green power. Normal zigbee devices don't understand this protocol, therefore you need to have a green power proxy (e.g. a Hue bulb) which translates a green power message to a normal zigbee message so that other devices on the network can understand it. But before the green power proxy will start proxying the message, the green power device first has to be commissioned into the network. There is indeed no two-way communication.

from zigbee-herdsman.

oepoemoepoe avatar oepoemoepoe commented on July 17, 2024

@Koenkk I only have one CC2531, so I cannot sniff at the same time. However, I can offer you to sniff my Hue system with the Hue Tap. Is that of any help?

Edit: I also do not get any output on zigbee2mqtt with all logging on (incl. herdsman). I tried with button 1 (which I also have to use in Hue) to pair, I am on channel 11.

On the theoretical side: I do not have a single Hue-bulb, but a lot of other devices (OSRAM Smart Plug, Paul Neuhaus lights etc) and still I can use the Hue Tap in my hue network. So why do we need a hue bulb to commission it?
edit: Got it, the hue bridge probably can understand the message :)

from zigbee-herdsman.

TheNetStriker avatar TheNetStriker commented on July 17, 2024

@Koenkk Thanks for the info. Do you know if the CC2531 would be able to receive such a green power message? Because as I said I sniffed the packets on a separate frequency where no devices are in range and I was able to sniff packages from the Hue Tap.

Also how would this comissioning into the network work exactly? Do I have to put the coordinator into pairing mode or is this something the Hue bulbs do directly?

from zigbee-herdsman.

oepoemoepoe avatar oepoemoepoe commented on July 17, 2024

@Koenkk Thanks for the info. Do you know if the CC2531 would be able to receive such a green power message? Because as I said I sniffed the packets on a separate frequency where no devices are in range and I was able to sniff packages from the Hue Tap.

Also how would this comissioning into the network work exactly? Do I have to put the coordinator into pairing mode or is this something the Hue bulbs do directly?

To my understanding, you just need to have a Hue bulb in the same network with which you want to pair the Hue Tap with. Then zigbee2mqtt should do something (at least print out) when you try to pair it.
This can in the future be done without a Hue bulb, wherefore a firmware upgrade of the CC2531 is necessary however. For now Koenkk wants us to test without.
And of course the coordinator must be in pairing mode to pair.

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

Maybe in the future the CC can act as a proxy, however for now this is not possible with the TI firmware: https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread/f/158/t/856997

from zigbee-herdsman.

TheNetStriker avatar TheNetStriker commented on July 17, 2024

@Koenkk I've just tried this and now it worked! I got the following output in the console while comissioning the Hue Tap:

{
  options: 0,
  srcID: 4223047,
  frameCounter: 186,
  commandID: 224,
  payloadSize: 27,
  commandFrame: {
    deviceID: 2,
    options: 129,
    extendedOptions: 242,
    securityKey: hidden,
    keyMic: 640474694,
    outgoingCounter: 954
  }
}

But when I push the buttons after that I get no output in the console.

from zigbee-herdsman.

oepoemoepoe avatar oepoemoepoe commented on July 17, 2024

@Koenkk Since it seems that firmware modification is too complex, do you think it will ever be supported?
Also, do you know whether the Hue Smart Plug can act as a proxy, too?

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

@oepoemoepoe I really depends on Texas Instruments (I'm at least not going to develop this).

@TheNetStriker good to see, I'm going to buy another green power device as I think the security key required for commissioning differs per device (and I'm not sure how to handle this yet).

from zigbee-herdsman.

TheNetStriker avatar TheNetStriker commented on July 17, 2024

@Koenkk I have several Hue Tap switches and I just wanted to test this, but for some reason the console output doesn't work anymore. On startup I also get the MQTT publish: topic 'zigbee2mqtt/bridge/config' log with "permit_join":false even though I've enabled this value. Any idea what could cause this?

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

Im not sure perhaps the debug logging can give some insight

from zigbee-herdsman.

TheNetStriker avatar TheNetStriker commented on July 17, 2024

@Koenkk I get the following error when starting the greenpower version:

(node:5475) UnhandledPromiseRejectionWarning: Error: SREQ '--> ZDO - extAddGroup - {"endpoint":242,"groupid":2948,"namelen":0,"groupname":[]}' failed with status '184' (expected '0')
    at Znp.<anonymous> (/opt/zigbee2mqtt_master/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:245:27)
    at Generator.next (<anonymous>)
    at fulfilled (/opt/zigbee2mqtt_master/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:5:58)

I also deleted the database and all groups, but the error is still there. Could this be the cause that this doesn't work anymore?

Edit: The error only occurs when I enable the permit_join configuration, so I guess this could be the cause of the problem.

from zigbee-herdsman.

oepoemoepoe avatar oepoemoepoe commented on July 17, 2024

I have a Hue Plug now which acts as a proxy and I can confirm what @TheNetStriker is saying. I get this output when trying to pair:

zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - incomingMsg - {"groupid":0,"clusterid":33,"srcaddr":64695,"srcendpoint":242,"dstendpoint":242,"wasbroadcast":1,"linkquality":141,"securityuse":0,"timestamp":14191052,"transseqnumber":0,"len":22,"data":{"type":"Buffer","data":[17,0,4,32,11,183,252,71,0,200,0,0,0,34,0,198,48,219,107,200,183,59]}} +2s zigbee-herdsman:controller:log Received 'zcl' data '{"frame":{"Header":{"frameControl":{"frameType":1,"manufacturerSpecific":false,"direction":0,"disableDefaultResponse":true},"transactionSequenceNumber":0,"manufacturerCode":null,"commandIdentifier":4},"Payload":{"options":2848,"srcID":4717751,"frameCounter":200,"commandID":34,"payloadSize":0,"commandFrame":{}},"Cluster":{"ID":33,"attributes":{},"name":"greenPower","commands":{"notification":{"ID":0,"parameters":[{"name":"options","type":33},{"name":"srcID","type":35},{"name":"frameCounter","type":35},{"name":"commandID","type":32},{"name":"payloadSize","type":32},{"name":"commandFrame","type":1007}],"name":"notification"},"commisioningNotification":{"ID":4,"parameters":[{"name":"options","type":33},{"name":"srcID","type":35},{"name":"frameCounter","type":35},{"name":"commandID","type":32},{"name":"payloadSize","type":32},{"name":"commandFrame","type":1007}],"name":"commisioningNotification"}},"commandsResponse":{"pairing":{"ID":1,"parameters":[{"name":"options","type":34},{"name":"srcID","type":35},{"name":"sinkGroupID","type":33},{"name":"deviceID","type":32},{"name":"frameCounter","type":35},{"name":"gpdKey","type":1001}],"name":"pairing"},"commisioningMode":{"ID":2,"parameters":[{"name":"options","type":32},{"name":"commisioningWindow","type":33}],"name":"commisioningMode"}}}},"networkAddress":64695,"endpoint":242,"linkquality":141,"groupID":0}' +2s { options: 2848, srcID: 4717751, frameCounter: 200, commandID: 34, payloadSize: 0, commandFrame: {} }
and afterwards:
zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - incomingMsg - {"groupid":0,"clusterid":33,"srcaddr":64695,"srcendpoint":242,"dstendpoint":242,"wasbroadcast":1,"linkquality":141,"securityuse":0,"timestamp":14242644,"transseqnumber":0,"len":45,"data":{"type":"Buffer","data":[17,1,4,0,8,183,252,71,0,201,0,0,0,224,27,2,129,242,104,61,188,120,123,162,166,202,218,34,183,96,82,182,93,100,217,66,151,241,201,0,0,0,198,48,217]}} +4s zigbee-herdsman:controller:log Received 'zcl' data '{"frame":{"Header":{"frameControl":{"frameType":1,"manufacturerSpecific":false,"direction":0,"disableDefaultResponse":true},"transactionSequenceNumber":1,"manufacturerCode":null,"commandIdentifier":4},"Payload":{"options":2048,"srcID":4717751,"frameCounter":201,"commandID":224,"payloadSize":27,"commandFrame":{"deviceID":2,"options":129,"extendedOptions":242,"securityKey":{"type":"Buffer","data":[104,61,188,120,123,162,166,202,218,34,183,96,82,182,93,100]},"keyMic":4053222105,"outgoingCounter":201}},"Cluster":{"ID":33,"attributes":{},"name":"greenPower","commands":{"notification":{"ID":0,"parameters":[{"name":"options","type":33},{"name":"srcID","type":35},{"name":"frameCounter","type":35},{"name":"commandID","type":32},{"name":"payloadSize","type":32},{"name":"commandFrame","type":1007}],"name":"notification"},"commisioningNotification":{"ID":4,"parameters":[{"name":"options","type":33},{"name":"srcID","type":35},{"name":"frameCounter","type":35},{"name":"commandID","type":32},{"name":"payloadSize","type":32},{"name":"commandFrame","type":1007}],"name":"commisioningNotification"}},"commandsResponse":{"pairing":{"ID":1,"parameters":[{"name":"options","type":34},{"name":"srcID","type":35},{"name":"sinkGroupID","type":33},{"name":"deviceID","type":32},{"name":"frameCounter","type":35},{"name":"gpdKey","type":1001}],"name":"pairing"},"commisioningMode":{"ID":2,"parameters":[{"name":"options","type":32},{"name":"commisioningWindow","type":33}],"name":"commisioningMode"}}}},"networkAddress":64695,"endpoint":242,"linkquality":141,"groupID":0}' +4s { options: 2048, srcID: 4717751, frameCounter: 201, commandID: 224, payloadSize: 27, commandFrame: { deviceID: 2, options: 129, extendedOptions: 242, securityKey: <Buffer 68 3d bc 78 7b a2 a6 ca da 22 b7 60 52 b6 5d 64>, keyMic: 4053222105, outgoingCounter: 201 } }

from zigbee-herdsman.

svh1985 avatar svh1985 commented on July 17, 2024

Would love to add my Hue Tap's, how can I help? I have a lot of HUE devices and some IKEA devices in my Zigbee network.

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

I will soon buy some green power devices to continue on this.

from zigbee-herdsman.

mdhom avatar mdhom commented on July 17, 2024

I'm also very interested in that topic, i have a Senic Friends of Hue Smart Switch and could run some tests in case someone tells me what to do ;)

from zigbee-herdsman.

Josov avatar Josov commented on July 17, 2024

@Koenkk I could provide you with a sample green power switch of Enocean. Would this help?

Download link:
https://www.enocean.com/en/products/enocean_modules_24ghz/ptm-216z/user-manual-pdf/

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

@Josov is this device compatible with the Hue bridge?

from zigbee-herdsman.

Josov avatar Josov commented on July 17, 2024

@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.

from zigbee-herdsman.

TheNetStriker avatar TheNetStriker commented on July 17, 2024

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

from zigbee-herdsman.

cmorlok avatar cmorlok commented on July 17, 2024

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

from zigbee-herdsman.

mdhom avatar mdhom commented on July 17, 2024

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...

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

Implemented, discussion: Koenkk/zigbee2mqtt#3322

from zigbee-herdsman.

JHurk avatar JHurk commented on July 17, 2024

@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.

from zigbee-herdsman.

mdhom avatar mdhom commented on July 17, 2024

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

from zigbee-herdsman.

JHurk avatar JHurk commented on July 17, 2024

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

from zigbee-herdsman.

mdhom avatar mdhom commented on July 17, 2024

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

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

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

from zigbee-herdsman.

mdhom avatar mdhom commented on July 17, 2024

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

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

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

from zigbee-herdsman.

hb0nes avatar hb0nes commented on July 17, 2024

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?

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

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

from zigbee-herdsman.

bamaas avatar bamaas commented on July 17, 2024

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?

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

@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.

from zigbee-herdsman.

bamaas avatar bamaas commented on July 17, 2024

@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

from zigbee-herdsman.

bamaas avatar bamaas commented on July 17, 2024

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

from zigbee-herdsman.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.