Skip to content

Conversation

@sbraz
Copy link
Contributor

@sbraz sbraz commented Oct 23, 2025

  • 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

sbraz added 3 commits October 24, 2025 00:36
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()
Copy link
Contributor Author

@sbraz sbraz Oct 23, 2025

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.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is fine

@sbraz
Copy link
Contributor Author

sbraz commented Oct 23, 2025

Ideally, I'd like to move measurement_poll_interval above measurement_poll_chunk but I couldn't find how to do it. Is that possible at all?

extend: [
m.poll({
key: "interval",
key: "measurement",
Copy link
Owner

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

Copy link
Contributor Author

@sbraz sbraz Oct 25, 2025

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.

@sbraz
Copy link
Contributor Author

sbraz commented Oct 25, 2025

Ideally, I'd like to move measurement_poll_interval above measurement_poll_chunk but I couldn't find how to do it. Is that possible at all?

@Koenkk can you help me with that?

@sbraz
Copy link
Contributor Author

sbraz commented Oct 25, 2025

@Koenkk I have another issue with this converter: I believe this never raises an exception on read errors, is that possible?

await endpoint.read(cluster, targ.slice(i, i + measurement_poll_chunk), {manufacturerCode: null}).catch((e) => {

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?

@Koenkk
Copy link
Owner

Koenkk commented Oct 25, 2025

Ideally, I'd like to move measurement_poll_interval above measurement_poll_chunk but I couldn't find how to do it. Is that possible at all?

What do you mean with above?

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

using try/catch is fine here, please update the pr

@sbraz
Copy link
Contributor Author

sbraz commented Oct 25, 2025

What do you mean with above?

I'd like to move the poll interval option above the poll chunk option in the UI:
image

using try/catch is fine here, please update the pr

OK I'll do that ASAP.

@Koenkk
Copy link
Owner

Koenkk commented Oct 25, 2025

Currently it's not possible to define the order, so I would propose to leave this as is.

@sbraz
Copy link
Contributor Author

sbraz commented Oct 25, 2025

using try/catch is fine here, please update the pr

I actually reverted to the current version of the converter, without any change, and I do see the error logs:

[2025-10-25 20:33:20] warning:  zhc:lixee: Failed to read zigbee attributes: Error: ZCL command 0x......./1 liXeePrivate.read(["currentPrice","message1","message2","drawnVAMaxN1"], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"manufacturerCode":null,"writeUndiv":false}) failed ({"target":24165,"apsFrame":{"profileId":260,"clusterId":65382,"sourceEndpoint":1,"destinationEndpoint":1,"options":4416,"groupId":0,"sequence":200},"zclSequence":14,"commandIdentifier":1} timed out after 10000ms)

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.

@Koenkk Koenkk merged commit b80ebbd into Koenkk:master Oct 25, 2025
3 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Oct 25, 2025

Thanks!

jacky202509 pushed a commit to jacky202509/zigbee-herdsman-converters that referenced this pull request Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants