-
-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Aeotec ZWA012 using dry contact sensors no longer updates occupied state and instead sets "door state" to "5633" #88060
Comments
Hey there @home-assistant/z-wave, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) zwave_js documentation |
Have you already tried re-interviewing the devices? If not, can you re-interview, see if it's still an issue, and if so, include a new device diagnostic? |
Thanks for taking a look @kpine. I already tried reinterviewing the nodes before I filed the issue, and it didn't help. So the attached diagnostic log is from after reinterviewing. |
There are two sensors related to this notification, For "endpoint": 0,
"commandClass": 113,
"commandClassName": "Notification",
"property": "Access Control",
"propertyKey": "Door state",
"propertyName": "Access Control",
"propertyKeyName": "Door state",
"ccVersion": 8,
"metadata": {
"type": "number",
"readable": true,
"writeable": false,
"label": "Door state",
"ccSpecific": {
"notificationType": 6
},
"min": 0,
"max": 255,
"states": {
"22": "Window/door is open",
"23": "Window/door is closed"
}
},
"value": 23 Notice there is no state label for value Does the binary sensor work? HA doesn't not recognize 5633 for that either, so I think it may not report the state change to "open". |
The binary sensor binary_sensor.sams_bed_occupied is not working. Its state never changes. It's the sensor I use in my automations that was previously working. I had disabled the door state entity but reenabled it as part of my debugging when I could see that applying pressure to the sensor was generating traffic in the Zwave logs even though I couldn't see binary_sensor.sams_bed_occupied changing in HA. |
It sounds like there were recent changes in ZWaveJS to parse additional states (like that of a tilt sensor) and include that in the sensor status: |
Yes, the addition of those new event-based states is the root cause. Until now door sensors were only off (23) and on (22). The notification-based binary sensor design does not currently accommodate multiple states, and they also only look for "on" states. Since your device's on state has changed (from 22 to 5633), it's no longer recognized. |
Also, would it be an option to disable tilt detection, and if so, can you try it (parameter 15)? It doesn't sound like tilt detection is necessary for your application? I'm curious if disabling it changes the notification at all. Another option is to switch to using the |
Please confirm you properly re-interviewed the device. If it's on batteries, you need to wake it up. According to the discussion post, the missing metadata is being reported to HA after a re-interview. |
In summary:
HA should include the new values in the notification mapping so the device classes are defined. This still leaves the non-functioning binary sensor for state 22. It is undocumented, but these kinds of values are two-bytes, vs. the normal one-byte, and are encoded with the original state value in the upper byte, so HA could simply shift the values to support the original sensor ( Unfortunately, the states that are unused by a device can't be known ahead of time, so this introduces entities that never change, similar to door lock door sensors. |
Thanks for the investigation @kpine ! I was able to reinterview all of the impacted sensors (I had to exclude & include one as it got stuck being unable to interview). Then Binary sensors for the new state values appeared in HA. I disabled the tilt sensor and made the binary "open in regular position" sensor my presence sensor. |
I would suggest leaving the issue open. At the minimum, the device classes should be assigned for the new sensors. |
I have done the same thing. After reconfiguration, my automations are working again. Unfortunately, this has broken the ability of my alarm panel to alert when the door is opened when armed. |
In what way? You'll have to elaborate. |
The alarm does not trigger when the door is opened. Previously, when the door was opened the alarm entered the "triggered" state, which kicked off additional automations. The alarm remains in the "armed" state and never enters the "triggered" state when the door is opened. I am using the manual alarm control panel from the docs found here. |
You'll also need to update your manual alarm control panel template to use the new entity. |
I'll investigate that. The strange thing is I didn't have the old entity in the configuration. I'll report back if I figure it out. |
Then it seems you are missing some entity change somewhere, Whatever is responsible for triggering the alarm state hasn't been updated. |
You are 100% correct. You got me thinking about how my trigger was set to fire. I quickly found an automation that uses a sensor group to enter the alarm into the "triggered" status. After updating the entity in the group, the alarm began functioning as expected. Thanks for the push. I have configured so much in the past two months since putting this together it's all running together on me. Once I re-interview my additional doors/windows and update my group entities, I'll be back in business. Thanks for everything you do! |
With Z-Wave JS v10.13.0 there is now a "simple" value that restores the previous behavior, where the entity state will be "on" if the door is open no matter which state it is (open, regular position, tilt position). There is no change necessary in HA to support this, and I don't think you even need to re-interview. However, HA does not have any special discovery logic or naming for this new sensor, so it will appear identical in naming to the existing one (original name). Therefore, there will be a total of 4 entities. Depending on the device, some will have duplicate functionality (open/close and simple), and some not work at all (regular position, tilt position). You can just disable the entities that aren't useful. To determine which entity corresponds to the "Simple" value, you can download the device diagnostic and find the binary_sensor entity that maps to "Door state (simple)". |
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. |
The problem
I had previously configured multiple ZWA012, AeoTec Door / Window Sensor 7 Pros to use the dry contact sensor and serve as bed presence sensors. They were working well with HA 2023.1 and correctly reporting "occupied" or "clear." Now after running 2023.2.1+ and the latest ZWaveJS, the state of the presence sensor (binary_sensor.sams_bed_occupied) never changes. However, the state of "Door state" (sensor.sam_s_bed_door_state) does change when weight is applied to the sensor, but it changes between "Window/door is closed" and "5633." It seems like the mapping between ZWave state and HA entities is mismatched? Reinterviewing nodes didn't help.
The Logbook only shows updates to "door state" and not to the "occupied" sensor. It also shows "5633" instead of a friendly state:
Sam's Bed Door state changed to Window/door is closed
11:41:10 PM - 9 minutes ago
Sam's Bed Door state changed to 5633
11:41:08 PM - 9 minutes ago
What version of Home Assistant Core has the issue?
2023.2.4
What was the last working version of Home Assistant Core?
2023.1.1
What type of installation are you running?
Home Assistant Container
Integration causing the issue
zwave-js
Link to integration documentation on our website
https://www.home-assistant.io/integrations/zwave_js/
Diagnostics information
zwave_js-31cc309ab9532c1f73754e459f74581e-Sam's Bed-aee5eea3d42cc10ed623be7c8974627b.json.txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
I have 3 of these sensors - they all seem to have the same issue.
The text was updated successfully, but these errors were encountered: