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
73.65k stars 30.8k forks source link

No zwave-js events shown in Events #47610

Closed Sanitys closed 3 years ago

Sanitys commented 3 years ago

The problem

I have the same problem as posted here: https://github.com/home-assistant/core/issues/46084 no events are shown for any Zwave devices on my network. They all work fine, but I want to see events so I can setup a Aeon Labs Minimote. The device reports ready on the device info seen here:

Device info DSA03XXX-ZW by AEON Labs Firmware: 1.19 Z-Wave Info Home ID: 3429000190 Node ID: 13 Node Status: Asleep Node Ready: Yes

i do not have any other zwave addons except Zwave-JS. I read some articles about adding the MQTT one but I can't figure out how to get that to work with Zwave-JS. Any idea why I cant see any zwave events using * or zwave_js_event?

What is version of Home Assistant Core has the issue?

core-2021.3.2

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

# Put your YAML below this line

Anything in the logs that might be useful for us?

# Put your logs below this line
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)

basklabbers2 commented 3 years ago

I have got the same issue. Used to have a remote control connected which worked and also showed up nicely when monitoring zwave_js_event Now it doesn't anymore, also core-2021.3.2 I did manage to add a new device, a sensor, but not getting any entities/attributes or events. no errors or warnings in the log.

brgerig commented 3 years ago

I'm having the same issue. New HA install (but migrated configs, then added zwavejs, no previous zwave), core-2021.3.2. Not using the official addon—running standalone zwavejs2mqtt in websocket mode on the same host. zwavejs-server version is 1.1.0. All nodes are ready, and function just fine in every way, just no events.

dtx360 commented 3 years ago

+1 Same setup as @brgerig. No zwave events in HA.

kpine commented 3 years ago

The minimote is working fine over here. A few things to try:

  1. If you moved from a hub like SmartThings, make sure the minimote is configured for scene mode, which it isn't by default (see user guide, use zwavejs2mqtt to enable).
  2. Make sure you're actually listening to the event in the event viewer (type zwave_js_event into event listener box, click on Start Listening). Clicking on the event in the sidebar does not listen to it.
  3. Use zwavejs2mqtt's debug panel and see if the events are detected there. If not, the issue is with the remote.

Most zwave devices won't show any events. Events are emitted for Central Scene, Scene Activation, Basic Set, and Notification CC.

Example event for minimote:

{
    "event_type": "zwave_js_event",
    "data": {
        "type": "value_notification",
        "domain": "zwave_js",
        "node_id": 9,
        "home_id": 3611217407,
        "endpoint": 0,
        "device_id": "31de04fb98a8ef8e5a737a02a60d7606",
        "command_class": 43,
        "command_class_name": "Scene Activation",
        "label": "Scene ID",
        "property": "sceneId",
        "property_name": "sceneId",
        "property_key": null,
        "property_key_name": null,
        "value": 1,
        "value_raw": 1
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-11T22:31:05.002579+00:00",
    "context": {
        "id": "02c49fa40afe010f17921d21716ccc3b",
        "parent_id": null,
        "user_id": null
    }
}
brgerig commented 3 years ago
  1. Use zwavejs2mqtt's debug panel and see if the events are detected there. If not, the issue is with the remote.

Most zwave devices won't show any events. Events are emitted for Central Scene, Scene Activation, Basic Set, and Notification CC.

I'm expecting to get events from my door lock. Here's the debug log from locking the door, then unlocking it with the code:

2021-03-11 20:39:10.364 INFO ZWAVE: Node 15: value updated: 98-0-currentMode 0 => 255
2021-03-11 20:39:10.366 INFO ZWAVE: Node 15: value updated: 98-0-outsideHandlesCanOpenDoor false,false,false,false => false,false,false,false
2021-03-11 20:39:10.366 INFO ZWAVE: Node 15: value updated: 98-0-insideHandlesCanOpenDoor false,false,false,false => false,false,false,false
2021-03-11 20:39:10.367 INFO ZWAVE: Node 15: value updated: 98-0-latchStatus open => open
2021-03-11 20:39:10.368 INFO ZWAVE: Node 15: value updated: 98-0-boltStatus locked => locked
2021-03-11 20:39:10.369 INFO ZWAVE: Node 15: value updated: 98-0-doorStatus open => open
2021-03-11 20:39:16.138 INFO ZWAVE: Node 15: value updated: 113-0-alarmType 16 => 16
2021-03-11 20:39:16.139 INFO ZWAVE: Node 15: value updated: 113-0-alarmLevel 2 => 2
2021-03-11 20:39:16.162 INFO ZWAVE: Node 15: value updated: 32-0-currentValue 255 => 255

The alarmType and alarmLevel are Notifications, and those are what I expect to be sent as events: image Should something called "event" be showing up in the debug log? Nothing is. And no zwave_js_event shows up in HA.

kpine commented 3 years ago

No, those are all values, not events. Values are translated to entities in HA. You will have (probably disabled) entities for those alarm values. A "value notification" or "notification" would be an event in HA.

2021-03-11 17:49:33.747 INFO ZWAVE: Node 9: value notification: 43-0-sceneId 1

For locks, node-zwave-js is handling mapping of alarm values to lock updates. https://github.com/zwave-js/node-zwave-js/issues/1713

An example notification from a lock, according to that issue:

2021-02-12 18:23:07.806 INFO ZWAVE: Node 137: notification: Manual unlock operation

The "Notification" values in zwavejs2mqtt are also just plain values, it will not show events. Many notifications from the Notification CC are represented as state variables, not all of them are passed on as events. There are many locks that do in fact send notification events, but your lock appears to be one that uses the old alarm CC.

brgerig commented 3 years ago

You're right, I do have disabled entities for those, which I've just been ignoring because I believe that's how they're expected to be.

Ah-ha! And reading through that link you included, I see that those disabled entities can actually be manually enabled, at which point I can actually get values for them. That should be enough for me to make automations to do what I need, namely act on the particular code used to unlock the door. Thank you!!

raman325 commented 3 years ago

Please let me know if this issue needs to be reopened, but for now it seems to be resolved

avocadio commented 3 years ago

I using hassio with ' Z-Wave JS to MQTT' using WS only (no MQTT), similar setup as @brgerig and seem to have a very similar issue, the context is slightly different though; I have a couple 'Everspring AN145-4 Z-Wave Smart Light Lamp Holders'.
They lack of default states setting (on, off, last known state) after power comes.

I was hoping to change the light to on when the Zwave states was 'ready' however there are no event on 'zwave_js_event' or '*'. On the zwave hassio entity interface the state is correctly reported:

Z-Wave Info
Home ID: 336......
Node ID: 19
Node Status: Alive
Node Ready: Yes 
SlyBlueFox commented 3 years ago

I seem to be having the same issue as well now using hassOS with ZWaveJS2MQTT' and using WS only. The entites still function, but I appear to no longer be getting zwave_js_events.

raman325 commented 3 years ago

Are you using the latest release? If so check the breaking changes section

SlyBlueFox commented 3 years ago

for me it happens both on 2021.04 and 2021.03, not seeing anything come through under zwave_js_value_notification or zwave_js_notification when on 2021.04

When viewing all events I can see the state change, but there is nothing under zwave_js at all showing image

raman325 commented 3 years ago

for me it happens both on 2021.04 and 2021.03, not seeing anything come through under zwave_js_value_notification or zwave_js_notification when on 2021.04

When viewing all events I can see the state change, but there is nothing under zwave_js at all showing image

What type of device are you expecting events for? You will only get them for locks and scene controllers I believe.

SlyBlueFox commented 3 years ago

wow i feel like an idiot, I'm new to zwavejs and assumed all device made events similar to mqtt. The device I was having the issue with is a HomeSeer HS-200+, but it is in my basement so I was testing upstairs with a spare switched outlet out of convenience. Thank you for the help and your time @raman325

raman325 commented 3 years ago

no worries, glad it's resolved. In the future, please open a new issue so we don't miss it, thanks!