mercenaruss / zigstar_addons

Home Assistant add-ons for Flashing ZigStar Devices
Apache License 2.0
65 stars 5 forks source link

update fails to run #44

Open rugene76 opened 3 months ago

rugene76 commented 3 months ago

Trying to update a Sonoff usb dongle running ztack code dated 20221102

In the configuration I selected the appropriate serial port, sonoff mode, "Last Koenkk Firmware - CC1352P2_CC2652Plaunchpad*.zip" and stopped the addon zigbee2mqtt.

Any ideas what could be wrong? thanks

I'm getting this log entry:

Add-on: ZigStar TI CC2652P/P7 FW Flasher ZigStar TI CC2652P/P7 firmware flasher add-on

Add-on version: 0.4.0 You are running the latest version of this add-on. System: Home Assistant OS 13.1 (amd64 / generic-x86-64) Home Assistant Core: 2024.8.3 Home Assistant Supervisor: 2024.08.0

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

s6-rc: info: service banner successfully started s6-rc: info: service cc2652-flasher: starting unzip: short read [14:39:31] INFO: cc2652-flasher-up script exited with code 1 s6-rc: warning: unable to start service cc2652-flasher: command exited 1 s6-rc: info: service banner: stopping /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information. /run/s6/basedir/scripts/rc.init: fatal: stopping the container. s6-rc: info: service banner successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

davlaw commented 3 months ago

Not sure we are going to get any help, I have had issues where the config will not save properly. Its been going on for a few months and dev has no answers.

jcgoette commented 2 months ago

I think the issue is in this code block:

https://github.com/mercenaruss/zigstar_addons/blob/1056740fdc2a379d5fd532dc49f1116c3d0b2a3e/zigstar-cc2652-flasher/rootfs/etc/s6-overlay/scripts/cc2652-flasher-up#L39-L44

The URL is hardcoded, but no longer exists, and we're not checking if the output file is actually a ZIP file, so the code fails at unzip command instead of here: https://github.com/mercenaruss/zigstar_addons/blob/1056740fdc2a379d5fd532dc49f1116c3d0b2a3e/zigstar-cc2652-flasher/rootfs/etc/s6-overlay/scripts/cc2652-flasher-up#L40

Can workaround by setting URL manually in add-on:

image

emaayan commented 2 months ago

I think the issue is in this code block:

https://github.com/mercenaruss/zigstar_addons/blob/1056740fdc2a379d5fd532dc49f1116c3d0b2a3e/zigstar-cc2652-flasher/rootfs/etc/s6-overlay/scripts/cc2652-flasher-up#L39-L44

The URL is hardcoded, but no longer exists, and we're not checking if the output file is actually a ZIP file, so the code fails at unzip command instead of here:

https://github.com/mercenaruss/zigstar_addons/blob/1056740fdc2a379d5fd532dc49f1116c3d0b2a3e/zigstar-cc2652-flasher/rootfs/etc/s6-overlay/scripts/cc2652-flasher-up#L40

Can workaround by setting URL manually in add-on:

image i just tried this, and this doesn't seem to work.. image

jcgoette commented 2 months ago

My guess is the updated URL is no longer valid... :)

emaayan commented 2 months ago

My guess is the updated URL is no longer valid... :) What do you mean? The url in the image is what i directly copied from the github repo, so it can't be invalid. Is there a way to actually look at the file system of this add on ? I know it's a docker container, i'm not familiar with developing add ons for ha, but i'd like to run it locally.

emaayan commented 2 months ago

My guess is the updated URL is no longer valid... :)

actually the link is valid, the problem the file is not, when i download the zip i get this, which cannot be unzipped firmware.zip

hewimeddel commented 1 month ago

The workaround works with the raw-address: https://github.com/Koenkk/Z-Stack-firmware/raw/refs/heads/master/coordinator/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_coordinator_20240710.zip