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

Timed off cannot be set to 2 hours #25323

Closed
markchalloner opened this issue Dec 25, 2024 · 2 comments
Closed

Timed off cannot be set to 2 hours #25323

markchalloner opened this issue Dec 25, 2024 · 2 comments
Labels
problem Something isn't working

Comments

@markchalloner
Copy link

What happened?

When using onWithTimedOff, the on_time parameter seems to be multiplied by 10 so cannot be set to a value of greater than 6553.

This seems to be independent of device and was tested with both an IKEA Tretakt E2204 UK and SONOFF ZBMINI.

zigbee2mqtt/Test Plug/set

{"state" : "ON", "on_time": 10800}
z2m: Publish 'set' 'state' to 'Test Plug' failed: 'RangeError [ERR_OUT_OF_RANGE]: ZCL command 0x6cfd22fffe3d0909/1 genOnOff.onWithTimedOff({"ctrlbits":0,"ontime":108000,"offwaittime":0}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (The value of "value" is out of range. It must be >= 0 and <= 65535. Received 108000)'

What did you expect to happen?

onWithTimedOff can be set with a value between 6554 and 65535

How to reproduce it (minimal and precise)

Send a MQTT message with an on_time of > 6553 to the topic:

zigbee2mqtt//set

E.g.:

zigbee2mqtt/Test Plug/set

{"state" : "ON", "on_time": 7200}

Observe that z2m shows a RangeError and value in the error message is 10x that sent. E.g.:

z2m: Publish 'set' 'state' to 'Test Plug' failed: 'RangeError [ERR_OUT_OF_RANGE]: ZCL command 0xe0798dfffed3b7fc/1 genOnOff.onWithTimedOff({"ctrlbits":0,"ontime":72000,"offwaittime":0}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (The value of "value" is out of range. It must be >= 0 and <= 65535. Received 72000)'

Zigbee2MQTT version

1.42.0

Adapter firmware version

20230507

Adapter

Smartlight SLZB-06

Setup

Add-on on Home Assistant OS in ProxMox VM on Intel NUC

Debug log

No response

@markchalloner markchalloner added the problem Something isn't working label Dec 25, 2024
@markchalloner
Copy link
Author

Actually this may not be a bug but my misunderstanding of the ZCL see Koenkk/zigbee-herdsman-converters#2326 (comment):

OnTime attribute specifies the length of time (in 1/10ths second)

and

0x0000 or 0xffff, the device SHALL remain in its current state.

Strongly implies a highest decimal value of 65534 1/10ths second i.e. 6553.4 seconds 😢.

Feel free to close this issue if that's the case.

@Koenkk
Copy link
Owner

Koenkk commented Dec 26, 2024

That's indeed the max by ZCL spec, I will close this.

@Koenkk Koenkk closed this as completed Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants