Page 1 of 1

If->Then, Logical Rule update for lock based condition

Posted: 27 Nov 2017 14:04
by Eagle
Hi,

i cant find any app to react on lock status changes, i mean something like IF Lock123 locked and alarm disarmed THEN arm alarm. Only a small example.

Maybe a small update of the Logical Rule App could solve this. IF Lock open or closed would be very cool!

Thank you!

Re: If->Then, Logical Rule update for lock based condition

Posted: 28 Nov 2017 22:36
by IgoriokLT
It can actually, use Boolean Operator AND. If you need to check both lock`s statuses then you need to add Nested Condition and to use Boolean Operator OR in it.

Re: If->Then, Logical Rule update for lock based condition

Posted: 29 Nov 2017 12:12
by Eagle
Im on Zway Version 2.3.6 beta for WD and i got no locks under conditions? I got locks under actions, but no locks under binary-, multilevel, nested-, remote-, time condition. And i need a lock based condition, not a lock based action.
lock.PNG
lock.PNG (33.89 KiB) Viewed 13657 times

Re: If->Then, Logical Rule update for lock based condition

Posted: 29 Nov 2017 21:59
by IgoriokLT
I don't have any locks so just assuming - try to use Dummy Device associated with your lock and use that Dummy Device in Logical Rule.

Re: If->Then, Logical Rule update for lock based condition

Posted: 04 Feb 2018 19:38
by klaasjoerg
I also can't access the danalock v3 lock-status-changes directly.
But what you can do is simply create a new "virtual"-device as a kind of mirroring. I simply used the App "Group device" and added the lock there.
Now you can use this virtualdevice to use it in logical-rules etc. Kind of uneccessary difficult, but basically works so far, as I just tested.
However, the better way for the future would surely be a direct support of lock-status instead wrapping a group-device around...

Re: If->Then, Logical Rule update for lock based condition

Posted: 11 Apr 2018 14:36
by Eagle
The group device method didnt work properly for me, so i ended up using a simple code for the load custom javascript app. Maybe someone needs it, so i want to share:

Code: Select all

zway.devices[35].instances[0].DoorLock.data.mode.bind(function() {
var status = (zway.devices[35].instances[0].DoorLock.data.mode.value); 
if (status == false) 
controller.devices.get("DummyDevice_374").performCommand("off")
if (status == 255) 
controller.devices.get("DummyDevice_374").performCommand("on")
});
while 35 of zway.devices[35] needs to be the device id of your lock and 374 of DummyDevice_374 needs to be the right id for your desired dummy device.
DummyDevice_374 will mirror the lock changes (unlock = off and lock = on) now im able to use the dummydevice in some logical rules.