Skip to content

Add driver firmware v15 commands #1260

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

MartinHjelmare
Copy link
Contributor

@MartinHjelmare MartinHjelmare commented Jul 24, 2025

@MartinHjelmare MartinHjelmare marked this pull request as draft July 24, 2025 12:04
@MartinHjelmare MartinHjelmare force-pushed the add-driver-firmware-v15-commands branch from 49525b8 to 2183109 Compare July 24, 2025 12:06
@MartinHjelmare MartinHjelmare added the breaking-change Breaking changes label Jul 24, 2025
@@ -0,0 +1,17 @@
"""Provide common tools for testing Z-Wave JS server models."""

FIRMWARE_UPDATE_INFO = {
Copy link
Contributor Author

@MartinHjelmare MartinHjelmare Jul 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a pure move, no changes.

@@ -44,7 +45,7 @@ async def update_firmware(

async def driver_firmware_update_otw(
url: str,
firmware_file: DriverFirmwareUpdateData,
firmware_file: FirmwareUpdateData,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've renamed this since the driver has all items that the node firmware updates has.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we think the driver firmware updates will diverge from the node firmware updates, I can add a simple wrapper called DriverFirmwareUpdateData that inherits FirmwareUpdateData.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no plans for this to diverge, as it would require changes to the update service for no significant benefit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I should make a wrapper anyway to make the models consistently named

from ...util.helpers import convert_bytes_to_base64


class DriverFirmwareUpdateDataDataType(TypedDict, total=False):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed and moved these to zwave_js_server/model/firmware.py.

@@ -190,136 +183,3 @@ def __post_init__(self) -> None:
self.success = self.data["success"]
self.wait_time = self.data.get("waitTime")
self.reinterview = self.data["reInterview"]


class NodeFirmwareUpdateFileInfoDataType(TypedDict):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed and moved these to zwave_js_server.model.firmware.py.

@MartinHjelmare
Copy link
Contributor Author

I'll finish this tomorrow. Please let me know what you think on the open questions above.

@MartinHjelmare MartinHjelmare marked this pull request as ready for review July 25, 2025 16:56
@MartinHjelmare
Copy link
Contributor Author

I think we can merge this now.

@MartinHjelmare MartinHjelmare marked this pull request as draft July 26, 2025 10:13
@MartinHjelmare
Copy link
Contributor Author

I'll make some refactors of the firmware models as a prerequisite to this PR to make it easier to use this in Home Assistant. There are many parts of the node and driver firmware models that are common and we should consolidate those first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy