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

Last Seen setting enabled breaks Inovelli VZM31-SN get exposes from device #16609

Closed
mbrink123 opened this issue Feb 10, 2023 · 33 comments
Closed
Labels
problem Something isn't working stale Stale issues

Comments

@mbrink123
Copy link

What happened?

After installing a new Inovelli Blue switch (vzm31-sn) all the settings on the exposes tab of the device in Z2M say null. There is a blue refresh button that pulls the config from the switch and updates Z2M. If Z2M has the Settings--Advanced--Last Seen setting set to ISO_8601_local the blue refresh button wont pull any data from the switch. If you disable the last seen setting, you then get data when clicking the blue refresh button. Enabling the last seen setting will again break pulling data from the switch.

What did you expect to happen?

When clicking the blue refresh button, it should pull whatever data is in the Inovelli switch and display the information in Z2M on the exposes tab.

How to reproduce it (minimal and precise)

Change the "last seen" setting in Z2M (settings--advanced--last seen) to ISO_8601_local, add a new inovelli switch to Z2M, go to the device page for that switch, goto the exposes tab, scroll down to any setting that is blank and click the refresh button (nothing will happen). Go back into settings and set the "last seen" setting to "disable", go back to the device exposes tab and click the refresh, the data will adjust to what's in the switch.

Zigbee2MQTT version

1.30.1

Adapter firmware version

20221226

Adapter

SONOFF Zigbee 3.0 USB Dongle Plus ZBDongle-P

Debug log

No response

@mbrink123 mbrink123 added the problem Something isn't working label Feb 10, 2023
@ZetaWaves
Copy link

I am experiencing the same problem. It causes Z2M to constantly send payloads requesting the information that isn't specifically set, even if it's set as default values on the switch itself. This needs fixed ASAP.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Apr 6, 2023
@ZetaWaves
Copy link

Bump. Still a problem.

@github-actions github-actions bot removed the stale Stale issues label Apr 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label May 8, 2023
@mbrink123
Copy link
Author

mbrink123 commented May 8, 2023 via email

@github-actions github-actions bot removed the stale Stale issues label May 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Jun 9, 2023
@mbrink123
Copy link
Author

mbrink123 commented Jun 9, 2023 via email

@github-actions github-actions bot removed the stale Stale issues label Jun 10, 2023
@bradsjm
Copy link

bradsjm commented Jun 17, 2023

Bump, same issue.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Jul 18, 2023
@mbrink123
Copy link
Author

mbrink123 commented Jul 18, 2023 via email

@github-actions github-actions bot removed the stale Stale issues label Jul 19, 2023
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Aug 19, 2023
@mbrink123
Copy link
Author

mbrink123 commented Aug 19, 2023 via email

@Koenkk
Copy link
Owner

Koenkk commented Aug 19, 2023

Can you provide the debug log of this?

See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable debug logging.

@github-actions github-actions bot removed the stale Stale issues label Aug 20, 2023
@mbrink123
Copy link
Author

mbrink123 commented Aug 22, 2023 via email

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Sep 22, 2023
@mbrink123
Copy link
Author

mbrink123 commented Sep 22, 2023 via email

@github-actions github-actions bot removed the stale Stale issues label Sep 23, 2023
@Koenkk
Copy link
Owner

Koenkk commented Sep 23, 2023

I don't see any log file in #16609 (comment)

@mbrink123
Copy link
Author

I guess email replies dont attach attachments. Lets try again.
45df7312_zigbee2mqtt_2023-08-22T18-26-06.181Z(1).log

@Koenkk
Copy link
Owner

Koenkk commented Sep 27, 2023

I see the log level is not set to debug, also can you make sure you reproduce the issue in the log?

Change the "last seen" setting in Z2M (settings--advanced--last seen) to ISO_8601_local, add a new inovelli switch to Z2M, go to the device page for that switch, goto the exposes tab, scroll down to any setting that is blank and click the refresh button (nothing will happen). Go back into settings and set the "last seen" setting to "disable", go back to the device exposes tab and click the refresh, the data will adjust to what's in the switch.

See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable debug logging.

@mbrink123
Copy link
Author

this work? Look at office light switch at the very end of the log.
45df7312_zigbee2mqtt_2023-09-27T18-27-18.462Z.log

@Koenkk
Copy link
Owner

Koenkk commented Sep 27, 2023

I don't see you doing this in the log:

scroll down to any setting that is blank and click the refresh button (nothing will happen)

I expect to see a zigbee2mqtt/Office Light Switch/get in the log.

@raineth
Copy link

raineth commented Oct 5, 2023

Here are 2 requests:

debug 2023-10-05 04:28:27: Received MQTT message on 'zigbee2mqtt/Master Bedroom Light/get' with data '{"ledIntensityWhenOff":""}'
debug 2023-10-05 04:28:27: Publishing get 'get' 'ledIntensityWhenOff' to 'Master Bedroom Light'
debug 2023-10-05 04:28:27: Received Zigbee message from 'Master Bedroom Light', type 'readResponse', cluster 'manuSpecificInovelliVZM31SN', data '{"ledIntensityWhenOff":1}' from endpoint 1 with groupID 0
info  2023-10-05 04:28:27: MQTT publish: topic 'zigbee2mqtt/Master Bedroom Light', payload '{[...TRIMMED...],"last_seen":"2023-10-05T04:28:27-04:00",[...TRIMMED...],"ledIntensityWhenOff":null,[...TRIMMED...]}'
debug 2023-10-05 04:28:42: Received MQTT message on 'zigbee2mqtt/Master Bedroom Light/get' with data '{"ledIntensityWhenOff":""}'
debug 2023-10-05 04:28:42: Publishing get 'get' 'ledIntensityWhenOff' to 'Master Bedroom Light'
debug 2023-10-05 04:28:42: Received Zigbee message from 'Master Bedroom Light', type 'readResponse', cluster 'manuSpecificInovelliVZM31SN', data '{"ledIntensityWhenOff":1}' from endpoint 1 with groupID 0
info  2023-10-05 04:28:42: MQTT publish: topic 'zigbee2mqtt/Master Bedroom Light', payload '{[...TRIMMED...],"last_seen":"2023-10-05T04:28:42-04:00",[...TRIMMED...],"ledIntensityWhenOff":null,[...TRIMMED...]}'

Untrimmed log messages attached.

@Koenkk
Copy link
Owner

Koenkk commented Oct 5, 2023

@raineth I see that the state is published correctly. Can you provide a debug log of the following:

  • Disable last seen
  • Do a zigbee2mqtt/Master Bedroom Light/get
  • -> Should work (MQTT publish... in log)
  • Enable last seen
  • Do a zigbee2mqtt/Master Bedroom Light/get
  • -> Should not work (MQTT publish... not in log)

@raineth
Copy link

raineth commented Oct 5, 2023

I'm seeing the inverse of your expectation. For clarity, I removed the cached state for the attribute I'm testing with (ledIntensityWhenOff) and restarted zigbee2mqtt before doing this test.

debug 2023-10-05 15:37:27: Received MQTT message on 'zigbee2mqtt/bridge/request/options' with data '{"options":{"advanced":{[...],"last_seen":"disable",[...]}},"transaction":"h2hzx-1"}'
info  2023-10-05 15:37:27: Successfully changed options
info  2023-10-05 15:37:27: MQTT publish: topic 'zigbee2mqtt/bridge/response/options', payload '{"data":{"restart_required":false},"status":"ok","transaction":"h2hzx-1"}'
debug 2023-10-05 15:37:38: Received MQTT message on 'zigbee2mqtt/Master Bedroom Light/get' with data '{"ledIntensityWhenOff":""}'
debug 2023-10-05 15:37:38: Publishing get 'get' 'ledIntensityWhenOff' to 'Master Bedroom Light'
debug 2023-10-05 15:37:39: Received Zigbee message from 'Master Bedroom Light', type 'readResponse', cluster 'manuSpecificInovelliVZM31SN', data '{"ledIntensityWhenOff":1}' from endpoint 1 with groupID 0
debug 2023-10-05 15:38:10: Received MQTT message on 'zigbee2mqtt/bridge/request/options' with data '{"options":{"advanced":{[...],"last_seen":"ISO_8601_local",[...]}},"transaction":"h2hzx-2"}'
info  2023-10-05 15:38:10: Successfully changed options
info  2023-10-05 15:38:10: MQTT publish: topic 'zigbee2mqtt/bridge/response/options', payload '{"data":{"restart_required":false},"status":"ok","transaction":"h2hzx-2"}'
debug 2023-10-05 15:38:14: Received MQTT message on 'zigbee2mqtt/Master Bedroom Light/get' with data '{"ledIntensityWhenOff":""}'
debug 2023-10-05 15:38:14: Publishing get 'get' 'ledIntensityWhenOff' to 'Master Bedroom Light'
debug 2023-10-05 15:38:14: Received Zigbee message from 'Master Bedroom Light', type 'readResponse', cluster 'manuSpecificInovelliVZM31SN', data '{"ledIntensityWhenOff":1}' from endpoint 1 with groupID 0
info  2023-10-05 15:38:14: MQTT publish: topic 'zigbee2mqtt/Master Bedroom Light', payload '{[...]"last_seen":"2023-10-05T15:38:14-04:00",[...],"ledIntensityWhenOff":1,[...]}'

Full log

After doing the first get, the web UI didn't update automatically, but the value was present when I reloaded the page.

@Koenkk
Copy link
Owner

Koenkk commented Oct 7, 2023

@raineth can you provide the contents of you data/configuration.yaml (without passwords/ips in it)

@raineth
Copy link

raineth commented Oct 9, 2023

@Koenkk Sure, here's my redacted configuration.yaml

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Oct 9, 2023
@Koenkk
Copy link
Owner

Koenkk commented Oct 9, 2023

@raineth pushed a fix

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)

@raineth
Copy link

raineth commented Oct 11, 2023

I'm at HEAD for zigbee2mqtt. I tried updating my package.json to bump the version of zigbee-herdsman-converters to 15.91.0, ran npm install/ci, but zigbee2mqtt doesn't start:

> zigbee2mqtt@1.33.1 start
> node index.js

Error: Cannot find module '/srv/zigbee2mqtt/node_modules/zigbee-herdsman-converters/index.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:409:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:651:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1025:27)
    at Function.Module._load (node:internal/modules/cjs/loader:885:27)
    at Module.require (node:internal/modules/cjs/loader:1105:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/srv/zigbee2mqtt/lib/model/device.ts:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1218:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
    at Module.load (node:internal/modules/cjs/loader:1081:32)

It's possible I've missed a step, I haven't done any serious NodeJS development.

@Koenkk
Copy link
Owner

Koenkk commented Oct 11, 2023

Don't do any manual changes, instead execute npm install zigbee-herdsman-converters@15.92.1

@raineth
Copy link

raineth commented Oct 11, 2023

Cool, that worked! Refreshing integer settings now works properly and updates the UI as soon as the Zigbee response is received.

I tried refreshing other values, and I discovered that changing non-integer settings seems to be broken now regardless of the last_seen setting. It seems that such values are no longer mapped from integers to their names.

Some examples:

  • Refreshing InvertSwitch caused my cached value to be (apparently) cleared
  • Refreshing PowerType caused the value to be replaced with "1" instead of "Neutral"
  • Refreshing LoadLevelIndicatorTimeout caused the selected value to be replaced with "----"

I tried downgrading zigbee-herdsman-converters back to 15.86.1 and was able to refresh those values if last_seen was disabled, although they didn't update in the UI until I reloaded the page.

15.92.1

debug 2023-10-11 16:34:36: Received MQTT message on 'zigbee2mqtt/Master Bedroom Light/get' with data '{"powerType":""}'
debug 2023-10-11 16:34:36: Publishing get 'get' 'powerType' to 'Master Bedroom Light'
debug 2023-10-11 16:34:36: Received Zigbee message from 'Master Bedroom Light', type 'readResponse', cluster 'manuSpecificInovelliVZM31SN', data '{"powerType":1}' from endpoint 1 with groupID 0
info  2023-10-11 16:34:36: MQTT publish: topic 'zigbee2mqtt/Master Bedroom Light', payload '{...,"powerType":1,...}'

vs.

15.86.1

debug 2023-10-11 16:15:16: Received MQTT message on 'zigbee2mqtt/Master Bedroom Light/get' with data '{"powerType":""}'
debug 2023-10-11 16:15:16: Publishing get 'get' 'powerType' to 'Master Bedroom Light'
debug 2023-10-11 16:15:16: Received Zigbee message from 'Master Bedroom Light', type 'readResponse', cluster 'manuSpecificInovelliVZM31SN', data '{"powerType":1}' from endpoint 1 with groupID 0
info  2023-10-11 16:18:05: MQTT publish: topic 'zigbee2mqtt/Master Bedroom Light', payload '{...,"powerType":"Neutral",...}'

@Koenkk
Copy link
Owner

Koenkk commented Oct 12, 2023

Should be fixed 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)

@raineth
Copy link

raineth commented Oct 12, 2023

Everything seems to be working properly with zigbee-herdsman-converters@15.93.0, thank you!

Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Apr 10, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 10, 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 stale Stale issues
Projects
None yet
Development

No branches or pull requests

5 participants