Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support firmware downloading (reading fw from device) #1354

Open
LordMike opened this issue Jan 11, 2021 · 15 comments
Open

Support firmware downloading (reading fw from device) #1354

LordMike opened this issue Jan 11, 2021 · 15 comments
Labels
enhancement New feature or request

Comments

@LordMike
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I have an idea that's mostly a curiosity right now: Can we build a firmware database, with easily-usable binaries for different device types? (We probably can't... licensing and whatnot).

Part of this idea involves gathering firmwares that can be tricky to get. Downloading a firmware from a device, would help a lot. Devices with newer firmwares could help efforts to flash older devices, even when the original manufacturer refuses or can't provide new firmware images.

Describe the solution you'd like
In the docs for the z-wave COMMAND_CLASS_FIRMWARE_UPDATE_MD CC, it says:

The Firmware Update Meta Data Command Class may be used to transfer a firmware image to or from a Z-Wave node.

This is for version 4+, and most of the devices I've seen are version 3 - but here's to hoping.

If it was possible, an API to download a firmware image from the device would be beneficial. The downloaded images would be as raw as they could be, without any additional packing or whatnot from manufacturers.. :)

Describe alternatives you've considered
N/A

Additional context
Entirely theoretical, it should be possible to flash one device via. another.. Hmm..

I originally wrote about this on ozw.

@LordMike LordMike added the enhancement New feature or request label Jan 11, 2021
@zwave-js-bot zwave-js-bot added this to Needs triage in Triage Jan 11, 2021
@AlCalzone
Copy link
Member

For reference:
grafik

Seems I missed that entirely 😬

@AlCalzone AlCalzone moved this from Needs triage to Feature request in Triage Jan 11, 2021
@LordMike
Copy link
Contributor Author

I'm envisioning the pirate database of firmwares now. Keyed by manufacterer/product ids, and firmware versions.. :D

@AlCalzone
Copy link
Member

Yeah, I don't think many devices will offer their firmwares for download if they aren't already available freely.

@LordMike
Copy link
Contributor Author

LordMike commented Jan 11, 2021 via email

@roflmao
Copy link
Contributor

roflmao commented Jan 12, 2021

While making it possible doesnt mean that this will be a problem before anyone makes FW public. I know Fibaro doesnt make FW available, forcing people to buy their hub to get updates.

@LordMike
Copy link
Contributor Author

I think this is a bad idea as it exposes the project to potential legal wrangling for little benefit. It’s one thing to let the user retrieve the firmware and another to distribute that binary without permission.

I wouldn't say zwavejs should make the store.. Merely implement the API to fetch the fw.. :)

@jkaberg
Copy link

jkaberg commented Jan 12, 2021

@LordMike I agreed, even more so if this is apart of the (official?) Z-Wave specification. Haveing feature parity would be great

@AlCalzone
Copy link
Member

Side note: The entire issue depends on the devices actually responding to the download commands.

@zwave-js zwave-js locked and limited conversation to collaborators Feb 9, 2021
@zwave-js zwave-js deleted a comment from Hedda Feb 9, 2021
@zwave-js zwave-js deleted a comment from Hedda Feb 9, 2021
@zwave-js zwave-js deleted a comment from Hedda Feb 9, 2021
@blhoward2
Copy link
Collaborator

Now the the timeout is over and thread cleaned up, I'm unlocking this again. In speaking with @AlCalzone we have no interest in hosting firmware images. Let's please limit discussion to the requested function to download firmware from the device, if doing so is even possible.

@zwave-js zwave-js unlocked this conversation Feb 9, 2021
@tkralphs
Copy link

I landed on this issue because I was hoping this functionality existed. I have several otherwise identical devices with different firmware versions that were obtained at different times. The oldest firmware has an acknowledged bug but the company has not released an upgrade while newer devices come with a patched version. All I want to be able to do is copy the firmware from one device to another, which it seems I should have a right to do as an owner of the device. This seems like a pretty clear cut legitimate use case.

@tkralphs
Copy link

And by the way, thanks to the developers of zwave-js for the great work. I'm in the process of moving from SmartThings to Home Assistant and so far, the process has been very smooth. Working with the combination of zwave-js and Home Assistant has been a vastly better experience so far than working with SmartThings.

@LordMike
Copy link
Contributor Author

I landed on this issue because I was hoping this functionality existed. I have several otherwise identical devices with different firmware versions that were obtained at different times. The oldest firmware has an acknowledged bug but the company has not released an upgrade while newer devices come with a patched version. All I want to be able to do is copy the firmware from one device to another, which it seems I should have a right to do as an owner of the device. This seems like a pretty clear cut legitimate use case.

Iirc, the ability to download a firmware was removed in the FIRMWARE_MD v3 or something like that. At least, that's what I remember from the docs, that older versions had this idea that you could do stuff with the firmware, while later versions went away from it. I can only suspect that the original intent was like yours, while the later intent was influenced by "proprietary" software - but I'm guessing.. :)

@kpine
Copy link
Contributor

kpine commented Jan 24, 2023

According to the spec, your device must support Firmware Update Meta Data Command Class v5 or later for it to be possible to download its firmware (the functionality hasn't been removed in later versions). If you use Home Assistant, you can download the device diagnostics file and it will tell you which version of the CC is supported, I could not find this information in ZUI. You can also search the Z-Wave Products DB and sometimes it tells the version.

  • v1-4: The Firmware Update Meta Data Command Class may be used to transfer a firmware image to a ZWave device.
  • v5-8: The Firmware Update Meta Data Command Class may be used to transfer a firmware image to or from a Z-Wave node.

The Firmware Update Meta Data Command Class, version 5 also introduces the support firmware download from the Z-Wave node to the controller.

The following commands are introduced:

  • Firmware Update Meta Data Prepare Get Command
  • Firmware Update Meta Data Prepare Report Command

Device manufacturers may decide not to support this though, as "This firmware target is not downloadable." is a valid error to return from the above commands. So even with v5 support you may still be out of luck.

@LordMike
Copy link
Contributor Author

LordMike commented Jan 26, 2023 via email

@tkralphs
Copy link

If I'm looking at the right thing in the diagnostics file, the Firmware Update Meta Data version for the device whose firmware I wanted to download is v4. So yeah, guess it's not going to happen. The version for the devices with the older firmware is v2! Thanks for your help, I really appreciate your work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants