home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.94k stars 29.03k forks source link

Home Assistant not receiving any zwave_js_event events. #46084

Closed jef-pearlman closed 3 years ago

jef-pearlman commented 3 years ago

The problem

I do not appear to receive any zwave_js_event events in Home Assistant. If I turn on the Developer Tools / Events logging for zwave_js_event or for "*", I never see any of these events, even when I trigger buttons, switches, motion sensors, etc. My zwave_js integration is otherwise working great; state-based automations work fine, devices are responsive, etc. (In fact, as far as I can tell, my inability to catch central scene events is the only way this isn't yet as good as the beta openzwave integration I was using before--impressive work!)

I am using the latest version of the zwavejs2mqtt addon. I originally used the official zwavejs addon, and I believe I had the same problem then, though my testing was less thorough. (I just turned on * and looked for zwavejs-related events and saw none.)

What is version of Home Assistant Core has the issue?

core-2021.2.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

zwave_js

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zwave_js/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

# Put your logs below this line
2021-02-05 14:30:27.203 INFO ZWAVE: Node 79: value updated: 128-0-level 97 => 96
2021-02-05 14:30:27.205 INFO ZWAVE: Node 79: value updated: 128-0-isLow false => false
2021-02-05 14:30:27.239 INFO ZWAVE: Node 79: value notification: 91-0-scene-003 0
14:30:27.241 CNTRLR « [Node 079] received CentralScene notification {
"nodeId": 79,
"ccId": "Central Scene",
"ccCommand": "0x03",
"payload": "0xfa8003"
}

That's from the zwavejs2mqtt logs (with logging enabled for both zwave_js server and z2m serv). It shows the response to a battery-powered button generating a central scene notification. No zwave_js_event was received.

Happy to provide more information it would be helpful. Thanks!

Here's a screenshot of the developer tools events page list of Available Events, not showing zwave_js_event: image

And this is tracking zwave_js_event, with no triggers no matter how long I wait or what I do on the network: image

probot-home-assistant[bot] commented 3 years ago

Hey there @home-assistant/z-wave, mind taking a look at this issue as its been labeled with an integration (zwave_js) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

marcelveldt commented 3 years ago

This should work perfectly fine, as confirmed by multiple users already. Some things to check:

1) Are you running the latest version of the Z-wave JS to MQTT Add-on (0.3.0) ? 2) Is the battery powered device remove fully interviewed once by Z-Wave JS ? In Home Assistant look in the overview page of the device, it should show" ready: yes"

jef-pearlman commented 3 years ago
2. Is the battery powered device remove fully interviewed once by Z-Wave JS ? In Home Assistant look in the overview page of the device, it should show" ready: yes"

Thanks! I think this is the source. I foolishly looked at the z2m panel instead of the HA device, asked it to re-query the device, and woke it so by the time I saw that device in HA it was ready--and then events started showing up for the device.

I tested with a different device (105) and the results were consistent. For 105, z2m is reporting receiving central scene events but they do not get sent as zwave_js_event. 105 seems stuck at the ProtocolInfo interview stage. No matter how many times I use it or wake it, it never seems to complete the interview, become ready, or start sending the events to HA. (This is consistent with the other device, which I had woken and used many times without it ever sending events.) For the moment, I have not asked z2m to re-query 105 so I can keep it in this state for testing.

So that leaves two questions:

  1. Is it working as intended for received events to not get passed to HA if the device isn't ready?
  2. Is it working as intended for the interview to never complete under these circumstances? (As in, is there something more I'm supposed to do to get it to finish under normal circumstances?)

If the answer to both is yes, then this issue can probably be closed. BTW, the device is shown as Awake in z2m, but still on ProtocolInfo: image

Thanks again!

marcelveldt commented 3 years ago

1) Yes that is intended. Home Assistant will only handle entities and events once the node is ready. So, the interview must be passed once to have all values present.

2) Well, battery nodes are a bit cumbersome sometimes. For example I had a few that I just had to wake with the button once to get them fully interviewed, some others came in by itself after a day or so and I had some that required some real tinkering to get them to finally finish their interview. Keep waking it up until all info is retrieved and patience is the best/only advice here.

MartinHjelmare commented 3 years ago

Thanks for taking the time to thoroughly investigate this. It may help other users with similar problems.

jef-pearlman commented 3 years ago

Thanks for your help! I might end up opening another issue if I can't get devices to ever become ready without manually re-interviewing, but I'll experiment a bit first. (I have a couple of devices that are paired but unused and not ready; I'm going to keep "using" them and waking them for a while to see if it eventually changes.)

MaxR0SS commented 3 years ago

I have a similar issue here, with many devices working once interviewed and controllable, but no listner is discovered or showing as an available event type. I am running zwavejs2mqtt in a docker container but the official 1.0.5 app version is only on Zwavejs Version 6.1.2 rather than the latest 6.1.3 so hope that will be updated soon and may resolve some issues?