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

ERR_OUT_OF_RANGE: The value of "offset" is out of range. It must be >= 0 and <= 7. Received 8 #2260

Open
fonebone42 opened this issue Oct 28, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@fonebone42
Copy link

I tried doing firmware update on 3 Hue devices and when I started the 2nd and 3rd, I got the following error and the adapter crashed:

zigbee.0 | 2024-10-28 21:13:50.552 | info | starting.  Version 1.10.10 (non-npm: ioBroker/ioBroker.zigbee) in  /opt/iobroker/node_modules/iobroker.zigbee, node: v20.18.0,  js-controller: 6.0.11
zigbee.0 | 2024-10-28 21:13:14.977 | warn | Terminated (UNCAUGHT_EXCEPTION): Without reason
zigbee.0 | 2024-10-28 21:13:14.976 | info | terminating
zigbee.0 | 2024-10-28 21:13:14.477 | info | Zigbee: disabling joining new devices.
zigbee.0 | 2024-10-28 21:13:14.475 | info | cleaned everything up...
zigbee.0 | 2024-10-28 21:13:14.447 | error | Exception-Code: ERR_OUT_OF_RANGE: The value of "offset" is out of range. It must be >= 0 and <= 7. Received 8
zigbee.0 | 2024-10-28 21:13:14.447 | error | RangeError: The value of "offset" is out of range. It must be >= 0 and <= 7. Received 8     at boundsError (node:internal/buffer:88:9)     at Buffer.readUInt32LE (node:internal/buffer:222:5)     at BuffaloZcl.readUInt32 (/opt/iobroker/node_modules/zigbee-herdsman/src/buffalo/buffalo.ts:67:35)     at BuffaloZcl.read (/opt/iobroker/node_modules/zigbee-herdsman/src/zspec/zcl/buffaloZcl.ts:867:29)     at Function.parsePayloadCluster (/opt/iobroker/node_modules/zigbee-herdsman/src/zspec/zcl/zclFrame.ts:196:47)     at Function.parsePayload (/opt/iobroker/node_modules/zigbee-herdsman/src/zspec/zcl/zclFrame.ts:166:25)     at Function.fromBuffer (/opt/iobroker/node_modules/zigbee-herdsman/src/zspec/zcl/zclFrame.ts:157:30)     at /opt/iobroker/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:811:45
zigbee.0 | 2024-10-28 21:13:14.399 | error | unhandled promise rejection: The value of "offset" is out of range. It must be >= 0 and <= 7. Received 8
zigbee.0 | 2024-10-28 21:13:14.399 | error | Unhandled  promise rejection. This error originated either by throwing inside of  an async function without a catch block, or by rejecting a promise which  was not handled with .catch().
zigbee.0 | 2024-10-28 21:13:14.225 | info | Update of '0x001788010cb5f6c9' at 0%
zigbee.0 | 2024-10-28 21:13:12.977 | info | Update of '0x001788010cb5f649' at 0%
zigbee.0 | 2024-10-28 21:13:02.024 | info | Start firmware update for 0x001788010cb5f6c9
zigbee.0 | 2024-10-28 21:13:00.619 | info | Start firmware update for 0x001788010cb5f649
zigbee.0 | 2024-10-28 21:12:54.735 | info | current Firmware for 0x001788010cb5f6c9 is 16786182 new is 16786434
zigbee.0 | 2024-10-28 21:12:54.635 | info | Update of '0x001788010d7fdb8d' at 8.13%, +- 25 minutes remaining
zigbee.0 | 2024-10-28 21:12:44.854 | info | current Firmware for 0x001788010cb5f649 is 16786182 new is 16786434
zigbee.0 | 2024-10-28 21:12:44.357 | info | Update or check already in progress for '0x001788010d7fdb8d', skipping...

the 3 devices are two Hue lightbars and a Hue smart plug.

it looks like this is reproducible when I run 3 updates in parallel. I pause applying the updates in case you need more logs.

@asgothian
Copy link
Collaborator

Please describe in detail which steps to take to recreate the error. Note Pleas also test if the error is tied to specific kinds of devices or not, and if so. describe which devices those are.

A.

@fonebone42
Copy link
Author

fonebone42 commented Oct 29, 2024

here's what I'm doing:

  1. go to the Device Overview in the Zigbee Adapter
  2. Rotate the cards
  3. Check for firmware updates --> the 2 Hue Lightbars and the Hue Smart Plug show available updates (green download icon)
  4. click the icon on both lightbars in short sequence
  5. check the log that the download has started
  6. back to the cars and check again for updates
  7. start update on the smart plug
  8. go to logs and wait for crash (takes about 1min)

I've also bee able to reproduce it when first starting the smart plug updated and later the two lightbars.

I just noticed that the error is slightly different than before (<=15 instead of <=7)

Exception-Code: ERR_OUT_OF_RANGE: The value of "offset" is out of range. It must be >= 0 and <= 15. Received 16

I also tried starting all three updates at once but I couldn't make it crash like this.

I couldn't test with other devices as there ate no additional updates pending.

@asgothian asgothian added the bug Something isn't working label Oct 30, 2024
@asgothian
Copy link
Collaborator

As I do not have the respective set of devices, I won't be able to address the error itself. I will however check if I can prevent the adapter from crashing if something goes wrong with the firmware update.

@fonebone42
Copy link
Author

would it help it I switched the adapter into debug logging mode hoping that we see a bit more?

@arteck
Copy link
Collaborator

arteck commented Nov 2, 2024

last hue device OTA updates are very strange..
make it dev by dev... not parallel

@fonebone42
Copy link
Author

sure that's what I'm doing now ; but still it would be nice if the adapter wouldn't crash.
the good thing seems to be that when you restart the update it will pickup the download from where it crashed so you lose significantly less time.

zigbee.0 | 2024-11-02 10:55:47.239 | info | Update of '0x001788010cb5f6c9' at 22.88%, +- 3 minutes remaining
zigbee.0 | 2024-11-02 10:55:17.060 | info | Update of '0x001788010cb5f6c9' at 20.9%, +- 2 minutes remaining
zigbee.0 | 2024-11-02 10:54:46.895 | info | Update of '0x001788010cb5f6c9' at 0%

btw. is there a way to automate applying the updates so it could be applied sequentially in the background (I've just had 5 Hue devices with pending updates which easily takes 2-3h if wait in front of the screen to start the next one when the previous one is complete). If not maybe worth considering as an enhancement e.g., an option to do "apply all updates".

@arteck
Copy link
Collaborator

arteck commented Nov 3, 2024

is there a way to automate applying the updates so it could be applied sequentially in the background (I've just had 5 Hue devices with pending updates which easily takes 2-3h if wait in front of the screen to start the next one when the previous one is complete). If not maybe worth considering as an enhancement e.g., an option to do "apply all updates"

nope.. i think the manual upgrade start is better .. so you can see if is anything wrong..

@fonebone42
Copy link
Author

not sure whether I agree ... read also here [How To: Automation For OTA Zigbee/Zwave Device Firmware Updates](https://community.home-assistant.io/t/how-to-automation-for-ota-zigbee-zwave-device-firmware-updates/680203/13), I wouldn't want to manually upgrade such an estate of devices.
I think it would be my risk to press that button (I'm not asking for a fully automated solution like the Hue Bridge has).
Alternatively having an API into the Adapter (not sure whether this is possible in iobroker) to check and execute upgrades could also do the job then I could write the automation to my liking and you would be off the hook if something goes wrong :-)

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

3 participants