-
Notifications
You must be signed in to change notification settings - Fork 4k
LiXee ZLinky: fix polling interval + improve option descriptions #10485
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
Conversation
e30ace4 broke the polling interval configuration. Since then, it was always set to 600 seconds.
The default description ("This device does not support reporting
electric measurements so it is polled instead. The default poll interval
is 60 seconds, set to -1 to disable.") mentioned a default of 60 seconds
but it is actually 600.
It was also misleading: not all attributes are polled, several of them
have reporting configured and are automatically updated.
| defaultIntervalSeconds: 600, | ||
| option: exposes.options.measurement_poll_interval(), | ||
| option: exposes.options | ||
| .measurement_poll_interval() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I use e.numeric("measurement_poll_interval", instead? I wasn't sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is fine
|
Ideally, I'd like to move |
| extend: [ | ||
| m.poll({ | ||
| key: "interval", | ||
| key: "measurement", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should stay as is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Koenkk but it doesn't work as-is, the option is called measurement_poll_interval and the poll function checks ${args.key}_poll_interval, so the key must match the option name.
| const optionKey = args.optionKey ?? `${args.key}_poll_interval`; |
Am I missing something? Before my fix commit, the poll interval was always 600 seconds, no matter the value of measurement_poll_interval.
@Koenkk can you help me with that? |
|
@Koenkk I have another issue with this converter: I believe this never raises an exception on read errors, is that possible? zigbee-herdsman-converters/src/devices/lixee.ts Line 1918 in f7323eb
I'm not very good with JS/TS but if I replace await endpoint.read(…).catch with a try/except block, I see read errors when measurement_poll_chunk is too high. I believe these silent failures were the reason my ZLinky was acting weird in the first place.Can you help me find a proper fix for this? Do you want me to create a separate issue? |
What do you mean with above?
using try/catch is fine here, please update the pr |
|
Currently it's not possible to define the order, so I would propose to leave this as is. |
I actually reverted to the current version of the converter, without any change, and I do see the error logs: I think the reason I didn't see them in the logs is that the poll interval was always 10 minutes, so I missed them. It was not a JavaScript problem. I'd say this PR is good as-is if you're OK with it. |
|
Thanks! |

fix: LiXee ZLinky: make polling interval configurable again
e30ace4 broke the polling interval configuration. Since then, it
was always set to 600 seconds.
fix: LiXee ZLinky: describe actual default polling interval
The default description ("This device does not support reporting
electric measurements so it is polled instead. The default poll interval
is 60 seconds, set to -1 to disable.") mentioned a default of 60 seconds
but it is actually 600.
It was also misleading: not all attributes are polled, several of them
have reporting configured and are automatically updated.
fix: LiXee ZLinky: improve description of measurement_poll_chunk