Any news on âWork with Home Assistantâ for Levitonâs Zigbee devices and zigpy OTA provider for ZHA?
Leviton only joined âWorks with Home Assistantâ partner program (Nabu Casa device compatibility partnership) with the promise of support for their Z-Wave devices, but not for their Zigbee devices?
Meaning that they now have the right to add âWorks with Home Assistantâ badges to their devices once they tested and confirmed compatibility for those devices? â https://partner.home-assistant.io/
That is, I missed that while Leviton was the very first company to join the âWorks with Home Assistantâ partner program, it looks like it then solely partnered with Nabu Casa to get the âWorks via Z-Wave with Home Assistantâ badge, only agreeing to work with Nabu Casa to make sure that their line of Z-Wave series devices will work with Home Assistant, and not also partnered to get the âWorks via Zigbee with Home Assistantâ badge as well(?). That is, to also make sure that users of existing and future Leviton branded Zigbee devices, such as Levitonâs Decora Smart family of Zigbee-enabled lighting control products (which are Zigbee Certified), will also have a great experience with their Zigbee devices when using Home Assistantâs ZHA integration.
Leviton Decora Smart family
Leviton Lumina family (which are not only Zigbee devices) and other Zigbee devices from Leviton
At least I understand that the idea with the program is that manufacturers get rewarded with badges if they agree to work with Nabu Casa on making their devices work fully work out-of-the-box as well as get automatic firmware updates via Home Assistant, for a greater user experience.
âThere are manufacturers that are creating products that integrate into Home Assistant using standards like Z-Wave, Zigbee, or Matter (soon). In these cases, the integration is maintained by the Home Assistant community and Nabu Casa. These companies can still become a member of the Works with Home Assistant program but are relieved from integration maintenance.â âWith Home Assistant we are always working on educating our users about preferring local control and open standards when acquiring new products. This is also reflected in the âWorks with Home Assistantâ badges.â
https://www.home-assistant.io/blog/2022/07/12/partner-program/
https://partner.home-assistant.io/
Thus I would like to suggest this as an open letter question Leviton as a company in the hope that they consider providing public Zigbee OTA firmware update images for their devices?
The Follow-up question to that or rather an feature request is if Leviton as a company is willing to spare development time to add a publicly available OTA (Over-The-Air) Provider Server or Repository where it publishes/hosts Zigbee firmware update image files for its devices as well as contribute some OTA Provider downloader code for the zigpy library which is what Home Assistantâs ZHA integration depends on?
https://www.home-assistant.io/integrations/zha#ota-firmware-updates
https://github.com/zigpy/zigpy/blob/dev/README.md#zigbee-device-ota-updates
As Leviton as a company probably do not know yet, zigpy is the Zigbee framework and hardware radio API/CLI abstraction code library that is used by Home Assistantâs ZHA integration as well as a few other popular home automation software as a dependency in their Zigbee implementations and providing a âLeviton Zigbee OTA providerâ and matching downloader code support for Zigbee devices from Leviton in this zigpy library could potentially enable much easier OTA firmware upgrades for end-users of those in the future, and include; for Home Assistantâs ZHA integration today, as well as probably Zigbee plugin for Domoticz (e.i. the Domoticz-Zigbee project) and the official Zigbee Plugin developed by Jeedom SAS (i.e. the Zigbee plugin for Jeedom) in the future.
FYI, puddly is now working on supporting âGeneric OTA providersâ for zigpy via this new JSON format schema:
https://github.com/zigpy/zigpy/wiki/OTA-Information-for-Manufacturers
https://github.com/zigpy/zigpy/pull/1165
âThis allows for new providers to be added to zigpy without extra code. This also allows for manufacturers to distribute test feed URLs to customers without deploying them globally.â
This feature will be introduced via this new pull request that is still a work-in-progress â #1165
If Leviton already provides a publicly available OTA (Over-The-Air) Provider Server or Repository where it publishes/hosts Zigbee firmware update image files then all that should be missing is an OTA provider code with server/repository URL in zigpy.
Please see zigpyâs existing OTA provider code (provider.py) in Python which includes the URL links as source and downloader code for Zigbee OTA firmware image files for direct download:
https://github.com/zigpy/zigpy/blob/b79a072fe19ed4f2adddbb36a7c1a8d901c32fa9/zigpy/ota/provider.py
https://github.com/zigpy/zigpy/tree/dev/zigpy/ota
That is, this zigpy library would need a new âLeviton OTA Firmware providerâ section in that OTA provider code (provider.py) to handle image download for Leviton OTA firmware update image files, (please see the âSkeleton OTA Firmware providerâ for reference, as well as for referencing also studying provider.py to also look at the other OTA providers that already have different code sections to handle the download of OTA files, such as; IKEA, INOVELLI, ThirdReality (3reality), SONOFF/ITEAD, SALUS/Computime, and LEDVANCE/OSRAM.
https://github.com/zigpy/zigpy/blob/b79a072fe19ed4f2adddbb36a7c1a8d901c32fa9/zigpy/ota/OTA_URLs.md
Hopefully, Leviton management will consider setting up an OTA provider server or creating a dedicated repository for all officially released Zigbee OTA files for Leviton branded Zigbee devices.
That way it will be a single trusted and official primary source of official Zigbee OTA files released by Leviton, and that OTA provider source repository with your Zigbee OTA files could not only be used by zigpy as it could also be reused by other Zigbee implementations independently (both other open-source implementations as well as closed source and proprietary implementations).
FYI, zigpy developers has recently added a new feature to the âzigpy-cliâ tool that manufacturers can use to produce a skeleton JSON index from a given set of OTA files, and that way make sure manufacturers OTA files are correctly-structured so that they will be compatible with zigpy out-of-the-box. See the README.md for that âzigpy-cliâ tool:
https://github.com/zigpy/zigpy-cli/blob/dev/README.md#ota
Maybe also consider copying concept of index.json
with metadata on all files like Koenkk repository has to make scripting easier:
https://github.com/Koenkk/zigbee-OTA/blob/aad94e167391eb95e3aff551374fe4ba0a125221/index.json
zigpy and ZHA does not yet use this or other OTA Index files but Zigbee2MQTT allows users to use it locally as described here:
https://github.com/Koenkk/zigbee2mqtt.io/blob/7a0e49eec80db8292e5e8d4e77586e973ace6cf4/docs/guide/usage/ota_updates.md#local-ota-index-and-firmware-files
and discussion in relation to zigpy implementation here:
#535
And of course README.md
file which among other things could contain some basic information on how to update those:
https://github.com/Koenkk/zigbee-OTA/blob/aad94e167391eb95e3aff551374fe4ba0a125221/README.md
Perhaps also as keeping some kind of CHANGELOG.md
with changelog release history for each device firmware version:
https://github.com/Koenkk/Z-Stack-firmware/blob/1c3f97ca9ed3fea3112ee9c37012ba1d7907a0ef/coordinator/Z-Stack_3.x.0/CHANGELOG.md
PS: Off-topic but ZHA/Zigbee developers might also be interested to in this related discussion regarding here Koenkkâs zigbee-OTA repository that is used for Zigbee2MQTT and IoBroker â #535