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

File upload for OTW update fails on all files #3023

Closed
3 tasks done
RyanWor opened this issue Mar 25, 2023 · 9 comments
Closed
3 tasks done

File upload for OTW update fails on all files #3023

RyanWor opened this issue Mar 25, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@RyanWor
Copy link

RyanWor commented Mar 25, 2023

Checklist

  • I am not using Home Assistant. Or: a developer has told me to come here.
  • I have checked the troubleshooting section and my problem is not described there.
  • I have read the changelog and my problem is not mentioned there.

Deploy method

Docker

Z-Wave JS UI version

8.11.0

ZwaveJS version

10.12.0

Describe the bug

When attempting to apply OTW update to ZST10-700 (currently in bootloader mode due to the update failure in first attempt) UI reports "Error reading file" (screenshot below) for any files.

image
image

To Reproduce

Enable "Bootloader only" in Settings > ZWave
Save settings
Wait for status to report "Bootloader is READY"
Click "Firmware Upgrade OTW" from "Advanced Actions"
Select .gbl firmware file to be flashed to USB stick
Click "Update"
"Error reading file" displayed in red popup in top right of window

(See attached screen recording)

chrome_koYUQQIdVX.mp4

Expected behavior

ZWave-JS applies firmware update to the USB stick

Additional context

I have tested this with multiple firmware files freshly downloaded and extracted from Zooz website including 7.18.3 and 7.18.1 (example files attached in zips, GitHub will not allow upload of .gbl files).

The error message appears instantly after clicking update.

No debug messages shown in log. It does not appear zwave-js backend is even attempting the firmware update.

I have tested this one three different HAOS hosts running different hardware, all produce the same error.

ZST10_700_7_18_1_US.zip
ZST10_700_7_18_3_US.zip

@RyanWor RyanWor added the bug Something isn't working label Mar 25, 2023
@RyanWor
Copy link
Author

RyanWor commented Mar 27, 2023

Just wanted to add, I tried updating several other sticks I have today (including another ZST10-700) and both updated successfully.

One of the USB sticks gave the same timeout error message (screenshot below) like I got when I first attempted to update my other ZST10-700 (the update attempt that got it stuck in bootloader mode) but it did still update and came back like normal showing the new version. But attempting to apply OTW while in "Bootloader Only" mode still fails the same as above on every file that I try and upload.

I've emailed Zooz to see if there is any other way to reflash this stick stuck in bootloader mode but it appears uploading OTW specifically when zwave-js is in "Bootloader Only" mode is specifically what causes this error.

chrome_ZhI1vydOzn

@robertsLando
Copy link
Member

@RyanWor Ok I found wher the problem is, this happens only on bootloader only mode because before sending the request I set the loading state on controller node but controller node doesn't exists in bootloader only... Let me prepare a quick fix for this...

@robertsLando
Copy link
Member

robertsLando commented Mar 28, 2023

@RyanWor Fix is on master, if you are using docker you can use master tag to try that, so at least you can recover your stick. Please report me if it's working then because my stick doesn't support the bootloader only mode so I haven't been able to try

@RyanWor
Copy link
Author

RyanWor commented Mar 28, 2023

@robertsLando Spun up master docker container on a test Pi and attempted the OTW. It gets further now but is still failing elsewhere. I wonder if my stick is broken. I spoke with Zooz yesterday and they suggested I send it in for RMA replacement. Happy to hold off on that if testing further would help here though. For what it's worth, I updated another ZST10-700 with this same gbl file and it worked so I know it's not a bad gbl file.

Here is the logs from my attempt to OTW in bootloader only mode:

root@control01:~# docker run --rm -it -p 8091:8091 -p 3000:3000 --device=/dev/ttyUSB0:/dev/zwave -v $(pwd)/store:/usr/src/app/store zwavejs/zwave-js-ui:master
2023-03-28 14:58:16.080 INFO APP: Version: 8.11.1.be89889
2023-03-28 14:58:16.095 INFO APP: Application path:/usr/src/app
  ______  __          __                      _  _____     _    _ _____
 |___  /  \ \        / /                     | |/ ____|   | |  | |_   _|
    / /____\ \  /\  / /_ ___   _____         | | (___     | |  | | | |
   / /______\ \/  \/ / _' \ \ / / _ \    _   | |\___ \    | |  | | | |
  / /__      \  /\  / (_| |\ V /  __/   | |__| |____) |   | |__| |_| |_
 /_____|      \/  \/ \__,_| \_/ \___|    \____/|_____/     \____/|_____|

2023-03-28 14:58:16.170 WARN STORE: scenes.json not found
2023-03-28 14:58:16.238 INFO APP: Listening on port 8091 host 0.0.0.0 protocol HTTP
2023-03-28 14:58:16.316 INFO MQTT: MQTT is disabled
2023-03-28 14:58:16.320 WARN BACKUP: Store backup is disabled
2023-03-28 14:58:16.323 WARN BACKUP: Nvm backup is disabled
2023-03-28 14:58:16.363 INFO Z-WAVE: Connecting to /dev/zwave
14:58:16.368 DRIVER   ███████╗ ██╗    ██╗  █████╗  ██╗   ██╗ ███████╗             ██╗ ███████╗
                      ╚══███╔╝ ██║    ██║ ██╔══██╗ ██║   ██║ ██╔════╝             ██║ ██╔════╝
                        ███╔╝  ██║ █╗ ██║ ███████║ ██║   ██║ █████╗   █████╗      ██║ ███████╗
                       ███╔╝   ██║███╗██║ ██╔══██║ ╚██╗ ██╔╝ ██╔══╝   ╚════╝ ██   ██║ ╚════██║
                      ███████╗ ╚███╔███╔╝ ██║  ██║  ╚████╔╝  ███████╗        ╚█████╔╝ ███████║
                      ╚══════╝  ╚══╝╚══╝  ╚═╝  ╚═╝   ╚═══╝   ╚══════╝         ╚════╝  ╚══════╝
14:58:16.373 DRIVER   version 10.12.0
14:58:16.377 DRIVER
14:58:16.380 DRIVER   starting driver...
14:58:16.431 DRIVER   opening serial port /dev/zwave
14:58:16.458 DRIVER   serial port opened
14:58:16.461 SERIAL » 0x15                                                                 (1 bytes)
14:58:16.478 SERIAL « Gecko Bootloader v1.12.01
                      1. upload gbl
                      2. run
                      3. ebl info
                      BL >
14:58:16.482 CNTRLR   [BOOTLOADER] version 1.12.01
14:58:17.469 DRIVER   Controller is in bootloader, attempting to recover...
14:58:17.473 SERIAL » 0x32                                                                 (1 bytes)
2023-03-28 14:58:17.502 DEBUG SOCKET: New connection zVrbUCzUUuUyysKRAAAB
14:58:17.508 SERIAL « Gecko Bootloader v1.12.01
                      1. upload gbl
                      2. run
                      3. ebl info
                      BL >
14:58:17.511 CNTRLR   [BOOTLOADER] version 1.12.01
2023-03-28 14:58:17.543 DEBUG SOCKET: Event INITED emitted to zVrbUCzUUuUyysKRAAAB
14:58:18.479 DRIVER   Failed to recover from bootloader. Staying in bootloader mode as requested.
2023-03-28 14:58:18.484 INFO Z-WAVE: Controller status: Bootloader is READY
2023-03-28 14:58:18.486 INFO Z-WAVE: Bootloader is READY
2023-03-28 14:58:18.604 DEBUG SOCKET: New connection boW-YJgRvaspfIYYAAAD
2023-03-28 14:58:18.660 DEBUG SOCKET: Event INITED emitted to boW-YJgRvaspfIYYAAAD
2023-03-28 14:59:11.923 DEBUG SOCKET: Event ZWAVE_API emitted to zVrbUCzUUuUyysKRAAAB
2023-03-28 14:59:11.947 INFO Z-WAVE: Calling api firmwareUpdateOTW with args: [
  {
    name: 'Zooz_ZST10-700_SDK_7.18.3_US.gbl',
    data: <Buffer eb 17 a6 03 08 00 00 00 00 00 00 03 01 01 00 00 fa 06 06 fa 10 00 00 00 d0 8f 02 00 db 47 16 bd 55 f4 81 14 5c b9 c8 70 f9 07 07 f9 24 00 00 00 2f 13 ... 167978 more bytes>
  },
  [length]: 1
]
2023-03-28 14:59:11.950 INFO Z-WAVE: Z-Wave client not connected firmwareUpdateOTW undefined

Screenshot of the errors in the UI:
chrome_R24fMVxqhV

@robertsLando
Copy link
Member

@RyanWor Nope still an issue on my side, apis checks the driver to be ready before calling, in this case driver is not ready so it immediatly rejects, just submitted a fix for this wait some minutes until the new image is built and then pull again and let me know

@RyanWor
Copy link
Author

RyanWor commented Mar 28, 2023

@robertsLando pulled master and tested again, got a "Driver is not ready" error this time versus "Z-Wave client not connected" last time.

Log:

root@control01:~# docker run --rm -it -p 8091:8091 -p 3000:3000 --device=/dev/ttyUSB0:/dev/zwave -v $(pwd)/store:/usr/src/app/store zwavejs/zwave-js-ui:master
2023-03-28 15:27:33.204 INFO APP: Version: 8.11.1.a286a8f
2023-03-28 15:27:33.213 INFO APP: Application path:/usr/src/app
  ______  __          __                      _  _____     _    _ _____
 |___  /  \ \        / /                     | |/ ____|   | |  | |_   _|
    / /____\ \  /\  / /_ ___   _____         | | (___     | |  | | | |
   / /______\ \/  \/ / _' \ \ / / _ \    _   | |\___ \    | |  | | | |
  / /__      \  /\  / (_| |\ V /  __/   | |__| |____) |   | |__| |_| |_
 /_____|      \/  \/ \__,_| \_/ \___|    \____/|_____/     \____/|_____|

2023-03-28 15:27:33.282 WARN STORE: scenes.json not found
2023-03-28 15:27:33.332 INFO APP: Listening on port 8091 host 0.0.0.0 protocol HTTP
2023-03-28 15:27:33.450 INFO MQTT: MQTT is disabled
2023-03-28 15:27:33.461 WARN BACKUP: Store backup is disabled
2023-03-28 15:27:33.464 WARN BACKUP: Nvm backup is disabled
2023-03-28 15:27:33.505 INFO Z-WAVE: Connecting to /dev/zwave
15:27:33.509 DRIVER   ███████╗ ██╗    ██╗  █████╗  ██╗   ██╗ ███████╗             ██╗ ███████╗
                      ╚══███╔╝ ██║    ██║ ██╔══██╗ ██║   ██║ ██╔════╝             ██║ ██╔════╝
                        ███╔╝  ██║ █╗ ██║ ███████║ ██║   ██║ █████╗   █████╗      ██║ ███████╗
                       ███╔╝   ██║███╗██║ ██╔══██║ ╚██╗ ██╔╝ ██╔══╝   ╚════╝ ██   ██║ ╚════██║
                      ███████╗ ╚███╔███╔╝ ██║  ██║  ╚████╔╝  ███████╗        ╚█████╔╝ ███████║
                      ╚══════╝  ╚══╝╚══╝  ╚═╝  ╚═╝   ╚═══╝   ╚══════╝         ╚════╝  ╚══════╝
15:27:33.514 DRIVER   version 10.12.0
15:27:33.516 DRIVER
15:27:33.519 DRIVER   starting driver...
15:27:33.560 DRIVER   opening serial port /dev/zwave
15:27:33.586 DRIVER   serial port opened
15:27:33.588 SERIAL » 0x15                                                                 (1 bytes)
15:27:33.605 SERIAL « Gecko Bootloader v1.12.01
                      1. upload gbl
                      2. run
                      3. ebl info
                      BL >
15:27:33.609 CNTRLR   [BOOTLOADER] version 1.12.01
15:27:34.598 DRIVER   Controller is in bootloader, attempting to recover...
15:27:34.602 SERIAL » 0x32                                                                 (1 bytes)
15:27:34.614 SERIAL « Gecko Bootloader v1.12.01
                      1. upload gbl
                      2. run
                      3. ebl info
                      BL >
15:27:34.621 CNTRLR   [BOOTLOADER] version 1.12.01
2023-03-28 15:27:35.099 DEBUG SOCKET: New connection jHn01xKmIqFyRlJdAAAB
2023-03-28 15:27:35.144 DEBUG SOCKET: Event INITED emitted to jHn01xKmIqFyRlJdAAAB
15:27:35.606 DRIVER   Failed to recover from bootloader. Staying in bootloader mode as requested.
2023-03-28 15:27:35.611 INFO Z-WAVE: Controller status: Bootloader is READY
2023-03-28 15:27:35.613 INFO Z-WAVE: Bootloader is READY
2023-03-28 15:27:36.466 DEBUG SOCKET: New connection ieGp8-8aN4fCMv3tAAAD
2023-03-28 15:27:36.495 DEBUG SOCKET: Event INITED emitted to ieGp8-8aN4fCMv3tAAAD
2023-03-28 15:27:40.530 INFO APP: GET /control-panel 200 63.340 ms - 1510
2023-03-28 15:27:40.545 DEBUG SOCKET: User disconnected from jHn01xKmIqFyRlJdAAAB: transport error
2023-03-28 15:27:40.611 INFO APP: GET /static/js/126.6652f99f93c7eece9082.js 200 21.543 ms - 44168
2023-03-28 15:27:40.645 INFO APP: GET /static/css/app.f94850af0cadc7c996e2.css 200 23.635 ms - 694398
2023-03-28 15:27:40.672 INFO APP: GET /static/js/app.e48b97cd207cbc2d7652.js 200 15.907 ms - 2130923
2023-03-28 15:27:40.867 INFO APP: GET /api/auth-enabled 304 25.225 ms - -
2023-03-28 15:27:40.878 INFO APP: GET /static/favicons/favicon-32x32.png 200 4.490 ms - 1670
2023-03-28 15:27:40.914 INFO APP: GET /static/logo.png 200 4.152 ms - 26171
2023-03-28 15:27:41.043 INFO APP: GET /static/favicons/favicon-32x32.png 304 8.989 ms - -
2023-03-28 15:27:41.051 DEBUG SOCKET: New connection GPiZr_nO9j33HH2tAAAF
2023-03-28 15:27:41.058 INFO APP: GET //static/fonts/MaterialIcons-Regular.2d80174.woff2 200 69.223 ms - 125116
2023-03-28 15:27:41.082 DEBUG SOCKET: Event INITED emitted to GPiZr_nO9j33HH2tAAAF
2023-03-28 15:27:41.123 INFO APP: GET /api/settings 200 149.000 ms - 13542
2023-03-28 15:27:41.141 INFO APP: GET /api/auth-enabled 304 5.931 ms - -
2023-03-28 15:27:52.022 DEBUG SOCKET: Event ZWAVE_API emitted to GPiZr_nO9j33HH2tAAAF
2023-03-28 15:27:52.046 INFO Z-WAVE: Calling api firmwareUpdateOTW with args: [
  {
    name: 'Zooz_ZST10-700_SDK_7.18.3_US.gbl',
    data: <Buffer eb 17 a6 03 08 00 00 00 00 00 00 03 01 01 00 00 fa 06 06 fa 10 00 00 00 d0 8f 02 00 db 47 16 bd 55 f4 81 14 5c b9 c8 70 f9 07 07 f9 24 00 00 00 2f 13 ... 167978 more bytes>
  },
  [length]: 1
]
2023-03-28 15:27:52.051 INFO Z-WAVE: Driver is not ready firmwareUpdateOTW undefined

Screenshot:
chrome_J4RD1tI1ai

@robertsLando
Copy link
Member

@RyanWor LOL there was a check also on that function, sorry. Pushed another fix to master now, hope this time it's the good one 😅

@RyanWor
Copy link
Author

RyanWor commented Mar 28, 2023

@robertsLando winner winner chicken dinner! That did the trick. 7.18.3 installed, no longer stuck in bootloader, and even still had all my nodes in the NVM. Great work man and again thank you so much for all you do!

@robertsLando
Copy link
Member

Thanks for the feedback @RyanWor, glad it works now 🙏🏼

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

No branches or pull requests

2 participants