jordanruthe/homeassistant-phyn

[REQUEST] Check for software updates and initiate software update if available

Opened this issue · 3 comments

If possible please see if can implement a check for software updates and an option to initiate the software update if available.

PS: The goal would be to not have to use the Pyth app to perform software updates.

The firmware update sensor is available. Until there's a firmware update to be had, I'm not able to create a service in HomeAssistant to update the device.

Nice! Will that service use the update platform so can be exposed the same way similar to other updates in Home Assistant?

https://www.home-assistant.io/blog/2022/04/06/release-20224/#introducing-update-entities

Home Assistant core have that relatively new unified "update" entity type that can be initiated from UI/GUI by end users:

https://www.home-assistant.io/integrations/update

https://www.home-assistant.io/integrations/#updates

Some other integrations for Home Assistant such as the Z-Wave integration started utilizing it to add update entities UI.

"Now updates are entities, other integrations can provide them too! For example, a WLED firmware update for your LED strip will show up and installs with a single click."

https://www.home-assistant.io/images/blog/2022-04/update-install.gif

"These update entities can be provided by integrations and provide more information about the update, like: Version information, links to release notes, and the possibility to skip that specific version offered."

FYI, I collected more related information and links is this feature request asking for Zigbee OTA update UI/GUI notifications:

https://community.home-assistant.io/t/zha-integration-ui-options-to-apply-ota-firmware-update-otau-per-zigbee-device/438227/

Z-Wave JS Firmware Update Service (and update server) is for example available in UI as of Home Assistant 2022.9 release:

https://www.home-assistant.io/blog/2022/09/07/release-20229/#z-wave-firmware-updates-now-live

Z-Wave Firmware updates now live

image

In 2022.7, we added support for updating Z-Wave device firmware, but the catch was that you needed the firmware files from the manufacturer in order to complete the update. @AlCalzone wasn’t satisfied with this approach and began working on a better solution. That better solution is here with the introduction of the Z-Wave JS Firmware Update Service! For supported manufacturers, Z-Wave JS can now automatically detect, download, and install a firmware update if it is available for your device. This will be done the same way you are currently updating Home Assistant. You will see a notification in your settings menu and you can update right from there. Thanks @raman325

For now, only Jasco products are supported. Nabu Casa has been talking to other manufacturers to get more devices supported. To ensure our users can take advantage of this feature, we added update entities for your devices that will check once a day for new firmware updates. Nifty!

https://www.youtube.com/watch?v=wmYocYd0wts&t=390s&ab_channel=EverythingSmartHome

For reference; Home Assistant's Z-Wave (Z-Wave JS) developers exposed OTA updates for Z-Wave devices in UI from Home Assistant 2022.7 release, and they also created a new Firmware Update Service (web service with an API) to power semi-automatic firmware updates:

https://github.com/zwave-js/firmware-updates

https://github.com/zwave-js/firmware-updates/blob/main/README.md

The firmware update service for Z-Wave JS

https://firmware.zwave-js.io

They talk more about it in this video and blog post:

https://youtu.be/HnA_pZQyZAs?t=2908

https://www.home-assistant.io/blog/2022/07/06/release-20227/#update-z-wave-devices-directly-from-home-assistant

Z-Wave JS Firmware Update Service

This is the web service powering semi-automatic firmware updates in Z-Wave JS.

How it works

Firmware upgrades are defined in the files in the firmware directory. This information is parsed by the web service and used to respond to requests.

Z-Wave JS will query the web service on demand, providing the device identification of the device to be updated. If an update is available, the web service will respond with the necessary information to display to the user.

When desired, Z-Wave JS will download the update(s) from the provided URL, verify their integrity and install them

Update Z-Wave devices directly from Home Assistant

All software has bugs, including the software on your Z-Wave devices. But how to update those? Have no fear! As of today, we have a solution for this!

Thanks to the hard work and collaboration between @AlCalzone from Z-Wave JS and @raman325 from Home Assistant, you can now install updates on your Z-Wave devices directly from the Home Assistant interface!

Screenshot showing the new upload firmware item on the device page of a Z-Wave device page

image

On the device page of your Z-Wave device, there is now a menu item allowing you to install Z-Wave firmware updates onto your device manually.

Get a software update for your Z-Wave device from the manufacturer, and start an update in Home Assistant, which allows you to upload the update file you got from the manufacturer. The rest is pure magic!

Screenshot showing the a Z-Wave device that has firmware installation in progress

image

During update installation, you’ll be presented with the update’s progress.

It is that easy 💪

They also made a tool is meant to help generate the integrity hash for that Z-Wave JS firmware update service:

https://github.com/zwave-js/firmware-integrity

Might not be related but @irace got an error for his Phyn pw1 #29

PS: I have not yet seen any updates on my Phyn Plus.