This is awesome! I see now how you extracted the event data. It’s implemented and doing everything I’m looking for it to do thanks to you and @pnbruckner!
I made one correction as it looks like a small typo in the even data for the “Locked (Manual)” The event data was duplicated from the “Unlocked (Manual)” Changed ‘unlock’ to ‘lock’
I found this automation useful, it also works for a Kwikset 888 and it may work for a 910 too (need to test this). I wanted to share some updates here for others, on the latest HA update two things changed, the event_type and event_label. I also changed the “else” line to be a catch all.
Thank you! I meant to post an update last week when I saw these changes with the core update. You caught them all.
To summarize for those just catching up, because of the “Breaking ZwaveJS changes” on core-2021.04.00, Zwave_JS_event changed to Zwave_JS_notification and the “label” tag changed to “event_label”
For some reason when I lock/unlock through Home Assistant, there is no event created. Events are only generated when I manually interact with the lock. Is this expected? If not, does anyone know why that would be? I basically never see the “RF (un)lock operation” event_label. I was able to see that with the sensor before moving to zwavejs2mqtt.
I subscribed to zwave_js_notification and when I manually lock the door I see an event with event_label ‘Manual lock operation’. But, if I unlock or lock in Home Assistant, no zwave_js_notification event is fired at all.
Interesting. On my end, I see “RF lock operation” or “RF unlock operation” under event_label like you stated. Are you viewing the event data from the Developer Tools ->Events tab when you subscribe to zwave_js_notification?
What events are fired if you lock/unlock via the keypad?
Also, when you moved to zwaveJS2mqtt, did you update the ZwaveJS integration with the proper server address? It should look something like this when you go to Integrations->ZwaveJS->configure.
Yep, I am subscribing to the events from Developer Tools > Events. The ZwaveJS integration is showing connected and I can lock and unlock without issue.
When I use the keypad, I see the correct event showing: “event_label”: “Keypad lock operation”. For whatever reason, only remote commands do not trigger any events even though the lock locks/unlocks as expected.
What about the server address in the ZwaveJS integration? Look at the second part of my previous reply for details. This has caused strange integration issues for me in the past when setup wrong. Especially since you mentioned a recent switch to ZwaveJS2mqtt, a confirmation that this is setup correctly would eliminate a multitude of t/s-ing steps.
hi Chris, I’m new to HA - I copied the code snippet and put it in automations.yaml, created the input_text variable and just changed out the node_id to one of my lock nodes. for some reason, when I do a ‘run actions’ on the automations page, I get ‘Error: Error rendering data template: UndefinedError: ‘dict object’ has no attribute ‘event’’
Is/was there ever a plan by the developers to actually extract this information and make it an attribute or entity? I just switched over to zwave js and for me it luckily only broke just one automation, but I was planning on eventually making a number of automations based on the user codes. It looks like a pain to get that information in a usable form now.
I’m running a raspberry pi externally to Home Assistant, running Zwave JS (latest) and websockets to a Home Assistant VM I have on my virtual infrastructure.
I can’t seem to view any zwave_js_notification event data.
I have not configured MQTT or Gateway on the Zwave JS on the rpi, is that something I need to do?
If so could you provide an exmaple of the configs?