-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
OTA update of Ubisys Power Switch S2 fails with maxContentLength error #19283
Comments
Can you try with the latest z2m dev? It contains fixes related to Ubisys updates. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html) |
Same for H1 and S1 devices with 1.33.1-dev commit: 81a8df9 |
Thanks for checking, it's unfortunately not fixed for me as well with the latest-dev version: 1.33.1-dev commit: 81a8df9. |
Can you provide the debug log of this? See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable debug logging. |
From the moment of hitting "OK" on update confirm dialog until the failure message appears:
|
Btw: Are the images downloaded from an external source? I am running PiHole DNS with Ad-filtering, maybe this could be a cause. |
Here you go:
|
Maybe the URL just changed from http://fwu.ubisys.de/smarthome/OTA/release/10F2-7B33-0000-0006-02300422-spo-fms2.ota.zigbee to https://www.ubisys.de/wp-content/uploads/10F2-7B33-0000-0006-02300422-spo-fms2.ota.zigbee? Here is the firmware page on https://www.ubisys.de/en/support/firmware/ |
Just checked, the URL is not blocked by PiHole and the file length (145kB) is properly reported by HTTP header: $ curl -I http://fwu.ubisys.de/smarthome/OTA/release/10F2-7B33-0000-0006-02300422-spo-fms2.ota.zigbee
HTTP/1.1 200 OK
Server: nginx/1.10.3 (Ubuntu)
Date: Tue, 17 Oct 2023 14:32:00 GMT
Content-Length: 148990
Connection: keep-alive
Last-Modified: Wed, 27 Sep 2023 12:09:24 GMT
ETag: "245fe-606560fe6c500"
Accept-Ranges: bytes |
In the z2m folder, can you try to edit If you are running in Docker/HA addon you can follow these instructions to edit files locally. |
No luck. The line now reads: const firmwarePage = await axios.get(firmwareHtmlPageUrl, {maxContentLength: 99999}); but still the same error. 1.33.1-dev commit: 3461f11 |
Interesting side node:
|
This might fix it? louislam/uptime-kuma@3e68cf2 - const firmwarePage = await axios.get(firmwareHtmlPageUrl);
+ const firmwarePage = await axios.get(firmwareHtmlPageUrl, { headers: { "Accept-Encoding": "gzip, deflate" }, decompress: true }); Can test later. |
Looks like the firmwarePage is working fine, right? Because the logs show:
|
Nope, doesn't. Same error.
|
Here's more output when requesting OTA Update for Ubisys S1:
The chosen URL http://fwu.ubisys.de/smarthome/OTA/release/10F2-7B0D-0000-0001-01400422-m7b-h1.ota.zigbee returns an firmware image when called via Browser / Firefox. |
Had a look at Axios and setting maxContentLength to -1 disables the check. This obviously avoids the error, though I don't know if disabling maxContentLength checks is a good thing. Firmware update for Unisys S1 is running now, will report once and if it finished. |
Update succeeded, although there was a "timeout warning" during completing the update, I'll guess that was related to the device restarting. |
Avoid maxContentLength failure when updating Ubisys device (Koenkk/zigbee2mqtt#19283)
… Ubisys devices (#6305) * Update ubisys.ts Avoid maxContentLength failure when updating Ubisys device (Koenkk/zigbee2mqtt#19283) * Update ubisys.ts - fix linter issues
@m0wlheld thanks for the fix! Assuming this can be closed now. Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html) |
What happened?
When I'm doing a OTA update on the Ubisys Power Switch S2 I get this error:
It might be related to this issue in Axios: axios/axios#4806
What did you expect to happen?
That the update would start.
How to reproduce it (minimal and precise)
No response
Zigbee2MQTT version
1.30.4
Adapter firmware version
26580700
Adapter
ConBee II
Debug log
No response
The text was updated successfully, but these errors were encountered: