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

Unfortunately, there is no timeframe since no zigpy developer(s) is currently working on code for ZGP.

puddly posted comment https://github.com/zigpy/zigpy/issues/656#issuecomment-947951634 (in PR https://github.com/zigpy/zigpy/pull/656) that the current patch code from that pull request can not be accepted today as it is until it has been slightly re-written as the code patch for it will need to be cleaned up to be more readable by someone (e.i. a volunteering Python developer) before it can be acceptable for re-review before it can be merged, so new developer volunteer(s) are wanted to fix/change the previously submitted code patch!

puddly also mentioned in that same comment that zigpy developers have since that original patch was originally submitted done a ton of other underlying background work in refactoring the zigpy library code which could indirectly make a new patch for ZGP be easier to implementation (and even more unrelated changes have been merged into zigpy for the better since puddly’s comment), such as code restructuring and refactoring, cleanups, and other improvements or changes to the zigpy library and its radio libraries, many smaller and a few major, that in all should in theory now make it possible to write cleaner code patches today if someone like to step up and pick up this project again.

By the way, one of the major other indirectly related changes is that zigpy has otherwise been updated to be compliant with the Zigbee Cluster Library Specification revision 7 (ZCL7) and Zigbee Cluster Library Specification revision 8 (ZCL8) which among other things does state that every Zigbee 3.0 device with routing capabilities (router or coordinator) must implement Green Power Basic Proxy (GPBP) v1.1.1 functionality for forwarding compatibility (i.e. ZGP routing capability) to be granted Zigbee 3.0 Certification in order to further support Zigbee Green Power capabilities.

PS: Remember ZHA/zigpy are currently just a hobby projects developed by volunteers without pay, as such new features will probably only be priotized if volteering developers have a personal interest in it.

PPS: I believe one thing that could maybe could help speed this along would be to donate ZGP devices to lead developers puddly and Adminiuga as might increase their interest if they owned ZGP devices.

5 Likes

I’m curious. Any updates on this topic?

The last I heard/read was that developer(s) volunteers were still wanted/needed to clean up the code patch from the pull request previously submitted by zoic21 to the zigpy library and re-submit new a PR.

Please read my previous comment above → https://community.home-assistant.io/t/zha-might-soon-get-support-for-zgp-zigbee-green-power-devices/277149/11

@majkrzak apparently commented in that discussion a few days ago offering to volunteer but seems he noted that do not exactly know what to fix/change in order to make it acceptable for a new review:

There is further general development discussion about it in the feature request for for it in zigpy repo:

I recently purchased the new SkyConnect coordinator, partly as a way of supporting Nabu Casa, and partly to get onto what I believed would be the best supported Zigbee coordinator for H.A.

After receiving it I learned that it uses a chipset that still only has experimental support in Z2M. So I converted my H.A. setup to use ZHA. That generally works great – and actually seems more stable and responsive then Z2M – but I’m no longer able to use my six green-power based control buttons (all based on EnOcean PTM 215Z) :sob:

If SkyConnect and ZHA are meant to power the premier H.A. experience, then this issue with no green power support really needs to get resolved.

Suggest that you also post that comment to this inofficial SkyConnect forum thread as I do not think there is any official feedback communication channel for Nabu Casa support of the SkyConnect(?):

1 Like

FYI, this pull request for ZHA documentation would at least mention this limitation in an introduction:

https://github.com/home-assistant/home-assistant.io/pull/24494

## Introduction

ZHA integration follows the official Zigbee specification standards and uses one Zigbee Coordinator to set up and control a Zigbee network. Once ZHA has been installed and the Zigbee Coordinator is configured you will be able to directly join/pair Zigbee Router Device and Zigbee End Device products to that Zigbee network, regardless of the manufacturer and brand of that Zigbee-based product. Please see the respective sections below for compatible Zigbee radio modules hardware (physical radio adapter) and information on supported Zigbee devices.

Before installing the integration you will need to buy and connect a Zigbee Coordinator adapter to the computer running the Home Assistant installation. The general recommendation is to buy a newer model of Zigbee Coordinator adapter hardware and to flash the latest firmware to it, the reason that is it will usually offer better interoperability with all functions of most Zigbee 3.0 compliant devices on the market.

Supported devices are Zigbee Router Devices, which are normally mains-powered that act as Zigbee signal repeaters within the Zigbee network mesh to extend its range and improve coverage, and Zigbee End Devices, which will not act as Zigbee signal repeaters and are usually but not always battery-operated sensors.

### Limitations

Note that ZHA only supports connecting one dedicated Zigbee Coordinator adapter with a single Zigbee network and that the Zigbee Coordinator adapter cannot already be connected or used by any other application. Any devices that are or have previously been connected to another Zigbee implementation will also need to first be reset to their factory default settings before they can be paired/joined to ZHA, please see each device manufacturer’s documentation.

ZHA does not yet support devices that can only use the (“Zigbee Green Power”) profile which is used in a few batteryless self-powered or energy harvesting devices, (such as for example; Philips Hue Click, Philips Hue Tap, and some “Friends of Hue” partnership switches). The reason for this is that ZGP profile support has not yet been implemented in the zigpy library.

ZHA does not support devices that can only use the ZSE (“Zigbee Smart Energy”) profile because “Zigbee SE” is not part of the Zigbee 3.0 specification standard and thus not implemented in the Zigbee stack of commonly available Zigbee Coordinator adapters.

Based on pull requests for the zigpy project it looks like nworbneb started working on ZGP support:

6 Likes

As those PRs are merged and zigpy got merged to HA in the 2023.7 release.
Is it finally possible to connect a ZGP device to ZHA?

2 Likes

Not sure, I do not yet own any ZGP (Zigbee Green Power) devices so I can not actually test it myself.

Maybe all you who do own ZGP devices now test pairing/joining it to Home Assistent 2023.7 and report their results to to zigpy developers as “device support request” issues to zha-device-handlers repo?

It does look like initial ZGP support has very recently been added to zigpy (the Zigbee stack library that the ZHA integration depends on), which is only bumped in Home Assistant 2023.7 release (and later).

So at least now there a chance that ZHA and zha-device-handlers (zha-quirks) developers could add handler/converter code to support a ZHA Device Handler (ZHA quirk) for individual ZGP devices, (though the ZHA integration code might still need some new additions too).

I would suggest try to post feedback and details to that new or existing device support request and then wait to see if ZHA/zigpy developers are interested in looking at it, perhaps together with developers there you can resolve the missing pieces for specific devices (but be aware that since ZGP is not exactly standard Zigbee devices so could very well be that they will need to have that specific device you want working themself for them to develop needed support for it).

Suggest that you all go ahead post new “device support request” issues to the zha-device-handlers repository on GitHub with details on your setup, debug logs and troubleshooting steps (as mentioned, you need to be using Home Assistant 2023.8.1 release or later) → Issues · zigpy/zha-device-handlers · GitHub

Again, for some basic information on why is ZHA Device Handlers (ZHA quirks) are needed read → https://www.home-assistant.io/integrations/zha#how-to-add-support-for-new-and-unsupported-devices (as well as the related information here → https://www.home-assistant.io/integrations/zha#knowing-which-devices-are-supported)

Also again note that the same question has more or less already been asked to zigpy developers in the issue here → [REQUEST] ZGP (Zigbee Green Power) specification support · Issue #341 · zigpy/zigpy · GitHub (developers discussion only)

In addition, requirement for end-users will be to have a relatively modern Zigbee Coordinator adapter with a not-too-old firmware on it so be sure to report the exact radio adapter and Zigbee Coordinator firmware version tested with, as all Zigbee Green Power will not work with older radios or old Zigbee Coordinator firmware.

1 Like

Also, note that new ZGP devices could also need both a custom ZHA Device Handlers (a.k.a quirks) and modifications to the ZHA integration in the Home Assistant core, so it will be important that you all try open device requests as new issues if your ZGP device is pairing/joining but then not fully working correctly and not showing all entities expected or there is nothing showing in event data. Again, follow the ZHA docs section about ”How to add support for new and unsupported devices” → https://www.home-assistant.io/integrations/zha#how-to-add-support-for-new-and-unsupported-devices

1 Like

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