Giter Site home page Giter Site logo

Support OTA upgrades about zigbee-herdsman HOT 30 CLOSED

koenkk avatar koenkk commented on July 17, 2024 9
Support OTA upgrades

from zigbee-herdsman.

Comments (30)

Koenkk avatar Koenkk commented on July 17, 2024 50

First OTA update with zigbee-herdsman/zigbee2mqtt is a fact!

image

Before: "dateCode":"20170315","swBuildId":"1.3.002"
After: "dateCode":"20180410","swBuildId":"1.3.009"

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024 15

@twsI good idea, will let you know here once its available.

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024 4

@kiall then we should make the version info ourselves

from zigbee-herdsman.

sjorge avatar sjorge commented on July 17, 2024 2

Just of minor interest, ubisys allows us to request the OTA firmware once we have this working!

https://www.ubisys.de/wp-content/uploads/ubisys-s1-technical-reference.pdf

7.7.4.Over-the-Air Upgrade Cluster(Client)

The image type for S1 is 0x7B02, for S1-R it is 0x7B05. You may request the latest firmware in ZigBee OTA image format to upgrade devices in the field using your own OTA server and back-end. If you operate the power switch S1together with the ZigBee/Ethernet Gateway ubisys G1, the latest firmware for S1 and S1-R will always be available automatically and you do not need to request it explicitly.

Looks like they just post them for us!
https://www.ubisys.de/en/support/firmware/

from zigbee-herdsman.

twsl avatar twsl commented on July 17, 2024 2

@Koenkk if you'd start with the general architecture, I could implement the code for certain vendors. Got Xiaomi, OSRAM, Ikea for testing as well

from zigbee-herdsman.

lwfitzgerald avatar lwfitzgerald commented on July 17, 2024 2

I went looking for the OTA firmwares for Salus devices this evening and after sniffing the traffic from their iOS app, I found them!

https://eu.salusconnect.io/demo/default/status/firmware?timestamp=0.

Unfortunately, the newest firmware for the SP600 plug I've got is pretty old:

→ strings SAL2PU1_02015120_OTA.ota | grep -E '20\d\d'
SAL2PU1_02015120_OTA ota image f~`
20170220

from zigbee-herdsman.

BudBundi avatar BudBundi commented on July 17, 2024 1

Ledvance/Osram Smart+ firmware can be found here: https://update.ledvance.com/firmware-overview?submit=all

Maybe this also helps https://phoscon.de/en/support#ota-update-osram-devices

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024 1

There is no need for downloading stuff manually, zigbee2mqtt grabs the latest from the ikea servers.

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

Would be great if somebody could help with this!

from zigbee-herdsman.

lorek123 avatar lorek123 commented on July 17, 2024

I can help test it with Ikea Tradfri devices

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

I think you need to add the genOta cluster similar like https://github.com/Koenkk/zigbee-herdsman/blob/master/src/adapter/z-stack/adapter/startZnp.ts#L48

Afterwards you can use https://github.com/Koenkk/zigbee-herdsman/blob/master/src/controller/model/device.ts#L208 to get the coordinator and first endpoint of it to start sending requests.

zigbee-herdsman has no replacement for zapp (which zigbee-shepherd had)

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

Change https://github.com/Koenkk/zigbee-herdsman/blob/master/src/controller/controller.ts#L424
to

if (type && data && cluster !== 'genOta') {

from zigbee-herdsman.

jdtsmith avatar jdtsmith commented on July 17, 2024

What's the status of your OTA branch @tb-killa? The Deconz folks have OTA working for a variety of devices.

from zigbee-herdsman.

andreasbrett avatar andreasbrett commented on July 17, 2024

If you need a tester, just let me know.

from zigbee-herdsman.

TDCroPower avatar TDCroPower commented on July 17, 2024

I also offer myself as a tester.
I have a CC2351 stick and some ZigBee devices from Ledvance/Osram, Xiaomi, Aqara etc.

from zigbee-herdsman.

atxbyea avatar atxbyea commented on July 17, 2024

I too can test if needed, CC1352P-2 and Tradfri, hue, Xiaomi, gledopto here

from zigbee-herdsman.

dbruggner avatar dbruggner commented on July 17, 2024

Ledvance/Osram has a REST API to download firmware info and firmware files: https://portal.update.ledvance.com/docs/services/firmware-rest-api/operations/5d8e482edb442c3151c64fae

from zigbee-herdsman.

twsl avatar twsl commented on July 17, 2024

Is there any way I can help or contribute?

from zigbee-herdsman.

CodeFinder2 avatar CodeFinder2 commented on July 17, 2024

Would also love to see this feature and glad to help testing (Bitron, OSRAM/Ledvance, Xiaomi/Aqara/Mija, Konke, Philips, Heimann, Ikea, ...) 🙈

from zigbee-herdsman.

svh1985 avatar svh1985 commented on July 17, 2024

OTA getting more important:
Signify confirmed the existence of the vulnerability in their product, and issued a patched firmware version (Firmware 1935144040) which is now available on their site. We recommend users to make sure that their product received the automatic update of this firmware version.

Full article:
https://blog.checkpoint.com/2020/02/05/the-dark-side-of-smart-lighting-check-point-research-shows-how-business-and-home-networks-can-be-hacked-from-a-lightbulb/

from zigbee-herdsman.

CodeFinder2 avatar CodeFinder2 commented on July 17, 2024

Is it a good idea to collect and upload (the most recent) firmware images somewhere? Maybe even collecting (links to) them on the appropriate wiki device pages, perhaps with a hint like 'tested'? 🙈

from zigbee-herdsman.

CodeFinder2 avatar CodeFinder2 commented on July 17, 2024

Uhh, that's great! ☺️👌

In general, will it be difficult to port this to other vendors like OSRAM or Xiaomi?

from zigbee-herdsman.

pedrolamas avatar pedrolamas commented on July 17, 2024

I have a couple of Tradfri start plugs that will certainly make use of this feature!

from zigbee-herdsman.

tim-devel avatar tim-devel commented on July 17, 2024

Great work @Koenkk ! Can I suggest that a log messages at a lower level is added to say the end point has received an update. E.g. Warning: {friendly_name} firmware update successfully completed.

from zigbee-herdsman.

kiall avatar kiall commented on July 17, 2024

There is no need for downloading stuff manually, zigbee2mqtt grabs the latest from the ikea servers.

What about for other brands who aren't so "open" with their firmware URLs? E.g. Philips firmwares are occasionally discovered and linked to, but there's no known equivalent to IKEAs version_info.json to base the discovery off.

from zigbee-herdsman.

lorek123 avatar lorek123 commented on July 17, 2024

About the automatic updates: what will happen if we cut off the power during OTA update? If we risk bricking device then we should consider creating manual update procedure.

from zigbee-herdsman.

andreasbrett avatar andreasbrett commented on July 17, 2024

About the automatic updates: what will happen if we cut off the power during OTA update? If we risk bricking device then we should consider creating manual update procedure.

I'd also say automatic updates should not be on by default. Users need to be able to control how and when their devices get updated. Also for automatic updates there should be some kind of time frame as devices are unavailable during the update which takes some minutes. It's the perfect situation where you might assume you're lights have crashed as they're irresponsive and then you power-toggle them to fix them. Bad decision!

from zigbee-herdsman.

sjorge avatar sjorge commented on July 17, 2024

There is no need for downloading stuff manually, zigbee2mqtt grabs the latest from the ikea servers.

@Koenkk so for the manufacturer publishing something online we need to write a specific extension to take care of those right? At least from the code it looks like you added a special one for tradfri

So fallback that will try to parse a local dir with files that are manuId_devId.bin or something could work for those were we only sporadically get binaries for?

In general, will it be difficult to port this to other vendors like OSRAM or Xiaomi?
Form the looks of it, not super hard if they have a nice json or other parseable index online like Tradfri does. Not sure either OSRAM or Xiaomi have those though. (At least signify (Hue) does not so that sucks)

About the automatic updates: what will happen if we cut off the power during OTA update? If we risk bricking device then we should consider creating manual update procedure.

Same risk as when the ikea gateway will do the update I think. I have at least pulled the battery on their remotes when updates were stuck... so not sure how harmful it is.

Looking at the code, I looks still very drafty so I don't think the final result will have them randomly update. There will probably be a mqtt topic to check for updates and one to do the update. If not, I'm sure they could be added without too much hassle.

from zigbee-herdsman.

Kryzek avatar Kryzek commented on July 17, 2024

Holy moly! No need to plug Trådfri gateway into network anymore to get latest firmwares. Huge kudos @Koenkk!

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

Implemented, let's continue here: Koenkk/zigbee2mqtt#2921

from zigbee-herdsman.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.