Schlage BE469 Zwave (non plus) locks terrible at reporting lock status (don't report or varying delays from short to loooong)

I have 3 zwave (non plus) Schlage BE469 locks that I would love to replace as they have been nothing but trouble on the home automation side of things. Mechanically and esthetically they are fine but from a zwave point of view, plain horrible.

The past few months I noticed that they are very slow and unreliable in reporting their lock status. I have a node red flow that announces the state of the door and lock. When the door opens and the lock still says locked, it tells me so I know that the vast majority of the time the status is wrong. When I test the locks by manually opening and closing the lock it sometimes performs perfectly (meaning the status updates immediately) and sometimes updates then freezes for a while then updates again.

These locks are the only Zwave (non plus) S0 devices in my home. I have about 90 zwave plus devices with an increasing number of 700 series devices. The controller is a 700 series Aeotec S7 dongle and I use ZwaveJS2MQTT with MQTT turned off.

I am waiting on Matter locks to be announced to replace them as 3 locks will exceed $700-800 so I don’t want to buy anything now if new models will be released soon. I’ve read Schlage has something in the works and I am guessing it is Matter compliant. Even if it were not, it would be a 700 series lock which is likely just fine too.

I tried to press the “Ping” button after manually changing the lock but it did nothing. Maybe it is not the same as triggering a poll. I wonder whether triggering a poll in Node Red as soon as the door is detected open would help. By the way, the door open/close status comes from my DSC alarm panel integration (native in HA) so that is always fast and reliable. The door locks used to report quickly but something changed… I am actually reducing my number of zwave devices and reducing traffic so if anything that should have made things better.

These are the statistics for one of the locks (the one we use the most):

The connection is direct but the RSSI seems very low. I have tons of beaming zwave devices around the locks yet it prefers a direct connection with poor signal level. Dropped and timeout statistics are low but dropped commands by the host are higher but since I rebooted the host 4 days ago, they are likely still low. Data rate is slow… but that would require me to change locks… so that will come later this year or early next.

I believe removing and adding back has helped in the past but it was short lived and doing so is one of the most hellish things to do with these locks. You have to try a zillion times before it works, even if I move the computer running HA next to the lock (which is now a major hassle to do given where/how the computer running HA is installed).

EDIT:

On another note why are there so many entities that do not work or should not exist for this lock?

I enabled the Lock State one to see what it said and it says Lock Jammed (11) which is not the case. I can control the lock remotely and it works just fine, no struggle. The door open one is plain wrong as the lock has no way to know if the door is open or not.

What you describe is pretty standard for the non-zwplus Schlages, Alex.

You can possibly make it better by setting up polling for the locks but in mine (I have three of these) I didn’t bother. I only have one automation that s being negatively affected (disabling my security system on unlock by code success) and its not annoying enough to set up polling.

I have plans to start shifting them out for ZWave plus or possibly matter devices next year depending on what emerges.

Hi Nathan, I think I may have figured out a solution thanks to a post from another ST veteran (@mwav3 - thank you Tim!) in another thread where he showed how to poll an old zwave device. I used his example to add the “refresh” nodes you can see in the flow below. When the door is opened it triggers a poll of the lock just before it checks whether it is locked or unlocked. For the hour or so I’ve been testing it, it worked nicely.

This makes me wonder whether polling behavior was changed at some point, maybe to reduce traffic. I also moved from the regular ZwaveJS to the ZwaveJS2MQTT a while back and maybe that is when the issues started… don’t know.

ZWaveJS2MQTT does NOT poll nodes by default - on purpose due to the traffic issues it causes on a ZWave mesh. If you want it to poll a non-plus node like our locks - you have to set it up on your own. (Look for posts from freshcoast, and polling - Edit: Here’s the link: Trane ZWave thermostate not refreshing values - #4 by freshcoast) I don’t know what your old solution did so I can’t answer to it, but I do believe the default ZWave lock DTH and RBoy’s DTH on the ST hub BOTH polled the lock for state on a periodic basis.

And yeah I know when Tim switched- I can tell you the exact day… :wink:

1 Like

I switched to HA a year ago and at first I was using the default zwave integration but I really needed/wanted better functionality to troubleshoot traffic issues so I switched to ZwaveJS2MQTT… and glad I did.

I only have those 3 non plus devices and completely forgot about polling… thank you for finally solving the mystery for me!

1 Like

Nah thank Freshcoast - And you for the kick to go back and set it up… I just went back and setup polling for mine at a 5 min interval. Bolt state is the one you want, and I THINK (and I’m not going to go check) the old ST refresh for the default Zwave lock was 5 min.

Will see if it changes anything pro / con

My lock state does update whenever if feels like it but when I open/close the door the message changes depending on the door and lock status so I need it to be accurate when the door state changes. By polling it where I did in the flow it seems to always be updating in time for the right message to be played.

Sometimes when I lock/unlock the door manually, the lock status is sent immediately as I hear the “… door locked/unlocked” message, but other times it takes way too long. From what you are saying it sounds like your locks never report state, but that is not my case. If so, I wonder why the difference.

Doesn’t polling the lock every 5 minutes cause it to wake up every 5 minutes? If so, won’t that drain the batteries in no time at all?

I have a BE469 that reports its status just fine without any issues. Locking and unlocking is reported as expected for manual, keypad and electronic commands. In my own experience what you are describing comes down to an interference issue.

1 Like

I don’t know much about this particular lock, but I’ve worked with a lot of older “non plus” zwave devices over the years. How they reported (or didnt) report status varied since the zwave command classes werent as standardized back then. It’s also possible there were several different versions of the be469- some reporting status and some not.

I had an interesting discussion with one of the zwavejs developers about non plus jasco switches and status linked below.

After they looked into it, it looks like the switch was sending a NIF (Node Information Frame) when it was operated manually. This doesn’t give the status, but a poll of the switch could be triggered programatically based off this NIF. I believe that’s what Smartthings did when the non plus jascos were operated manually to get status. They discussed setting up a poll from the nif on the github issue but I dont know if they ever did it. My non plus jasco switches are long gone to try and test it.

For the lock, I would check that the lifeline association to Node 1 is setup for the lock, since status typically reports that way, and sometimes zwavejs didnt set that association up at inclusion. This happened to me with a remotec relay- no status, and when i checked the group association, node 1 wasnt listed. Adding it manually got status working. If that doesnt help, you can enable the logs and set them to “silly” to report everything. While monitoring the log, operate the lock and see what it says. If it sends something is possible a poll can be triggered from that programmatically. You can post it here and maybe I’ll have an idea.

Otherwise, I like your refresh off a door sensor idea, and a 5 minute poll like @NathanCu suggested would work fine too ( if it’s “missed” by the sensor) and have minimal impact on zwave traffic with a long interval like that

2 Likes

@mwav3 - yeah I think I recall that at some point polling was needed to get around a patent that covered the switch reporting the state change to the hub. I believe it was Leviton?

Anyhow, interference may be the issue too given the very low signal level:

Garage Door Lock

Patio Door Lock

Front Door Lock

I also noticed very high RTT values from 300 to 6700ms on the 3 locks.

Anyhow, everything seems to be working after I added the zwavejs / refresh node I saw in one of your posts. I believe that the lock reports its state before 5 minutes pass but too slow for the announcements to work properly. With the refresh it now seems to be getting the correct state in time for the correct announcement.

@dshokouhi
Does your lock always report lock state immediately after changing?

1 Like

Yup it does update immediately. I never see my front door left unlocked which is what my automations are about. If someone unlocks the door, it better lock in 3 minutes. 3 minutes is the leeway I added in case you are bringing things back and forth from the car :joy:

1 Like

I also have these locks. They report immediately. The difference with me though is that are attached to my ring alarm zwave network. They’ve been great locks tbh. I was going to move them to my regular z-wave at some point but haven’t yet.

Edit: correction. Mine are zwave plus. Didn’t realize they came both ways. I’ll C my way out of this A B conversation now. :joy:

2 Likes

@calisro I have had them for 7 years or more now so mine are older, and they have been a torture mostly to include/exclude. I believe the zwave plus version has features like NWI (network wide inclusion), much faster speed, S2 encryption (instead of the horrible S0), so I am glad to hear those work well. Given matter will bee out soon, and I believe Schlage was working on updated locks, I am waiting to replace them with the latest and greatest given the cost.

2 Likes

While the refresh helped I am still running into messages arriving late or in the incorrect order. I need to redo my node red flows as they only work when the messages arrive with little delay and in the right order. Unfortunately that is an area I still struggle with. Not too sure on the best way to code this as there is no consistency with with the messages arrives. I was assuming that the door messages are always fast but lately it seems not to be the case. Wasn’t the DSC alarm panel integration local? (that is what provides door status)

After revising the code that generates the alerts I was still getting alerts out of order. For example I open the patio door to let the dog out and nothing plays. I close the door mere seconds later and it says “door closed”. Then after a few more seconds it says “door open”. Luckily I had the debug turned on and caught this:

The commands sent to Alexa were in the right order however the first one (door open) was delayed until the second one was done playing.

[{"id":"b0d1fa2ab662fe12","type":"change","z":"22924e93ed954a8e","name":"Set Global Variables","rules":[{"t":"set","p":"patio_door_lock_state","pt":"global","to":"lock_state","tot":"msg"},{"t":"set","p":"patio_door_state","pt":"global","to":"door_state","tot":"msg"},{"t":"set","p":"patio_door_last_change","pt":"global","to":"lock","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1300,"y":660,"wires":[["ffb557443cf6ac84"]]},{"id":"51842ffcd3eb0fe2","type":"server-state-changed","z":"22924e93ed954a8e","name":"Patio Door Lock","server":"6f1799ba.17e938","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"lock.patio_door_lock","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":660,"wires":[["0ae9f5252ba6bdd1"]]},{"id":"40d3cf850b754332","type":"api-current-state","z":"22924e93ed954a8e","name":"Patio Door - state?","server":"6f1799ba.17e938","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.patio_door","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"door_state","propertyType":"msg","value":"","valueType":"entityState"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":550,"y":660,"wires":[["b0d1fa2ab662fe12"]]},{"id":"b50c67b2697af741","type":"server-state-changed","z":"22924e93ed954a8e","name":"Patio Door","server":"6f1799ba.17e938","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.patio_door","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":780,"wires":[["18ef463b782a2e89","6d5e223249201ff9"]]},{"id":"71cb21e6ed6b55b9","type":"api-current-state","z":"22924e93ed954a8e","name":"Patio Door Lock - state?","server":"6f1799ba.17e938","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"lock.patio_door_lock","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"lock_state","propertyType":"msg","value":"","valueType":"entityState"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":1050,"y":780,"wires":[["4fe487d897eb59a6"]]},{"id":"0ae9f5252ba6bdd1","type":"change","z":"22924e93ed954a8e","name":"Lock State","rules":[{"t":"set","p":"lock_state","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":660,"wires":[["40d3cf850b754332"]]},{"id":"18ef463b782a2e89","type":"change","z":"22924e93ed954a8e","name":"Door State","rules":[{"t":"set","p":"door_state","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":780,"wires":[["35c2665c425b457e"]]},{"id":"d02f9864197d1e25","type":"api-call-service","z":"22924e93ed954a8e","name":"Patio Door Lock >> refresh","server":"6f1799ba.17e938","version":5,"debugenabled":false,"domain":"zwave_js","service":"refresh_value","areaId":[],"deviceId":[],"entityId":["lock.patio_door_lock"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":780,"y":780,"wires":[["71cb21e6ed6b55b9"]]},{"id":"4fe487d897eb59a6","type":"change","z":"22924e93ed954a8e","name":"Set Global Variables","rules":[{"t":"set","p":"patio_door_lock_state","pt":"global","to":"lock_state","tot":"msg"},{"t":"set","p":"patio_door_state","pt":"global","to":"door_state","tot":"msg"},{"t":"set","p":"patio_door_last_change","pt":"global","to":"door","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1300,"y":780,"wires":[["ffb557443cf6ac84"]]},{"id":"784605f84db31bba","type":"function","z":"22924e93ed954a8e","name":"Create Alert","func":"var alert_name = \"Door Status Alert\"\nvar door = \"Patio Door\"\n\nvar door_state = global.get('patio_door_state')\nvar lock_state = global.get('patio_door_lock_state')\nvar what_changed = global.get('patio_door_last_change')\nvar last_msg_case = global.get('patio_door_msg_case')\n\nvar msg_case = \"0\"\nvar suppress_alert = false\n\n/*\nDoor open / on  |  Door closed / off\nLock locked     |  Lock unlocked\n\nC-Closed / O-Open / L-Locked / U-Unlocked\n\nNormal Sequence\n1 D: Closed   L: Locked     C: na  - Starting point, no message\n2 D: Closed   L: *Unlocked* C: L   - Door unlocked\n3 D: *Open*   L: Unlocked   C: D   - Door open\n4 D: *Closed* L: Unlocked   C: D   - Door closed\n5 D: Closed   L: *Locked*   C: L   - Door closed and locked\n*/\n\nif (what_changed == \"lock\") {\n    if (door_state == \"off\" && lock_state == \"unlocked\" && last_msg_case == \"5\") {\n        //State door is unlocked only if the last message was door locked and closed\n        //to avoid an unlocked message when door has already been opened and lock\n        //finally reports that it is unlocked\n        msg_case = \"2\"\n    } else if (door_state == \"off\" && lock_state == \"locked\") {\n        msg_case = \"5\"\n        }\n}\n\nif (what_changed == \"door\") {\n    if (door_state == \"on\") {\n        msg_case = \"3\"\n    } else if (door_state == \"off\") {\n        msg_case = \"4\"\n        }\n\n}\n\nglobal.set(\"patio_door_msg_case\", msg_case);\n\nswitch (msg_case) {\n    case \"0\":\n        suppress_alert = true\n        break;\n    case \"1\":\n        var final_msg = `${door}` + \" or lock state is unavailable.\"\n        break;\n    case \"2\":\n        var final_msg = `${door}` + \" is unlocked.\"\n        break;\n    case \"3\":\n        var final_msg = `${door}` + \" is open.\"\n        break;\n    case \"4\":\n        var final_msg = `${door}` + \" is closed.\"\n        break;\n    case \"5\":\n        var final_msg = `${door}` + \" is closed and locked.\"\n        break;\n    default:\n        \n}\n\nif (suppress_alert == false || msg_case != \"0\") {\n    var msg1 = {\n        \"payload\":\n        {\n            \"data\":\n            {\n                \"message\": `${final_msg}`,\n                \"title\": `${alert_name}`,\n                \"data\": {\n                    \"type\": \"tts\"\n                }\n            }\n        }\n    }\n    //var debug_msg = `${final_msg}`\n    \n    var msg2 = { payload: `${msg_case}` + \": \" + `${final_msg}`};\n    \n    return [ msg1, msg2 ];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1670,"y":720,"wires":[["ee2633c185bca307","5c34aa4243f3a8e9"],["819cd6919690d243"]]},{"id":"819cd6919690d243","type":"debug","z":"22924e93ed954a8e","name":"debug 7","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1660,"y":800,"wires":[]},{"id":"ffb557443cf6ac84","type":"trigger","z":"22924e93ed954a8e","name":"1500ms","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"1500","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":1500,"y":720,"wires":[["784605f84db31bba"]]},{"id":"ee2633c185bca307","type":"link out","z":"22924e93ed954a8e","name":"Play Patio Door Alert","mode":"link","links":["3ec5ec69e745bb55","809a7d2ad4a28f9b"],"x":1900,"y":720,"wires":[],"l":true},{"id":"5c34aa4243f3a8e9","type":"debug","z":"22924e93ed954a8e","name":"debug 8","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1660,"y":640,"wires":[]},{"id":"35c2665c425b457e","type":"trigger","z":"22924e93ed954a8e","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"500","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":540,"y":780,"wires":[["d02f9864197d1e25"]]},{"id":"6f1799ba.17e938","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]

I don’t see any settings anywhere to control the way alexa handles commands. I may have to go ask the folks that created the nodes to control Alexa but was hoping someone on this thread would have suggestions :slight_smile:

I’ve noticed too when several announcement messages are sent within a second or two they don’t play in order on Alexa. Since Alexa is a cloud connected device that creates some issues with processing delays, so in between the cloud processing I think it just naturally losses track of which is first when they are sent too close together.

The only idea I can think of is to add a delay node with a “rate limit”, so that messages are only sent every five seconds. That way, the first message goes right through, but a second message will wait 5 seconds before going out to Alexa. That will slightly delay the second message, but I think that would be better then them going out of order. You can set them to “queue” so it doesn’t discard the announcements, it just holds them for the few seconds before sending them out.

1 Like

@mwav3 As always awesome advice. I will experiment with that. I already have 1 or 2 delays in the flow to allow one event to override the other but the way I had done it was that both door and lock update the same global variables just prior to a delay. The hope was that the door unlocked event would not get announced given the door open event happens so fast afterwards. I believe that part works but not perfectly. The rate limiting method may even solve both issues… I’ve got some testing to do…

This seems to have solved the issue but I am only a couple days into testing it:

[{"id":"51842ffcd3eb0fe2","type":"server-state-changed","z":"22924e93ed954a8e","name":"Patio Door Lock","server":"6f1799ba.17e938","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"lock.patio_door_lock","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"locked","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":860,"wires":[["d02f9864197d1e25"],["4ac076533745c043"]]},{"id":"71cb21e6ed6b55b9","type":"api-current-state","z":"22924e93ed954a8e","name":"Patio Door Lock - locked?","server":"6f1799ba.17e938","version":3,"outputs":2,"halt_if":"locked","halt_if_type":"str","halt_if_compare":"is","entity_id":"lock.patio_door_lock","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"lock_state","propertyType":"msg","value":"","valueType":"entityState"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":970,"y":820,"wires":[["4fe487d897eb59a6"],["163d44f3692ba893"]]},{"id":"d02f9864197d1e25","type":"api-call-service","z":"22924e93ed954a8e","name":"Patio Door Lock >> refresh","server":"6f1799ba.17e938","version":5,"debugenabled":false,"domain":"zwave_js","service":"refresh_value","areaId":[],"deviceId":[],"entityId":["lock.patio_door_lock"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":380,"y":800,"wires":[["073416794055bd5e"]]},{"id":"4fe487d897eb59a6","type":"change","z":"22924e93ed954a8e","name":"5: C & L","rules":[{"t":"set","p":"msg_case","pt":"msg","to":"5","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":800,"wires":[["ffb557443cf6ac84"]]},{"id":"784605f84db31bba","type":"function","z":"22924e93ed954a8e","name":"Create Alert","func":"var alert_name = \"Door Status Alert\"\nvar door = \"Patio Door\"\nvar door_state = global.get('patio_door_state')\nvar lock_state = global.get('patio_door_lock_state')\nvar what_changed = global.get('patio_door_last_change')\nvar msg_case = msg.msg_case\nvar last_msg_case = global.get('patio_door_last_msg_case')\nvar suppress_alert = false\n\n/*\nDoor open / on  |  Door closed / off\nLock locked     |  Lock unlocked\n\nC-Closed / O-Open / L-Locked / U-Unlocked\n\nNormal Sequence\n1 D: Closed   L: Locked     C: na  - Starting point, no message\n2 D: Closed   L: *Unlocked* C: L   - Door unlocked\n3 D: *Open*   L: Unlocked   C: D   - Door open\n4 D: *Closed* L: Unlocked   C: D   - Door closed\n5 D: Closed   L: *Locked*   C: L   - Door closed and locked\n*/\n\nglobal.set(\"patio_door_last_msg_case\", msg_case);\n\nswitch (msg_case) {\n    case \"0\":\n        suppress_alert = true\n        break;\n    case \"1\":\n        var final_msg = `${door}` + \" or lock state is unavailable.\"\n        break;\n    case \"2\":\n        var final_msg = `${door}` + \" is unlocked.\"\n        break;\n    case \"3\":\n        var final_msg = `${door}` + \" is open.\"\n        break;\n    case \"4\":\n        var final_msg = `${door}` + \" is closed.\"\n        break;\n    case \"5\":\n        var final_msg = `${door}` + \" is closed and locked.\"\n        break;\n    case \"6\":\n        var final_msg = `${door}` + \" is locked but the door is open. Please unlock to avoid frame damage.\"\n        break;\n    default:\n\n}\n\nif (suppress_alert == false || msg_case != \"0\") {\n    var msg1 = {\n        \"payload\":\n        {\n            \"data\":\n            {\n                \"message\": `${final_msg}`,\n                \"title\": `${alert_name}`,\n                \"data\": {\n                    \"type\": \"tts\"\n                }\n            }\n        }\n    }\n    //var debug_msg = `${final_msg}`\n\n    var msg2 = { payload: `${msg_case}` + \": \" + `${final_msg}` };\n\n    return [msg1, msg2];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1510,"y":800,"wires":[["5c34aa4243f3a8e9","ee2633c185bca307"],["819cd6919690d243"]]},{"id":"819cd6919690d243","type":"debug","z":"22924e93ed954a8e","name":"debug 7","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1680,"y":860,"wires":[]},{"id":"ffb557443cf6ac84","type":"trigger","z":"22924e93ed954a8e","name":"500ms","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"500","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":1350,"y":800,"wires":[["784605f84db31bba"]]},{"id":"ee2633c185bca307","type":"link out","z":"22924e93ed954a8e","name":"Play Patio Door Alert","mode":"link","links":["7d27c9ed96a7fe0f"],"x":1720,"y":800,"wires":[],"l":true},{"id":"5c34aa4243f3a8e9","type":"debug","z":"22924e93ed954a8e","name":"debug 8","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1680,"y":740,"wires":[]},{"id":"edb5eb9ad690d73a","type":"link out","z":"22924e93ed954a8e","name":"Play Backyard Gate Alert","mode":"link","links":["7d27c9ed96a7fe0f"],"x":1710,"y":660,"wires":[],"l":true},{"id":"a8ad65d4e90a36e9","type":"function","z":"22924e93ed954a8e","name":"Create Alert","func":"var dog_escape_msg = \"Attention! Backyard gate is open so dog can escape.\"\nvar alert_name = \"Dog Potential Escape Alert\"\n\n\nvar payload = {\"data\":\n{\n \"message\": `${dog_escape_msg}`,\n \"title\": `${alert_name}`,\n \"data\": {\n \"type\": \"tts\"\n }\n}\n}\nmsg.payload = payload\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1490,"y":660,"wires":[["edb5eb9ad690d73a"]]},{"id":"effe1446ad83724d","type":"api-current-state","z":"22924e93ed954a8e","name":"Backyard Gate - open?","server":"6f1799ba.17e938","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.backyard_gate","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":730,"y":680,"wires":[["a8ad65d4e90a36e9"],[]]},{"id":"7873bd3fcf092a76","type":"switch","z":"22924e93ed954a8e","name":"Open / Closed","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":500,"y":680,"wires":[["effe1446ad83724d"],[]]},{"id":"6d5e223249201ff9","type":"delay","z":"22924e93ed954a8e","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":320,"y":680,"wires":[["7873bd3fcf092a76"]]},{"id":"667458a8d55a5ac4","type":"server-state-changed","z":"22924e93ed954a8e","name":"Backyard Gate","server":"6f1799ba.17e938","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.backyard_gate","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":620,"wires":[["7c4ca5dc811dc1cf"],[]]},{"id":"695fc23dc274fb2d","type":"api-current-state","z":"22924e93ed954a8e","name":"Patio Door - open?","server":"6f1799ba.17e938","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.patio_door","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":710,"y":620,"wires":[["a8ad65d4e90a36e9"],[]]},{"id":"7c4ca5dc811dc1cf","type":"delay","z":"22924e93ed954a8e","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":320,"y":620,"wires":[["695fc23dc274fb2d"]]},{"id":"073416794055bd5e","type":"ha-wait-until","z":"22924e93ed954a8e","name":"Patio Door Lock - locked? - 1.5s","server":"6f1799ba.17e938","version":2,"outputs":2,"entityId":"lock.patio_door_lock","entityIdFilterType":"exact","property":"state","comparator":"is","value":"locked","valueType":"str","timeout":"1500","timeoutType":"num","timeoutUnits":"milliseconds","checkCurrentState":true,"blockInputOverrides":true,"outputProperties":[],"entityLocation":"data","entityLocationType":"none","x":670,"y":800,"wires":[["4fe487d897eb59a6"],["71cb21e6ed6b55b9"]]},{"id":"163d44f3692ba893","type":"change","z":"22924e93ed954a8e","name":"4: C","rules":[{"t":"set","p":"msg_case","pt":"msg","to":"4","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":840,"wires":[["ffb557443cf6ac84"]]},{"id":"b50c67b2697af741","type":"server-state-changed","z":"22924e93ed954a8e","name":"Patio Door","server":"6f1799ba.17e938","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.patio_door","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":760,"wires":[["5c85c51ebdb10cdb","6d5e223249201ff9"],["d02f9864197d1e25"]]},{"id":"5c85c51ebdb10cdb","type":"change","z":"22924e93ed954a8e","name":"3: O","rules":[{"t":"set","p":"msg_case","pt":"msg","to":"3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":760,"wires":[["ffb557443cf6ac84"]]},{"id":"f06b0d0fd1d1d4c6","type":"change","z":"22924e93ed954a8e","name":"6: O & L","rules":[{"t":"set","p":"msg_case","pt":"msg","to":"6","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":720,"wires":[["ffb557443cf6ac84"]]},{"id":"4a6349972fb6c634","type":"change","z":"22924e93ed954a8e","name":"2: U","rules":[{"t":"set","p":"msg_case","pt":"msg","to":"2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":880,"wires":[["ffb557443cf6ac84"]]},{"id":"4ac076533745c043","type":"ha-wait-until","z":"22924e93ed954a8e","name":"Patio Door - closed? - 1.5s","server":"6f1799ba.17e938","version":2,"outputs":2,"entityId":"binary_sensor.patio_door","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"1500","timeoutType":"num","timeoutUnits":"milliseconds","checkCurrentState":true,"blockInputOverrides":true,"outputProperties":[],"entityLocation":"data","entityLocationType":"none","x":380,"y":880,"wires":[[],["06270a8572472812"]]},{"id":"06270a8572472812","type":"api-current-state","z":"22924e93ed954a8e","name":"Patio Door - open?","server":"6f1799ba.17e938","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.patio_door","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":630,"y":880,"wires":[[],["4a6349972fb6c634"]]},{"id":"6f1799ba.17e938","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

I was trying to keep the node spaghetti simple and do more in the function node but given the door and lock messages have random timing, I had to sort out what was actually happening outside of the function node which now only plays the correct message. The waits and delays are there to try to avoid pointless alerts such as unlocked door when it typically opens (and is therefore obviously unlocked) immediately afterwards. It also gives time for the slower locks to report.

The “O & L” is not connected as that requires added logic that I have not worked on yet and would likely introduce some complications… It is when the lock is locked but the door is open which would result in door frame damage… problem is I need to know for certain that the lock locked AFTER the door was opened because I otherwise get that alert when the door opens and the lock has not reported unlocked yet… but that may not be true in this latest revision of the flow as I don’t even check the lock when the door opens… cause it is obviously unlocked.

Sorry to bring back 1.5 y/o thread but how did you add the lock to HA in the first place?

I have zooz 800 usb stick and BE469 non-plus lock. I can’t seems to add the lock to HA at all. I added Zwave JS UI, generated keys, then I added integration, now I am adding device, I go to the lock, hit schlarge button, enter 6 digit programming key, hit 0 and after several seconds the red checkmark flashes.
Tried at least 10 times.

If this is the non plus version you MUST pair the lock within 6 inches of the coordinator. It uses whisper mode in an attempt to secure the key.

If you use the ZP version this isn’t necessary.

1 Like