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

Unable to upgrade to custom firmware #16823

Closed
fred-gb opened this issue Feb 26, 2023 · 27 comments · Fixed by Koenkk/zigbee-herdsman-converters#8136
Closed

Unable to upgrade to custom firmware #16823

fred-gb opened this issue Feb 26, 2023 · 27 comments · Fixed by Koenkk/zigbee-herdsman-converters#8136
Labels
problem Something isn't working stale Stale issues

Comments

@fred-gb
Copy link

fred-gb commented Feb 26, 2023

What happened?

Hello, 👋🏻

I have problem with my Zlinky TIC

I would like to upgrade to a special firware version limited.

But I can't...

What did you expect to happen?

Upgrade from UI or anything else.

How to reproduce it (minimal and precise)

I used zigbee-OTA script. to create an index.json, with last entry:

    {
        "fileVersion": 13,
        "fileSize": 245406,
        "manufacturerCode": 4151,
        "imageType": 2,
        "sha512": "dd77b28a3b4664e7ad944fcffaa9eca9f3adb0bbe598e12bdd6eece8070a8cdda6792bed378d173dd5b4532b4cdb88cebda0ef0c432c4c4d6581aa9f2bbba54d",
        "url": "https://github.com/fairecasoimeme/Zlinky_TIC/releases/download/v13.0/ZLinky_router_v13_limited.ota",
        "force": true
    }

I add force configuration.

In configuration.yml I add:

ota:
  zigbee_ota_override_index_location: my_index.json
  ikea_ota_use_test_url: false

I renamed index.json in my_index.json an put in same directory like configuration.yaml.

I restart my docker Zigbee2Mqtt.

And send message: domotique/zigbee2mqtt/bridge/request/device/ota_update/update with ID of device 0x00158d0006a4018c.

But... No update avaiblable when I try in UI.

Update of '0x00158d0006a4018c' failed (No new image available)

Zigbee2MQTT version

1.30.1 commit: eb878d3 (docker)

Adapter firmware version

6.10.3.0 build 297

Adapter

SONOFF ZBDongle-E (EZSP v8)

Debug log

Zigbee2MQTT:debug 2023-02-26 17:09:50: Responded to OTA request of '0x94deb8fffe8a1ec6' with 'NO_IMAGE_AVAILABLE'
@Danit2
Copy link

Danit2 commented Feb 26, 2023

This is beqause of this problem.

#12554

It is not fix at the moment.

You can make a custom converter of this device with the normal ota directory and then the override will work.

@molusk
Copy link

molusk commented Feb 28, 2023

@Danit2 when I look at the lixee converter, I don't see much about OTA : ota: ota.lixee, .

What do you mean we should do with this custom converter ?

On the other hand, I have found the file dedicated to OTA for lixee device : https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/lib/ota/lixee.js
I tried to modify it on my install to point to the right ota (ends with "limited.ota") file but it does not seem to change anything. I don't really know javascript, it does not help 😆

@Danit2
Copy link

Danit2 commented Feb 28, 2023

You must replace the ota: ota.lixee with ota: ota.zigbeeOTA then the local ota index is working.

@molusk
Copy link

molusk commented Feb 28, 2023

Thank's a lot, I will test this as soon as possible 👏

@molusk
Copy link

molusk commented Feb 28, 2023

If I understand well, the next step would be to modify lixee.js to handle custom index (and/or alternative firmware as we are currently trying to push). Huge step for the JS rookie I am 😆

@Danit2
Copy link

Danit2 commented Feb 28, 2023

yes, when you will use the local index you have to write the same function as in this file:
https://github.com/Koenkk/zigbee-herdsman-converters/blob/a3e11ce5ffa9a02f61f296ecf990dc410e2691f0/lib/ota/zigbeeOTA.js#L34

But there i can not help. Sorry.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Mar 31, 2023
@molusk
Copy link

molusk commented Apr 4, 2023

The issue should be kept open until someone finds a suitable solution.
I don't know JS well and don't have enough time right know to try to solve this issue.

@github-actions github-actions bot removed the stale Stale issues label Apr 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label May 5, 2023
@molusk
Copy link

molusk commented May 9, 2023

This issue should be kept open.

@github-actions github-actions bot removed the stale Stale issues label May 10, 2023
@djbiti1
Copy link

djbiti1 commented May 30, 2023

There is a workaround for this issue: #13681 (comment)
Not really a solution, but for a one-time update it is good enough.

@molusk
Copy link

molusk commented Jun 1, 2023

Indeed, but there was a discussion about how the creator of the device should manage the firmware variants to allow an elegant way of managing upgrades. Representatives of various zigbee managers (including z2m) were involved.
Nothing was done for z2m yet.
The workaround works but this issue should be kept open until somebody competent enough and willing to do it passes by :)

@github-actions
Copy link
Contributor

github-actions bot commented Jul 2, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Jul 2, 2023
@molusk
Copy link

molusk commented Jul 2, 2023

Do not close this issue, please.

@github-actions github-actions bot removed the stale Stale issues label Jul 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Aug 3, 2023
@molusk
Copy link

molusk commented Aug 4, 2023

Please keep this open.

@github-actions github-actions bot removed the stale Stale issues label Aug 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Sep 4, 2023
@molusk
Copy link

molusk commented Sep 4, 2023

Please don’t.

@github-actions github-actions bot removed the stale Stale issues label Sep 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Oct 5, 2023
@molusk
Copy link

molusk commented Oct 9, 2023

Not stale

@github-actions github-actions bot removed the stale Stale issues label Oct 10, 2023
Copy link
Contributor

github-actions bot commented Apr 8, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@KipK
Copy link

KipK commented Oct 11, 2024

I'm reopening this topic, seeing people still living with this issue.

@Koenkk , lixee device has 2 different firmwares,. Booth use different 'type' meta. type 1 for normal fw, type 2 for limited.
manufacturer code and all other metas are the same for booth.

Checking the lixee.js , I see there's no such test for "type" meta.

Would it be possible to add meta check like in zigbeeota.js and download the appropriated file then ?

Or simpler, just remove the lixee.js from ota lib and replace in lixee.js ( from device folder ) line 646 the ota: ota.lixee, by ota: ota.zigbeeOTA, and ask for the author if the firmware can be hosted on your git like the other devices using index.js. This would solve the issue without too much hassle.

The actual lixee ota implementation even block the possibility to use local index ota.

@Koenkk
Copy link
Owner

Koenkk commented Oct 12, 2024

@KipK good idea, but how do you want the user to select the correct firmware?

@KipK
Copy link

KipK commented Oct 12, 2024

User don't have to select. Current installed firmware already had type meta, can't we get that information from the device ?

@KipK
Copy link

KipK commented Oct 12, 2024

I remember on Deconz, It was displaying all the OTA meta for each running devices

@KipK
Copy link

KipK commented Oct 12, 2024

@Koenkk Related to what you've said on the other post

PS: that ZLinky_TIC is in the official OTA index from what I can see: https://github.com/Koenkk/zigbee-OTA/blob/b8dee47ba1ff6e79ec6f249b666b9631d71c406e/index.json#L1668

So we could add a second entry after this one:

    {
        "fileVersion": 14,
        "fileSize": 249694,
        "manufacturerCode": 4151,
        "imageType": 1,
        "sha512": "cc69b0745c72daf8deda935ba47aa7abd34dfcaaa4bc35bfa0605cd7937b0ecd8582ba0c08110df4f620c8aa87798d201f407d3d7e17198cfef1a4aa13c5013d",
        "url": "https://github.com/fairecasoimeme/Zlinky_TIC/releases/download/v14.0/ZLinky_router_v14.ota"
    },

that would gives for the limited version:

    {
        "fileVersion": 14,
        "fileSize": 249694,
        "manufacturerCode": 4151,
        "imageType": 2,
        "sha512": "xxxxxxxxxxxxx",
        "url": "https://github.com/fairecasoimeme/Zlinky_TIC/releases/download/v14.0/ZLinky_router_v14_limited.ota"
    },

But I don't think it use the common index, in lixee.js line 646:

ota: ota.lixee,
should be then:
ota: ota.zigbeeOTA

And this should work theorically ain't it ?

Also current ota implementation from lixee.js always propose the normal firmware to the limited devices,even when it was already updated ( using serial TTL ) with latest "limited" fw
. It shouldn't as it doesn't have the same type. I don't think this would happend if the common index was used as type is different.

@KipK
Copy link

KipK commented Oct 14, 2024

So i have tested and it works as wanted.

I"ve created a PR: Koenkk/zigbee-herdsman-converters#8136

and submitted limited firmware: Koenkk/zigbee-OTA#568

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working stale Stale issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants