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

This is a collection of wishes and needs for the next versions of Z-Way/Z-Cloud/Z-Box
Post Reply
Eagle
Posts: 105
Joined: 18 Jun 2017 19:04

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

Post 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!
IgoriokLT
Posts: 87
Joined: 09 Oct 2016 15:24

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

Post 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.
Eagle
Posts: 105
Joined: 18 Jun 2017 19:04

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

Post 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 13591 times
IgoriokLT
Posts: 87
Joined: 09 Oct 2016 15:24

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

Post 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.
klaasjoerg
Posts: 126
Joined: 30 Sep 2016 23:49

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

Post 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...
Eagle
Posts: 105
Joined: 18 Jun 2017 19:04

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

Post 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.
Post Reply