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

Generic OTA providers #1165

Merged
merged 2 commits into from Jul 25, 2023
Merged

Generic OTA providers #1165

merged 2 commits into from Jul 25, 2023

Conversation

puddly
Copy link
Collaborator

@puddly puddly commented Feb 23, 2023

Implements the format specified in https://github.com/zigpy/zigpy/wiki/OTA-Information-for-Manufacturers:

zha:
  zigpy_config:
    ota:
      remote_providers:
        - url: "https://fw.zigbee.example.org/ota.json"
          manufacturer_ids: [0x1234, 0x5678]
        - url: "https://fw.zigbee.example.org/ota-beta.json"

This allows for new providers to be added to zigpy without extra code. This also allows for manufacturers to distribute test feed URLs to customers without deploying them globally.

@codecov-commenter
Copy link

codecov-commenter commented Feb 23, 2023

Codecov Report

Patch coverage: 98.59% and project coverage change: -0.01% ⚠️

Comparison is base (e2a2625) 99.55% compared to head (e246820) 99.54%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1165      +/-   ##
==========================================
- Coverage   99.55%   99.54%   -0.01%     
==========================================
  Files          48       48              
  Lines        9383     9452      +69     
==========================================
+ Hits         9341     9409      +68     
- Misses         42       43       +1     
Files Changed Coverage Δ
zigpy/ota/provider.py 99.62% <98.38%> (-0.17%) ⬇️
zigpy/config/__init__.py 100.00% <100.00%> (ø)
zigpy/ota/__init__.py 100.00% <100.00%> (ø)
zigpy/types/basic.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Hedda
Copy link
Contributor

Hedda commented Feb 27, 2023

Implements the format specified in https://github.com/zigpy/zigpy/wiki/OTA-Information-for-Manufacturers

@puddly believe a schema/format like this could have the potential of becoming more than a zigpy-only standard, therefore, I would like to suggest that you create a separate dedicated repository for that JSON schema and move the documentation for it from the zigpy wiki to files in that repo instead, (similarly to how you did with the "Open ZigBee Coordinator Backup Format"), as then it might be both simpler to keep different versions of the schemas in a Git repository instead of a wiki as well as be easier for developers from other projects to contribute to it a common standard as it could have the potential to become a universal open standard and common open file format that can be shared between different projectas and companies, at least if it someday also become commonly reused by different project within the Zigbee open-source scene in the future, such as adopted by others open source Zigbee framework/gateway projects, and used by more than a few commercial hardware device manufacturer companies as a shared open standard.

@puddly puddly force-pushed the puddly/generic-ota-provider branch from fb12c56 to e246820 Compare July 25, 2023 13:55
@puddly puddly merged commit 0e92222 into zigpy:dev Jul 25, 2023
10 of 12 checks passed
@MattWestb
Copy link
Contributor

Great work done i hope IKEA is doing one updated OTA for there Dirigera with this method then is very likely in the future is getting more device then the old then all devices is not working with the old system like the upcoming windows and door sensor.

@puddly
Copy link
Collaborator Author

puddly commented Jul 25, 2023

i hope IKEA is doing one updated OTA for there Dirigera with this method

This method relies on the zigpy-specific JSON index format so I doubt IKEA will be implementing it any time soon 😄.

What I hope to do is create a zigpy/ota repo to host all OTA images (including IKEA) and to use that instead of the manufacturer-specific HTTP feeds we currently have. This will let us vet OTA images before releasing them instead of allowing manufacturers to push arbitrary, potentially-breaking updates (e.g. IKEA changing their remotes' behavior).

@MattWestb
Copy link
Contributor

You / we also need documenting if devices is blocked for firmware downgrade like all IKEA controllers is (last checked / tested all first gen i having for one year ago its also in the Zigbee cert report) so users is knowing if its possible doing it or not but it can being made in the wiki so users can adding known devices then have testing and it was not working.

Great work done as normally P !!

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

Successfully merging this pull request may close these issues.

None yet

4 participants