Yes indeed.
However, the original post made by “victorigualada” has it misspelled on step 1.
1 Like
GleDel
(Gle Del)
January 10, 2024, 3:19pm
63
I’m having a hard time figuring out hat firmware to download.
How do I know what firmware i need?
What are the details of the device you wish up upgrade the firmware on?
GleDel
(Gle Del)
January 12, 2024, 7:54am
65
Mostly Aquara devices:
door sensors (lumi.sensor_magnet.aq2)
FP1 sensors (lumi.motion.ac01)
Smart plugs (lumi.plug.maeu01)
Temperature/humidity Sensors (lumi.weather)
And a couple of smart outlets from Blitzwolf:
TS011F (by _TZ3000_amdymr7l )
Thanks for pointing that out. Fixed now!
Hedda
(Hedda)
January 29, 2024, 1:34pm
67
FYI, an Home Assistant developer is currently working on support for ZHA UI update platform and zigpy OTA dependencies to allow for easy OTAU updates per Zigbee device, and once implemented it will be enabled by default for products where manufacturers provide public links to firmware images (which sadly is not that many as of yet so consider contacting manufacturers for products that you buy and encourage them to do so):
zigpy:dev
← dmulcahey:dm/ota-updates
opened 04:42PM - 08 Jan 24 UTC
Original Ota manager implementation from the description here: https://github.co… m/zigpy/zigpy/pull/1102. (Thanks @puddly)
All Ota handling is removed from the cluster definition in Zigpy except for image querying. Thinking the usage will be something like this:
HA update entity executes some flavor of this code at some pre defined interval to determine if there is an update available:
```python
await self._ota_cluster_handler.image_notify(
payload_type=(
self._ota_cluster_handler.cluster.ImageNotifyCommand.PayloadType.QueryJitter
),
query_jitter=100,
)
```
This will cause Zigpy to check for a new FW and if one is found an event with the firmware will be pushed to HA.
when the user clicks the update button in HA `async def update_firmware` is executed passing in the progress callback from HA.
Note: I tried to keep as much of the logging similar to what was being sent before.
home-assistant:dev
← dmulcahey:dm/zha-better-firmware-updates
opened 11:01PM - 08 Jan 24 UTC
<!--
You are amazing! Thanks for contributing to our project!
Please, DO N… OT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
This PR adds update entities to ZHA.
**REQUIRES:** https://github.com/zigpy/zigpy/pull/1321
Zigpy bumped to 0.61.0: https://github.com/zigpy/zigpy/releases/tag/0.61.0
~There is still a lot to do here:~
- [x] ~error handling~
- [x] ~tests~
- [x] ~docs PR~
- [x] ~code cleanup~
![device-page](https://github.com/home-assistant/core/assets/1335687/d2609657-0460-4c82-a504-a94e98b02f9f)
![dialog](https://github.com/home-assistant/core/assets/1335687/3667fb13-60f5-49e6-a840-e7c6c939e100)
![dialog-action](https://github.com/home-assistant/core/assets/1335687/9a7a5439-7113-4785-99c8-91bbc840fbb2)
![dialog-progress](https://github.com/home-assistant/core/assets/1335687/17420fd3-a054-4683-a950-a47b06b5faf6)
## Type of change
<!--
What type of change does your PR introduce to Home Assistant?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [x] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [X] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/30824
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [X] The code change is tested and works locally.
- [X] Local tests pass. **Your PR cannot be merged unless tests pass**
- [X] There is no commented out code in this PR.
- [X] I have followed the [development checklist][dev-checklist]
- [X] I have followed the [perfect PR recommendations][perfect-pr]
- [X] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [X] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [X] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [ ] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [ ] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [ ] Untested files have been added to `.coveragerc`.
<!--
This project is very active and we have a high turnover of pull requests.
Unfortunately, the number of incoming pull requests is higher than what our
reviewers can review and merge so there is a long backlog of pull requests
waiting for review. You can help here!
By reviewing another pull request, you will help raise the code quality of
that pull request and the final review will be faster. This way the general
pace of pull request reviews will go up and your wait time will go down.
When picking a pull request to review, try to choose one that hasn't yet
been reviewed.
Thanks for helping out!
-->
To help with the load of incoming pull requests:
- [ ] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr
5 Likes
Hedda
(Hedda)
February 4, 2024, 12:17pm
68
FYI, those pull requests by dmulcahey has now been merged so this should be in Home Assistant 2024.2
home-assistant:dev
← dmulcahey:dm/zha-better-firmware-updates
opened 11:01PM - 08 Jan 24 UTC
<!--
You are amazing! Thanks for contributing to our project!
Please, DO N… OT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
This PR adds update entities to ZHA.
**REQUIRES:** https://github.com/zigpy/zigpy/pull/1321
Zigpy bumped to 0.61.0: https://github.com/zigpy/zigpy/releases/tag/0.61.0
~There is still a lot to do here:~
- [x] ~error handling~
- [x] ~tests~
- [x] ~docs PR~
- [x] ~code cleanup~
![device-page](https://github.com/home-assistant/core/assets/1335687/d2609657-0460-4c82-a504-a94e98b02f9f)
![dialog](https://github.com/home-assistant/core/assets/1335687/3667fb13-60f5-49e6-a840-e7c6c939e100)
![dialog-action](https://github.com/home-assistant/core/assets/1335687/9a7a5439-7113-4785-99c8-91bbc840fbb2)
![dialog-progress](https://github.com/home-assistant/core/assets/1335687/17420fd3-a054-4683-a950-a47b06b5faf6)
## Type of change
<!--
What type of change does your PR introduce to Home Assistant?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [x] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [X] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/30824
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [X] The code change is tested and works locally.
- [X] Local tests pass. **Your PR cannot be merged unless tests pass**
- [X] There is no commented out code in this PR.
- [X] I have followed the [development checklist][dev-checklist]
- [X] I have followed the [perfect PR recommendations][perfect-pr]
- [X] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [X] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [X] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [ ] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [ ] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [ ] Untested files have been added to `.coveragerc`.
<!--
This project is very active and we have a high turnover of pull requests.
Unfortunately, the number of incoming pull requests is higher than what our
reviewers can review and merge so there is a long backlog of pull requests
waiting for review. You can help here!
By reviewing another pull request, you will help raise the code quality of
that pull request and the final review will be faster. This way the general
pace of pull request reviews will go up and your wait time will go down.
When picking a pull request to review, try to choose one that hasn't yet
been reviewed.
Thanks for helping out!
-->
To help with the load of incoming pull requests:
- [ ] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr
zigpy:dev
← dmulcahey:dm/ota-updates
opened 04:42PM - 08 Jan 24 UTC
Original Ota manager implementation from the description here: https://github.co… m/zigpy/zigpy/pull/1102. (Thanks @puddly)
All Ota handling is removed from the cluster definition in Zigpy except for image querying. Thinking the usage will be something like this:
HA update entity executes some flavor of this code at some pre defined interval to determine if there is an update available:
```python
await self._ota_cluster_handler.image_notify(
payload_type=(
self._ota_cluster_handler.cluster.ImageNotifyCommand.PayloadType.QueryJitter
),
query_jitter=100,
)
```
This will cause Zigpy to check for a new FW and if one is found an event with the firmware will be pushed to HA.
when the user clicks the update button in HA `async def update_firmware` is executed passing in the progress callback from HA.
Note: I tried to keep as much of the logging similar to what was being sent before.
Update entities for ZHA devices
ZHA (Zigbee Home Automation, our built-in Zigbee integration) now provides update entities to Home Assistant!
This means you can get notified when a device has a firmware update available, and you can trigger the update from Home Assistant!
Noticed the weird version numbers? Unfortunately, that is how version numbers in the Zigbee standard work and look, we currently have no way to translate them to something more human-readable format.
Currently, it supports updating Inovelli, OSRAM/Ledvance, Sonoff, and ThirdReality devices, and we are looking at adding support for more brands in the future.
Note! Manufacturers must add public URL in zigpy for OTA update images for automatic download, see:
Sadly not many manufacturers are publishing their OTA images publicly yet. If you are a user of their products then consider contacting manufacturers and encourage them to do so for all their products.
Otherwise the end user must manually provide the OTAU files from unofficial sources, if so, check out:
1 Like
cjano
(cjano)
February 4, 2024, 2:30pm
69
would appreciate too if someone could explain why to TZ3000_gvn91tmx TS011F you should chose file with this in filename zg_tl8258, not sure how this is working, btw I had to trigger it manually with step 4,
thanks for guide, also having issue with this device FW ver. 77 and turning on and off, will see if new FW would fix it
Thank you for the great write-up of these instructions!
I’m trying to OTA update 3 Aqara TRV’s, 4 Aqara plugs and a Popp TRV, but I can’t succeed.
All the Aqara devices always deliver the following message in homeassistant.log:
DEBUG (MainThread) [zigpy.zcl] [0xDEA4:1:0x0019] No OTA image is available
For the Popp TRV, which is the same hardware as the Danfoss Ally, I can’t find an OTA file on Koenkk’s github repo .
I’ve read this whole thread, and the whole documentation on OTA Device Firmware Updates · zigpy/zigpy Wiki · GitHub .
I think I have it all correctly set up. Here’s the relevant content of my configuration.yaml
The OTA files are in the folder too:
But no matter if I wait for HA to update them, or when I trigger it manually, they never update. What can be the issue here? How can I troubleshoot any further?
MasterDevwi
(William Devereux)
February 12, 2024, 1:23am
71
I love that ZHA can now handle firmware updates via the UI!
One thing that’s constantly bothered me about ZHA firmware updates in general though is that new entities in the firmware don’t seem to be discovered unless you remove and re-pair the device. This can be a real pain in the neck when you have a bunch of devices (such as two-dozen Inovelli switches). ZHA remembers the previous settings for most of the entities when the device is re-added, but not the entity names or icons so there’s a risk of breaking quite a bit of my logic.
Is there any way to discover new entities without removing and re-pairing? Or is this the only option?
1 Like
HI…any one have gledopto lights, and does it has any auto update with HA?
I got this
mikhan
(mike)
February 13, 2024, 3:00am
73
It seems they’ve broken ota in zha. It worked before but after 2024.2 update HA doesn’t see updates in otau folder
cjano
(cjano)
February 13, 2024, 12:52pm
74
same here, after 2024.2 this is no longer working, ALMOST updated all plugs and for some reason TZ3000_gvn91tmx TS011F says no up-to-date and FW version unknown
Are you guys sure it worked right before 2024.2? It didn’t work for me 5 days ago (trying to set it all up the first time) and my backups say I installed 2024.2 only 3 days ago. Wondering if my problem is the same as yours…
1 Like
erkr
(Eric)
February 14, 2024, 4:30pm
76
Yes the otau_directory is disabled in 2024.2: [BUG] quirk (that removes level control) not loaded for all Tradfi plugs · Issue #2973 · zigpy/zha-device-handlers · GitHub
There is an undocumented configuration flag mentioned in that thread to enable it at your own risk.
1 Like
erkr
(Eric)
February 14, 2024, 4:33pm
77
Did you try the re configure option?
MasterDevwi
(William Devereux)
February 14, 2024, 5:53pm
78
If I try to reconfigure the device, after a few seconds it says it completed successfully but the new entities never appear.
I’ve also tried putting the switch in pairing mode first (triple pressing the config button). In that case, the reconfiguration fails after 5-10 seconds and this error appears in the logs: “attempted pair verify without being paired first.”
erkr
(Eric)
February 14, 2024, 6:08pm
79
That is kind of disappointing news.
Similarly I noticed that reconfigure doesn’t load quirks that became available after adding a device. Only Re-adding the devices fixes that, so very similar to what you report for entities.
As a user, I wonder what reconfigure actually does?! At least NOT what the name suggests.
I would expect that it there to complete missing entities and reconsider available quirks…BUT…apparently not…
Thanks for trying!
MasterDevwi
(William Devereux)
February 14, 2024, 6:40pm
80
I appreciate you trying to help!
I hope this is something that can be fixed in ZHA. Removing and adding the device also messes up which entities are exposed to voice assistants (and how they’re configured within Alexa/Google Home/HomeKit).
1 Like
HerrTim
(Tim)
February 24, 2024, 7:36pm
81
Hello all,
I’m pretty new to this topic.
I run HA and for Zigbee I use Skyconnect. I’m wondering if the OTA updates are also possible with Skyconnect? Any experience?
I don’t have to enable the “ota_provider” anymore, or?
Thank you!