Request to add device to the Z-wave DB - New version of ID Lock

I must have missed your answer Scott. I was able to get the RPi very close to the lock and when I included it in habmin I got the notification in the top right corner that it was securely included. However I thought the security check box was just for informing that the device supports secure inclusion, but this means that itā€™s been securely included from day 1 :smiley:

So I guess Iā€™m now just waiting for the final review of my DB entry and then Iā€™m good to go. Do I need to reinclude/heal it after itā€™s available in the DB or should openhab update the device automatically?

You wonā€™t need to reinclude it, but you may need to delete the Thing and rediscover. That will load the new Thing definition. Itā€™s possible that you may not need to do anything though, once it is correctly identified. Hopefully, @chris will approve the changes and get a build out this weekend!

Ok thanks! Canā€™t wait :hugs:

Hey again,

I donā€™t know what Iā€™m doing wrong, but I can see that there was a new build of the binding on GIT hub. I couldnā€™t find a new version of the JAR file though. Iā€™ve tried all night to create a working JAR file from the GIT repository without getting it to work. I googled these steps so I donā€™t even know if itā€™s possible to do it like this. Could someone guide a noob in how to get this new build in? I was running the build from the 3rd of August until now when started to mess things up :slight_smile:

No - there hasnā€™t been an update yet. Iā€™ve made some changes this morning, and I have updated my code here, but what you see on GH is the master binding - not the development binding.

I will likely do this tomorrow now.

Hi Chris, yesterday I downloaded and installed the new build and I got all the parameters to work which is awesome :slight_smile:

However, I was not able to get any of the Channels to work. Nothing happens when I click the ā€œDoor Lockā€ and I donā€™t get any battery indication. The alarms I donā€™t understand how to I should use. I donā€™t know if Iā€™m doing anything wrong (or not doing it at all). I enabled the logs already during the weekend and forgot to disable them again, so the logs are both with the previous build and the new one. I think installed the build at 9:15 and you can find those logs here. When I got home I started to play with the new configuration and that was around 19:21, or at least the logs show Param activity at that time. You can find those logs here

I imported both of them to the log viewer tool on cd-jackson.com, but I couldnā€™t draw any conclusions based on them. I just saw that there was a lot of activity and something happened almost every minute.

I can see all four channels in Habmin and Paper UI

Can someone make anything out of this?

The log looks like the lock is responding to commandsā€¦

But there are some USER_CODE_GETs, so it looks like the lock is not done initializing. Secure devices will take a while, especially locks that have a lot of user code slots. Until it is done initializing, there wonā€™t be a handler assigned to the channels. Try giving it some more time to complete. Iā€™m 90% sure I have this rightā€¦ Chris will know best!

Ok thanks. I think there are 109 code slots so it can indeed take some time. I will give it til Sunday and let you know if there is any change

Nice! Will also test this.lock out as I got.my hands on one.just recently. Will be interesting to see if it is somewhat battery friendly.

An hour would have been a long time! If it isnā€™t working by now, thereā€™s a problem.

Ok, I tried after 24h and the Channels were still not working. But as you can see from the logs I was able to update the parameters. So thereā€™s something wrong with the Endpoint or Command classes.

I compared with the DB entry for ID Lock 101 and noticed that the guy who added it created a new endpoint, but left the other one empty and with the same endpoint number (0).

Iā€™m home tomorrow so I can try including and excluding it from the controller, but it feels like itā€™s initiated correctly since the parameters are working.

Have you seen this type of error before and/or do you know what could be the reason?

Also, according to the manual you should be able to get information about alarms (unlock by code and which code etc.), but the ā€œAlarm accessā€ is a Switch which I guess just indicates if an alarm is sent. So should I add a Alarm_raw command class in the DB or what should I do to get that information?

Eureka! I noticed that there were several XML files on both the ā€œlock nodeā€ and the ā€œcontroller nodeā€. I did a factory reset of both devices, removed the XML-files and initialized the lock again. After that the battery and lock channels started to work.

I still have some problems with the notifications, but I need to run some more tests to understand the problem. So far Iā€™ve noticed one thing in the logs that I reacted on and that is ā€œchannel alarms_access is not implementedā€. Any idea what that might mean? See full message below

[DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter NOTIFICATION event is 6, channel alarm_access is not implemented.

I havenā€™t tested my lock yet. Rebuilding the exterior of the house and going to switch front door. Can hopefully test the zwave module.in a week or two.

At one point you had an item linked to this channel. Make sure that you still have one after resetting the lock.

An alarm_raw channel will report a json string message with all of the details about an alarm event. Youā€™ll then need a rule to parse and respond to it. There are examples on the forum. You can add this to the lock in the device db. The other alarm channels are switches that respond to specific alarms from the lock. These are easier to use than alarm_raw, but they do not contain all of the information. For example, I use alarm_raw to know which code was used to open my locks, and use this info as an input to presence detection.

By item, do you mean an item in the item config file? Since the channels have not worked earlier I have not bothered to create items. But I will do that and see what happens.

This is exactly what I want to do. I want to keep a log over codes used and when in my influxdb. Iā€™ll add it to the db and search the forum for some examples.

Yes. Based on the image, you had one linked to the channel in this post.

quote=ā€œkosken, post:33, topic:48824ā€]
Iā€™ll add it to the db and search the forum for some examples.
[/quote]
Here is what I use for a Schlage BE469 (it may not be up-to-date though). My lock does not report the lock state, so I have to use alarm_raw to update an item so that I know if itā€™s locked or not. But there is a section where I am also picking out the code used to unlock it.

Check this out tooā€¦

@kosken, did you get everything to work?
How do you experience battery life? Iā€™ve read there are users having problems with the z-wave module draining battery.
If you have the time , please write down how you parsed the _RAW json string to get the info you wanted :slight_smile:Thanks!

Iā€™ve havenā€™t had time to even add the _raw class to the db so no progress there unfortunately. Last improvement I made was to classify the lock as a swith and got it working with the new Google assistant integration. Even though ā€œswitch of front doorā€ isnā€™t the most obvious thing to say to unlock the door, itā€™s working :smile:

Regarding the battery life I initially thought I didnā€™t have a problem because I didnā€™t get any warnings after the first 3 weeks. But then last week I had to change them. Iā€™ve tried to extend the polling, but itā€™s hard to know if itā€™s had any impact yet since the battery status class doesnā€™t work either (also a common problem with this module). So yes, I have a problem with battery life, but it I donā€™t know how extensive it is :slight_smile:

1 Like

Hey! Iā€™ve made a lot of progress, but I havenā€™t posted any updates here so now itā€™s time. Iā€™ve added the alarm_raw channel and I get the json string from that channel as anticipated. I simplified the code you wrote @5iver since I only have one lock (I assume your code included a solution for three locks). It is most probably not the most beautiful piece of code or most efficient, but it works and now it looks like this:

//Rule for updating the lock status based on alarm_raw channel
rule "Lock: Update lock states after alarm_raw event"
when
    Item FrontDoor_Alarm_Raw received update
then
    logDebug("lock", "Lock: Alarm events: {}=[{}]",FrontDoor_Alarm_Raw,triggeringItem.state.toString)
    switch (transform("JSONPATH","$.type",triggeringItem.state.toString)) {
        case "ACCESS_CONTROL" : {
            switch (transform("JSONPATH","$.event", triggeringItem.state.toString)) {
                case "1" : {
                    LockStatus.postUpdate("Locked")
                    logDebug("lock", "Lock: Alarm events: {}",LockStatus)
                }
                case "2" : {
                    LockStatus.postUpdate("Unlocked from the inside")
                    logDebug("lock", "Lock: Alarm events: {}",LockStatus)
                }
                case "4" : {
                    LockStatus.postUpdate("Unlocked with RFID key tag #" + (transform("JSONPATH", "$.code", triggeringItem.state.toString))) 
                    logDebug("lock", "Lock: Alarm events: {}",LockStatus)
                }
                case "6" : {
                    switch (transform("JSONPATH", "$.code", triggeringItem.state.toString)) {
                        case "0" : {
                            LockStatus.postUpdate("Unlocked by zwave")
                                                    }
                        case "1" : {
                            LockStatus.postUpdate("Unlocked by master pin")
                        }
                        case "60" : {
                            LockStatus.postUpdate("Ulocked by family")
                        }
                        case "61" : {
                            LockStatus.postUpdate("Unlocked by cleaner")
                            sendNotification("martin.koskela@gmail.com", "The lock was unlocked by the cleaner code")
                        }
                        default : {
                            LockStatus.postUpdate("Unknown door lock Event")
                            logDebug("lock", "Lock: Alarm events: {}",LockStatus)
                        }
                    }
                logDebug("lock", "Lock: Alarm events: {}",LockStatus)
                }
            }
        }           
        case "BURGLAR" : {
                DoorStatus.postUpdate("The Burglar alarm is active")
                logDebug("lock", "Lock: Alarm events: {}",DoorStatus)
                }
        default : {
            DoorStatus.postUpdate("Unknown Type in alarmRawParser")
            logDebug("lock", "Lock: Alarm events: {}",DoorStatus)
        }
    }
end

and the items I use look like this:

String      FrontDoor_Alarm_Raw         "Alarm Raw [%s]"                          <shield>                                       { channel="zwave:device:XXXXX:node2:alarm_raw"}
String      LockStatus                  "Test state [%s]"                         <shield>

So what Iā€™m after is to store the values in my influxDB and therefore I created a virtual item which I populate with the status. I have not added that to the persistence file yet so thatā€™s the next step. I donā€™t know if itā€™s even possible to store strings and display them in a nice way in HabPanel.

Anyway, the rule works great and I get the status on the virtual item :slight_smile:

Iā€™m eternally greatful to you @chris and @5iver for all the help. Please let me know if I can help you in anyway; testing, sanity check something or perhaps a kidney :smiley:

3 Likes

Do you have an issue with battery drain?
Id lock recommend polling to be off completely but seemslike people still have problems with short battery life.

I have not included my module yet. Rebuilding my house exterior so canā€™t have a non working lock until the carpenters are done.