ZHA integration support for ZGP (Zigbee Green Power) devices via zigpy?

I’ve asked the question to the zigby developers and also created a request for a new device [Device Support Request] SR-ZG2833PAC-FOH (Zigbee Push-Button Coupler) · Issue #2426 · zigpy/zha-device-handlers · GitHub

Tomorrow I will update to 2023.7 and can report if the foh switch is working or not.

1 Like

@molt Good, noted however that the formatting of your initial post there looks in need of fixing though (see logs)

1 Like

I updated to 2023.07.1 but I am still not able to pair my zgp foh-switch.

@Hedda I´ve tried to make it clearer, is it better now?

1 Like

Can you pleas shortly describe how you tried to add the FOH switch?

I am asking as the adding process from zigbee2mqtt is different from the process in the Hue App.

Maybe the right button combination and time to press them makes also the difference for ZHA?

I believe that some ZGP devices may also not pair directly to the Zigbee Coordinator butmust instead be paired/joined indirectly via a other Zigbee device like for examplea compatible lightbulb or other ZGP proxy compatible devices? Or?

@molt Formatting look right now but looked up the model you mentioned there and that device does not make sence for this thread since that Sunricher SR-ZG2833PAC-FOH does not look like a ZGP (Zigbee Green Power) device?, instead that sound like it should be just a normal Zigbee device that requires mains power if you see ZGPD is the logs then that is just because it can act as a ZGP proxy, not that it is a ZGP device itself (and all mains-powered Zigbee 3.0 devices are also Zigbee Green Power Proxy devices but that is not the same as being a ZGP device).

https://www.sunricher.com/zigbee-push-button-coupler-foh-version-sr-zg2833pac-foh.html

1 Like

Ah, okay. You’re right, then this device should work with a custom quirk and is not dependent on zgp-supported?

Can be but the Friends of Hue Switches can be paired directy. It tried to pair a switch with with the steps described for Z2M as no other docu is available for ZHA:

https://www.zigbee2mqtt.io/devices/PTM_215Z.html

  1. Press top left (A0)
  2. Press and hold top right (B0) for about 10 seconds
  3. press top right (B0) and bottom left (A1) at the same time
  4. press top left (A0) Note: Please make sure the module is positioned the right way up.

Unfortunately i was not able to add the switch via ZHA.

1 Like

Yes as that specific device is not a ZGP device it should just need a custom quirk as per → https://www.home-assistant.io/integrations/zha#how-to-add-support-for-new-and-unsupported-devices

@smartmatic I’ve tried to add the switch the same way I added it to phoscon/deconz. Works without any problems but I’m not able to add it the same way with zha.

https://phoscon.de/en/support#pairing-friends-of-hue-switch

With this button mapping, described here.

Button 1 = K3
Button 2 = K4
Button 3 = K1
Button 4 = K2

@molt better if you start a new dedicated thread specifically for that device (with its brand and model in the subject title), as it is not a ZGP device it does not make sense to continue discussing or troubleshooting that device here in this thread.

PS: @molt What @smartmatic mentioned above only applies to EnOcean PTM 215Z based ZGP devices, and again, the device @molt is asking about is not such a ZGP device based on a PTM series module from EnOcean. Not all ”FOH” (”Friends Of Hue” compatible devices are ZGP devices as some are just regular Zigbee devices.

Just to be sure: did you use the button for the ZHA Zigbee channel? Or if you used the FOH before, did you made a reset to factory default?

What do you mean with your first question?
Regarding the second question: No i did not factory reset FOH switch and i dont know how to do this?

Previously i used all my FOH switches with z2m and migrated them to the Hue Bridge without a factory reset.

How should a factory reset help? Do you know the button combinations to add the FOH switch?

I was refering to the pairing instructions from the Z2M link you posted earlier. Since Z2M uses another default Zigbee channel then ZHA, I can imagine that it is good start the reset the switch: “In case you want to pair it to a different channel you have to factory reset the device. This can be done by pressing all buttons (A0, A1, B0 and B1) simultaneously for at least 7 seconds.”

Z2M uses channel 11 and ZHA channel 15 (by default). As I read it, the appropriate pairing sequence should be:

  1. Press top left (A0)
  2. Press and hold top left (A0) for about 10 seconds
  3. press top right (B0) and bottom left (A1) at the same time
  4. press top left (A0) Note: Please make sure the module is positioned the right way up.

I have no idea if it makes any difference but I would give it a try.

In my case ZHA uses also Zigbee Channel 11 so it should not make a difference. When i have time i can test it again but i expect that i will not make a difference.

Question is if ZHA needs a different pairing sequence as Philips Hue has also a different pairing sequence compared to Z2M?

1 Like

I’ve just tried it today with my FUH Niko Switch. It works via Z2M, but not via ZHA. So no luck yet, but I’m hopeful it will be supported soon!

No, the method for factory resetting and putting devices into pairing/joining mode is entirely device firmware specific which is totally independent of which Zigbee gateway solution you are using. So you just need to read/follow the device hardware manufacturer manual for the specific device for how to factory reset it and how to put it into pairing/joining mode.

I think i made some progress as i see messages in the logs which could not parsed. So looks like the device can communicate with HA if am not wrong

Log1


Logger: bellows.ezsp.protocol
Source: runner.py:179 
First occurred: 09:58:40 (25 occurrences) 
Last logged: 10:03:19

Failed to parse frame gpepIncomingMessageHandler: b'7fd6d5003e1f71013e1f71016b02010000d5090000138a2d22a2ff00'
Failed to parse frame gpepIncomingMessageHandler: b'7cd6d6003e1f71013e1f71016b00000000ffffffffe0ffffffffff2e02c5f2a835585ccd1a43d08badddcf2ace49e86f22d7b0d609000004111011121314151617226062636465666768'
Failed to parse frame gpepIncomingMessageHandler: b'7fd6d7003e1f71013e1f71016b02010000d709000068c5233053ff00'
Failed to parse frame gpepIncomingMessageHandler: b'7fd7d8003e1f71013e1f71016b02010000d8090000100c9299c5ff00'
Failed to parse frame gpepIncomingMessageHandler: b'7fd6d9003e1f71013e1f71016b02010000d909000014baa9d58bff00'

Log2


Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:137 
First occurred: 09:58:41 (20 occurrences) 
Last logged: 10:03:19

Error doing job: Exception in callback ThreadsafeProxy.__getattr__.<locals>.func_wrapper.<locals>.check_result_wrapper() at /usr/local/lib/python3.11/site-packages/bellows/thread.py:110
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.11/site-packages/bellows/thread.py", line 111, in check_result_wrapper
    result = call()
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bellows/ezsp/__init__.py", line 339, in frame_received
    self._protocol(data)
  File "/usr/local/lib/python3.11/site-packages/bellows/ezsp/protocol.py", line 180, in __call__
    result, data = self.types.deserialize(data, schema)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bellows/types/__init__.py", line 9, in deserialize
    value, data = type_.deserialize(data)
                  ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/zigpy/types/struct.py", line 302, in deserialize
    value, data = field.type.deserialize(data)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/zigpy/types/basic.py", line 851, in deserialize
    item, data = cls._item_type.deserialize(data)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/zigpy/types/basic.py", line 190, in deserialize
    raise ValueError(f"Data is too short to contain {byte_size} bytes")
ValueError: Data is too short to contain 1 bytes

Log3


Logger: zigpy.zcl
Source: runner.py:179 
First occurred: 00:51:21 (119 occurrences) 
Last logged: 10:03:19

[0x94AC:242:0x0021] Unknown cluster command 0 b'\x88T>\x1fq\x01\xd4\t\x00\x00\x17\x00\xac\x94\xff'
[0x94AC:242:0x0021] Unknown cluster command 0 b'\x88T>\x1fq\x01\xd5\t\x00\x00\x13\x00\xac\x94\xff'
[0x94AC:242:0x0021] Unknown cluster command 0 b'\x88T>\x1fq\x01\xd7\t\x00\x00h\x00\xac\x94\xff'
[0x94AC:242:0x0021] Unknown cluster command 0 b'\x88T>\x1fq\x01\xd8\t\x00\x00\x10\x00\xac\x94\xff'
[0x94AC:242:0x0021] Unknown cluster command 0 b'\x88T>\x1fq\x01\xd9\t\x00\x00\x14\x00\xac\x94\xff'

ZHA Device Request

2 Likes

I have a LED Trading 9126 (or is it a 9133) push button coupler, and I’m seriously considering to go back to z2mqtt tonight, because I need it working yesterday. Would be really nice to get this going. Green Power devices sound nice anyway. Lots of FOH hardware that we are missing here.

2 Likes

@zillion42 Did you get the push button coupler working?