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
zwave_js: Possible to expose more entities from ID Lock? #45746
Comments
The PR I just linked will add support for Notification events. I think it's what you are missing, but we will know more once it's available for you to test with |
@BoneheadFraggle can you confirm that you have what you need with the new events? |
@raman325 Enabling Away Mode however does not generate an event. Away mode is the natural trigger for arming/disarming the alarm, so being able to use that would be a great benefit. Chronology for the example below:
It seems like the "Notification Parameter / COMMAND_CLASS_NOTIFICATION (V4) / Access Control (0x06)" is the result I get from the event below, while the Away Mode is considered being in "COMMAND_CLASS_CONFIGURATION / Lock Mode". Anyway, thanks again! |
@BoneheadFraggle Sorry if this is off topic, but how would one create a template sensor that, for example, shows the latest userId? I'm stumped at how to bring the data from an event into a template sensor. |
@Skeletorjus I'm sure there are several methods, but I googled and found this: https://github.com/azogue/eventsensor which does exactly what I wanted. I made one sensor for the action (i.e. Keypad lock operation) and another for last user based on this: https://github.com/azogue/eventsensor#a-hue-dimmer-switch-integrated-in-ha-via-hue-integration. And then a template sensor to combine them like "only show the user if the last action is Keypad unlock operation, otherwise show the last action only". |
@BoneheadFraggle hmm, well if it either has to be a value or an event. Can you take another state dump of your network and see if you can find the away mode as a value? If not, you may need to connect a client to your server to listen for messages and trigger away mode and see what gets generated. You can find instructions on how to do that here: https://github.com/zwave-js/zwave-js-server/ |
I did a new dump and I can't see anything about the away mode. I'm not gonna pretend I understand how this works so forgive me if I don't make any sense, but from what I read in the docs, entering Away mode is a Configuration Parameter and not a Notification Parameter. Which sounds familiar, I remember from trying to fetch it last time, there was something about that. I think we "need to request the current config status from the lock", rather than waiting for the lock to tell us it changed to Away mode. Previously I read the logs and searched for the config string whenever the lock changed state which worked really well despite being a bit primitive.. I found the lock in the Z-wave alliance: https://products.z-wavealliance.org/products/3450/configs I'll definitely try to connect a client and see what I can get from there, but since I'm totally new to Linux, it may take some time :-) |
thanks for the info @BoneheadFraggle so good news/bad news - the state dump should include configuration parameters, so if you didn't find it in there it may not be a configuration parameter. But the easiest way to tell will be to run the client and see what gets returned when you perform the action. BTW you don't need to be on Linux to run the client, but you do need |
Sorry about that. I just didn't look close enough. The value is indeed included in the dump, the value we want at the very end: Away mode off
Away mode on
|
OK so maybe we need to create sensors for Configuration Parameters at some point (disabled by default) so that you can access this value. |
Ok, sounds promising :-) |
Nope, nothing for now! |
@raman325 I have tried to keep up with all the changes and new functionality in Z-wave JS and I have seen a lot regarding Config Parameters, but I don't understand if that affects this issue. Do you know if it is possible now? Just curious, not asking for ETA. |
It's not possible yet in the upcoming release. I asked about the possibility of creating entities for config parameters and the idea was shot down. The alternative is to target specific parameters to make entities. I'm not a huge fan of this approach but it seems to be the one most accepted among the dev team. I will ask again about this and if that's where we land, we can add support for it in 2021.4. Truthfully I forgot about this and was focused on other areas for 2021.3 |
No problem, just curious. Thanks for all your efforts! |
Just being curious, I activated debug mode zwave logs today.
And then I can fetch the mode change from the log. Anyway, in the debug log it shows up like this, "newValue" showing the lock mode: From Home Mode > Away Mode
From Away Mode > Home Mode
I can grep it there, but is there any way to configure the "type":"event" to show up in |
These will not show up as events because they are value updates. Think of them like state updates. What we are missing is an entity for this particular property. Can you send me a current dump of your lock? I can look at adding support |
Ok, that makes sense even to me. Thanks. Here's a new dump of the lock. Quite nice to read now compared to the old structure :-) |
FYI this entity has been added and will be released in 2021.4. The entity is disabled by default so you will have to enable it |
The problem
To get full use of the lock and automations, it would be very nice to see which tag or code that locked or unlocked (interacted with) the lock and if the lock is in "away" mode.
This didn't work out-of-the box in the old Z-wave integration either, but then you could fetch the data in the log and create template sensors from the actions identified there.
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
Example of the old logs https://community.home-assistant.io/t/integration-with-id-lock-150/78645/6
Additional information
Technical documentation for the lock's Z-wave module: https://idlock.se/wp-content/uploads/2019/08/IDLock150_ZWave_UserManual_v3.02.pdf
Attached the part of zwave_js_dump.jsonl regarding the lock.
zwave_js_dump.zip
The text was updated successfully, but these errors were encountered: