Schlage BE469 Locks with Update Rule

Hey there, I’m using OpenHAB 3 and this rule from a previous thread isn’t working anymore:

rule “Update door lock status”
Item Door_Lock_Alarm_Raw received update
if (Door_Lock_Alarm_Raw.state != “”)
switch (transform(“JSONPATH”, “$.event”, triggeringItem.state.toString)) {
case “1”, case “3”, case “5” :
// logInfo(“Rules”, “Lock updated to ON (locked)”)
case “2”, case “4”, case “6” :
// logInfo(“Rules”, “Lock updated to OFF (unlocked)”)
case “11” :
logInfo(“Rules”, “Lock is jammed, so setting lock to OFF (unlocked)”)

There’s an issue with the triggeringItem part, but I don’t know what the issue is. I read that it’s now outdated but don’t know how to fix it? Could someone please send an updated version of it with the latest method? Thanks!

If I recall correctly, you have to replace triggeringItem with triggeringItemName. But really, you can just use Door_Lock_Alarm_Raw instead.

I think triggeringItem was in the original rule I adapted, which was used for multiple locks. If you only have one lock, you don’t need it.

Alright that worked! Thanks.

I’m curious now, how do I connect it to google home? Once I do, will the rule work and switch states on the google home app as well? Or is there anything else I have to do in order to make that happen?

Same as anything else: add metadata to your item and then sync openHAB to Google Assistant.

You share items, not rules. So GA just picks up the changes to the item. It doesn’t need to know anything about the rule.

Awesome, I implemented it and everything’s working great! Is there a way to make a temporary code that can be activated through a switch?

Not that I know of, but I think some folks have tried to set codes using rules. It’s not straightforward, and
in my opinion it’s not worth the effort. You should find something if you search.

Yes, sort of. You need to make a REST API call from your rule. The REST call will set the Z-Wave config parameter associated with the specific code you want to set. If you search for posts here in the forum you’ll find some examples (e.g. search for “set zwave config parameter from rule”). Similarly, you can make a REST call to clear the code.

If you run Main UI and enable Developer Tools in your browser, when you set a code through Main UI you’ll be able to see the REST call it makes to set the code.

Take a look at this post, I happened to have it bookmarked. It’s a bit old, but it should give you a start:

1 Like