thing-details: Add support for firmware updates - #3785
Conversation
#4594 Bundle Size — 12.82MiB (+0.02%).5db80ac(current) vs 88ae3f0 main#4590(baseline) Warning Bundle contains 2 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
Bundle analysis report Branch cdjackson:firmware-update Project dashboard Generated by RelativeCI Documentation Report issue |
|
This looks like a good enhancement. I can't actually test because I don't have any devices which support firmware updates, so I trust this works and has been tested. I have a few initial suggestions if you could incorporate. Then, we can trigger a copilot review. |
|
Huh, i did not realize we had firmware update support in the main ui, I have a Draft PR open for Matter with support for firmware updates using the thing status and thing actions in the UI..... but will look at his now. screenshots at openhab/openhab-addons#20070 |
|
Thanks @jsjames I'll take a look over the comments probably tomorrow night. |
Well, I guess we don't :) I added the initial support last year some time - this just shows the firmware status though and didn't actually activate an update. This PR adds support to start the update and get the progress feedback. Support for firmware updates has been part of OH since OH2 - it was in PaperUI, but got dropped in OH3 when the MainUI replaced PaperUI so updates had to be done through the command line at that point... (edit: "command line" == OH console) |
|
@jsjames I've updated this to account for your review - thanks. |
There was a problem hiding this comment.
Pull request overview
This pull request adds firmware update functionality to the openHAB UI, allowing users to view available firmware versions, see update status with badges (Current/Upgrade/Downgrade), and initiate firmware updates via a play button. The implementation includes real-time progress tracking through Server-Sent Events (SSE) and visual status indicators.
Changes:
- Replaced the green checkmark for current firmware with status badges showing whether a firmware is current, an upgrade, or a downgrade
- Added a play button to initiate firmware updates for non-current versions
- Implemented SSE event handlers to track firmware update progress and results in real-time
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@cdjackson - We have updated the api calls to support the "new" hey-api generated calls. This should be rebased to main so the new api calls are pulled in. Also, you can change the api call to update firmware to the following: |
|
will do - I’ll try and look at that today. I’ve made most of the changes now but need to test and have been flying back to New Zealand over the past couple of days :(
|
83c1fed to
c2e70f1
Compare
c2e70f1 to
112fbe7
Compare
|
@jsjames hopefully this is ready for final review... |
112fbe7 to
f622c30
Compare
Signed-off-by: Chris Jackson <chris@cd-jackson.com> Signed-off-by: Jeff James <jeff@james-online.com>
Signed-off-by: Chris Jackson <chris@cd-jackson.com> Signed-off-by: Jeff James <jeff@james-online.com>
Signed-off-by: Jeff James <jeff@james-online.com>
Signed-off-by: Chris Jackson <chris@cd-jackson.com> Signed-off-by: Jeff James <jeff@james-online.com>
f622c30 to
0692b4f
Compare
Signed-off-by: Jeff James <jeff@james-online.com>
4df5e60 to
5db80ac
Compare
|
@cdjackson - Hi Chris - i had to rebase/squash before I merged. Let me know if anything looks odd. Thanks again for the work here!! |
This adds support to start firmware updates - building on the earlier support I added to show the firmware status.
I removed the previous green tick that was shown when the currently available firmware is running and added badges to reflect the status. This now shows if the firmware is current, or if it's an upgrade or downgrade. A "play" button is available to start the update, and the progress is then shown as a percentage in the status.
There is also further information showing similar activities through the console here (openhab/org.openhab.binding.zigbee#922).
Closes #1427
Signed-off-by: Chris Jackson chris@cd-jackson.com