Closed hamstercat closed 1 year ago
Hey there @home-assistant/z-wave, mind taking a look at this issue as it has been labeled with an integration (zwave_js
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
zwave_js documentation zwave_js source (message by IssueLinks)
From the driver log it looks like there's a scene activation event when turning the device on but no scene activation event when turning the device off.
This explains why you get a value notification event in Home Assistant when turning the device on and no event when turning the device off.
https://www.home-assistant.io/integrations/zwave_js/#scene-events-value-notification
That makes sense. I'm trying to get the "turn off" event through other means, but not having any luck with zwave_js_value_updated
.
Re-reading the docs you linked, I see 2 other triggers I had not tried yet though, zwave_js.event
and zwave_js.value_updated
. I will try to get one of these set up.
@hamstercat where did you land on this ? I just got one of these and am just getting started trying to integrate it
This problem was fixed in the driver over a year ago, so it's unclear why this issue has returned. Either a different device, or the compat setting was not applied, or a regression in the driver.
If you're still having an issue, re-interview the device and provide a Device diagnostic file (Device page -> Z-Wave Info -> ... -> Download diagnostics), plus logs showing the button presses.
I'm still trying to make it work, I've stopped using the physical buttons while I figure this out. I should get back to it and try again see what I'm missing. I will update to the latest version this week-end and see where that leads me.
Where I left it at is that the device works well in zwave-js, I'm just not managing to receive an event (any event) in Home Assistant when I press the button to turn it off.
I'll re-interview the device and provide logs if I can't figure this out, but do let me know if you manage to make it work on your side!
@hamstercat thanks !
I am having the same problem as described here, so I'm trying to collect the Device Diagnostics log, but it's failing to download (not sure why, everything else seems to download fine).
Here's what I get when I push one of the buttons to turn the indicator on:
2023-01-02T17:49:55.094Z CNTRLR [Node 028] [translateValueEvent: value notification]
commandClass: Scene Activation
endpoint: 0
property: sceneId
propertyKey: undefined
internal: false
secret: false
event source: undefined
2023-01-02T17:49:55.100Z CNTRLR [Node 028] [!] [Scene Activation] sceneId: 1 [Endpoint 0]
2023-01-02T17:49:55.105Z CNTRLR [Node 028] [translateValueEvent: value notification]
is root endpoint: true
is application CC: true
should hide root values: false
2023-01-02T17:49:55.113Z CNTRLR [Node 028] [translateValueEvent: value updated]
commandClass: Scene Activation
endpoint: 0
property: dimmingDuration
propertyKey: undefined
internal: false
secret: false
event source: undefined
2023-01-02T17:49:55.120Z CNTRLR [Node 028] [~] [Scene Activation] dimmingDuration: {"value":0,"un [Endpoint 0]
it":"seconds"} => {"value":0,"unit":"seconds"}
2023-01-02T17:49:55.125Z CNTRLR [Node 028] [translateValueEvent: value updated]
is root endpoint: true
is application CC: true
should hide root values: false
2023-01-02T17:49:55.137Z DRIVER « [Node 028] [REQ] [ApplicationCommand]
│ type: multicast
└─[SceneActivationCCSet]
scene id: 1
dimming duration: 0s
2023-01-02T17:49:55.157Z SERIAL « 0x010a0004001c042b010100c2 (12 bytes)
2023-01-02T17:49:55.163Z SERIAL » [ACK] (0x06)
2023-01-02T17:49:55.175Z CNTRLR [Node 028] [translateValueEvent: value notification]
commandClass: Scene Activation
endpoint: 0
property: sceneId
propertyKey: undefined
internal: false
secret: false
event source: undefined
2023-01-02T17:49:55.181Z CNTRLR [Node 028] [!] [Scene Activation] sceneId: 1 [Endpoint 0]
2023-01-02T17:49:55.187Z CNTRLR [Node 028] [translateValueEvent: value notification]
is root endpoint: true
is application CC: true
should hide root values: false
2023-01-02T17:49:55.195Z CNTRLR [Node 028] [translateValueEvent: value updated]
commandClass: Scene Activation
endpoint: 0
property: dimmingDuration
propertyKey: undefined
internal: false
secret: false
event source: undefined
2023-01-02T17:49:55.199Z CNTRLR [Node 028] [~] [Scene Activation] dimmingDuration: {"value":0,"un [Endpoint 0]
it":"seconds"} => {"value":0,"unit":"seconds"}
2023-01-02T17:49:55.204Z CNTRLR [Node 028] [translateValueEvent: value updated]
is root endpoint: true
is application CC: true
should hide root values: false
2023-01-02T17:49:55.212Z DRIVER « [Node 028] [REQ] [ApplicationCommand]
└─[SceneActivationCCSet]
scene id: 1
dimming duration: 0s
And here is what I get when I turn the indicator off for that same button:
2023-01-02T17:48:04.711Z SERIAL « 0x01090004081c03200100c4 (11 bytes)
2023-01-02T17:48:04.727Z SERIAL » [ACK] (0x06)
2023-01-02T17:48:04.749Z DRIVER « [Node 028] [REQ] [ApplicationCommand]
│ type: multicast
└─[BasicCCSet]
target value: 0
2023-01-02T17:48:04.766Z CNTRLR [Node 028] treating BasicCC::Set as a report
2023-01-02T17:48:04.772Z CNTRLR [Node 028] [translateValueEvent: value updated]
commandClass: Basic
endpoint: 0
property: currentValue
propertyKey: undefined
internal: false
secret: false
event source: undefined
2023-01-02T17:48:04.780Z CNTRLR [Node 028] [~] [Basic] currentValue: 0 => 0 [Endpoint 0]
2023-01-02T17:48:04.788Z CNTRLR [Node 028] [translateValueEvent: value updated]
is root endpoint: true
is application CC: true
should hide root values: false
2023-01-02T17:48:04.803Z SERIAL « 0x010a0004001c0420010000c8 (12 bytes)
2023-01-02T17:48:04.809Z SERIAL » [ACK] (0x06)
2023-01-02T17:48:04.818Z DRIVER « [Node 028] [REQ] [ApplicationCommand]
└─[BasicCCSet]
target value: 0
2023-01-02T17:48:04.832Z CNTRLR [Node 028] treating BasicCC::Set as a report
2023-01-02T17:48:04.837Z CNTRLR [Node 028] [translateValueEvent: value updated]
commandClass: Basic
endpoint: 0
property: currentValue
propertyKey: undefined
internal: false
secret: false
event source: undefined
2023-01-02T17:48:04.842Z CNTRLR [Node 028] [~] [Basic] currentValue: 0 => 0 [Endpoint 0]
2023-01-02T17:48:04.846Z CNTRLR [Node 028] [translateValueEvent: value updated]
is root endpoint: true
is application CC: true
should hide root values: false
I am happy to collect the Device Diagnostics, but I'll need some help troubleshooting why they don't download. (I did re-interview the device).
I am happy to collect the Device Diagnostics, but I'll need some help troubleshooting why they don't download. (I did re-interview the device).
Hard to help without some kind of information being provided. Do you have an error message or something to work with?
The browser just said “Couldn't Download - Network Issue”. I tried 3 times. I looked around for log files using SSH, but didn’t see any. The general log files for Shome Assistant didn’t say anything about any failures.
Any errors reported by the browser dev tools (F12)?
The above happened on Edge. I retried on Chrome and it fails the same way. When I hit resume, it says "Need Authorization". Let me try with the dev tools on.
Nothing seems to show up in the dev tools when I click that link.
Under Settings->Logs, when I pick Z Wave JS as the log provider and then click "Re-interview", here are the last bits of the log file (it won't show all of it for some reason):
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:30.398Z CNTRLR » [Node 028] querying association group #237...
2023-01-02T20:28:30.489Z CNTRLR « [Node 028] received information for association group #237:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:30.490Z CNTRLR » [Node 028] querying association group #238...
2023-01-02T20:28:30.574Z CNTRLR « [Node 028] received information for association group #238:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:30.576Z CNTRLR » [Node 028] querying association group #239...
2023-01-02T20:28:30.662Z CNTRLR « [Node 028] received information for association group #239:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:30.663Z CNTRLR » [Node 028] querying association group #240...
2023-01-02T20:28:30.756Z CNTRLR « [Node 028] received information for association group #240:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:30.757Z CNTRLR » [Node 028] querying association group #241...
2023-01-02T20:28:30.845Z CNTRLR « [Node 028] received information for association group #241:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:30.847Z CNTRLR » [Node 028] querying association group #242...
2023-01-02T20:28:30.935Z CNTRLR « [Node 028] received information for association group #242:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:30.936Z CNTRLR » [Node 028] querying association group #243...
2023-01-02T20:28:31.022Z CNTRLR « [Node 028] received information for association group #243:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:31.023Z CNTRLR » [Node 028] querying association group #244...
2023-01-02T20:28:31.106Z CNTRLR « [Node 028] received information for association group #244:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:31.108Z CNTRLR » [Node 028] querying association group #245...
2023-01-02T20:28:31.195Z CNTRLR « [Node 028] received information for association group #245:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:31.197Z CNTRLR » [Node 028] querying association group #246...
2023-01-02T20:28:31.293Z CNTRLR « [Node 028] received information for association group #246:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:31.294Z CNTRLR » [Node 028] querying association group #247...
2023-01-02T20:28:31.398Z CNTRLR « [Node 028] received information for association group #247:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:31.400Z CNTRLR » [Node 028] querying association group #248...
2023-01-02T20:28:31.494Z CNTRLR « [Node 028] received information for association group #248:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:31.495Z CNTRLR » [Node 028] querying association group #249...
2023-01-02T20:28:31.581Z CNTRLR « [Node 028] received information for association group #249:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:31.582Z CNTRLR » [Node 028] querying association group #250...
2023-01-02T20:28:31.679Z CNTRLR « [Node 028] received information for association group #250:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:31.682Z CNTRLR » [Node 028] querying association group #251...
2023-01-02T20:28:31.767Z CNTRLR « [Node 028] received information for association group #251:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:31.769Z CNTRLR » [Node 028] querying association group #252...
2023-01-02T20:28:31.882Z CNTRLR « [Node 028] received information for association group #252:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:31.884Z CNTRLR » [Node 028] querying association group #253...
2023-01-02T20:28:31.971Z CNTRLR « [Node 028] received information for association group #253:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:31.972Z CNTRLR » [Node 028] querying association group #254...
2023-01-02T20:28:32.070Z CNTRLR « [Node 028] received information for association group #254:
maximum # of nodes: 0
currently assigned nodes:
2023-01-02T20:28:32.072Z CNTRLR » [Node 028] querying association group #255...
2023-01-02T20:28:32.161Z CNTRLR « [Node 028] received information for association group #255:
maximum # of nodes: 1
currently assigned nodes: 1
2023-01-02T20:28:32.167Z CNTRLR [Node 028] Checking/assigning lifeline groups: 255
supports classic associations: true
supports multi channel associations: false
2023-01-02T20:28:32.171Z CNTRLR [Node 028] Configuring lifeline group #255:
group supports multi channel: false
configured strategy: auto
must use node association: true
must use endpoint association: false
2023-01-02T20:28:32.219Z CNTRLR [Node 028] Lifeline group #255 is already assigned with a node association
2023-01-02T20:28:32.227Z CNTRLR [Node 028] Interviewing Indicator...
2023-01-02T20:28:32.228Z CNTRLR » [Node 028] requesting current indicator value...
2023-01-02T20:28:32.363Z CNTRLR [Node 028] Interviewing Node Naming and Location...
2023-01-02T20:28:32.367Z CNTRLR » [Node 028] retrieving node name...
2023-01-02T20:28:32.472Z CNTRLR « [Node 028] is named "North Dining Sce"
2023-01-02T20:28:32.474Z CNTRLR » [Node 028] retrieving node location...
2023-01-02T20:28:32.571Z CNTRLR « [Node 028] received location: Dining
2023-01-02T20:28:32.576Z CNTRLR [Node 028] Interviewing Basic...
2023-01-02T20:28:32.581Z CNTRLR » [Node 028] querying Basic CC state...
2023-01-02T20:28:33.703Z CNTRLR [Node 028] Timed out while waiting for a response from the node (ZW0201)
2023-01-02T20:28:33.707Z CNTRLR [Node 028] No response to Basic Get command, assuming the node does not suppor
t Basic CC...
2023-01-02T20:28:33.713Z CNTRLR [Node 028] Interviewing Scene Controller Configuration...
2023-01-02T20:28:34.422Z CNTRLR [Node 028] Interviewing Configuration...
2023-01-02T20:28:34.424Z CNTRLR [Node 028] ConfigurationCC: Loading configuration parameters from device confi
g
I got the debug log from the ZWave JS component and I've snipped what I believe are the relevant portions of the log around the interview time. Not sure if this will be helpful:
Based on the earlier log, the driver is emitting the expected value updated events:
2023-01-02T17:48:04.837Z CNTRLR [Node 028] [translateValueEvent: value updated]
commandClass: Basic
endpoint: 0
property: currentValue
propertyKey: undefined
internal: false
secret: false
event source: undefined
That means you can use the previously mentioned zwave_js.value_updated
event.
I got the debug log from the ZWave JS component and I've snipped what I believe are the relevant portions of the log around the interview time.
You can look in those same logs for a value updated
event when you operate the switch, and that would confirm that the above event type can be used.
There might be a default-disabled sensor.basic_foo
entity you can use, which is what I wanted to confirm in the diagnostic. You can check your device for hidden entities.
However:
2023-01-02T20:28:32.576Z CNTRLR [Node 028] Interviewing Basic...
2023-01-02T20:28:32.581Z CNTRLR » [Node 028] querying Basic CC state...
2023-01-02T20:28:33.703Z CNTRLR [Node 028] Timed out while waiting for a response from the node (ZW0201)
2023-01-02T20:28:33.707Z CNTRLR [Node 028] No response to Basic Get command, assuming the node does not suppor
t Basic CC...
Given the device does not respond to Basic Get, and uses Basic Set, not Basic Set, it seems the value is stateless, which means an entity isn't very useful. A better device compat flag, IMO, would be treatBasicSetAsEvent
. With that flag set, you would get normal zwave_js_value_notification
events instead.
I am investigating the things that you mentioned above. In the meantime, one thing is, I don't see any value updated
events for node 28 (which is the scene controller) in the logs.
Disregard the last comment for now. Still investigating.
I have figured out how to run an automation when you press the button and the light goes on, and run a different automation when you press the button and the light goes out. I'm able to turn only run the automation (for the light turning on) when the appropriate button is pushed. However, I can't figure out how to detect which button is pressed when the light goes off. Here are the two automations that I wrote, any suggestions would be most appreciated:
Turning on:
alias: Turn on Dining Overhead Lights
description: ""
trigger:
- platform: device
device_id: 2148ae3902f5a6fd4fd13da9c7ee1063
domain: zwave_js
type: event.value_notification.scene_activation
property: sceneId
value: 1
endpoint: "0"
command_class: 43
subtype: Endpoint 0
condition: []
action:
- type: turn_on
device_id: a1df927d59ce5f4728f98b933c02621e
entity_id: light.scene_capable_wall_dimmer_switch
domain: light
mode: single
Turning off:
alias: Turn Off Dining Lights
description: ""
trigger:
- platform: zwave_js.value_updated
device_id: 2148ae3902f5a6fd4fd13da9c7ee1063
command_class: 32
property: currentValue
condition: []
action:
- type: turn_off
device_id: a1df927d59ce5f4728f98b933c02621e
entity_id: light.scene_capable_wall_dimmer_switch
domain: light
mode: single
Any ideas on how to find out which button was pressed?
Also, there were no disabled entities for this device.
And, THANK YOU VERY MUCH for your help so far.
While I am not exactly proud of my solution, I have a solution... Maybe someone else has a better idea...
The automation that I am using above for turning off the lights, is now a generic "listener" which runs a script that updates the indicator on that scene controller. Then I made a new automation that listens for when the indicator changes and looks at the value of the indicator to figure out whether to turn off the light. It's pretty ugly right now. I am going to figure out how if I can use a bitmask in the YAML to remove some conditions. Everything works though. I really wish the indicator could get auto updated when this event happens. That would save a bunch of automations.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
I'm trying to configure the RFWC5 with Home Assistant and z-wave-js. I had it working before with the deprecated (now gone) z-wave integration, so I managed to get most of it working again, but turning off a button is not triggering any event in Home Assistant. The device itself is working in zwavejs2mqtt.
What works:
zwave_js_value_notification
when pressing on the button to turn it onzwave_js.set_value
What doesn't work:
The
Indicator value
entity created in Home Assistant doesn't get updated automatically as it did with the previous integration, which is fixable through an automation (attached below). But it relies on being able to receive these notifications when pressing a button.I tried all 3 events (
zwave_js_notification
,zwave_js_value_notification
, andzwave_js_value_updated
) just to see what I could find, but none of them are triggered when turning a button off. There doesn't seem to be a way to receive these notifications currently.What version of Home Assistant Core has the issue?
2022.5.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
z-wave-js
Link to integration documentation on our website
https://www.home-assistant.io/integrations/zwave_js/
Diagnostics information
No response
Example YAML snippet
The automation to update the
Indicator value
when receiving a z-wave-js notification. This works only when turning the button on.Anything in the logs that might be useful for us?
The Home Assistant logs are empty.
The log in z-wave-js when turning the button on (this works):
The log in z-wave-js when refreshing the indicator value (this works):
The log in z-wave-js when turning the button off (this doesn't work in Home Assistant):
Additional information
No response