Page 1 of 1

Interlocking devices

Posted: Monday 06 June 2016 22:18
by mmcnamee
Hi all,

New to Domoticz, but have run a Raspberry PI v2 for 2+ years linked with LightwaveRF and home-brew/adapted PHP, Python and Ruby scripts controlling various aspects.

I'm actively looking at switching to Domoticz, and have invested in a Raspberry Pi v3 and RFXCom433E.

So far, got it installed and talking to one lightwave device, and a Somfy Rollixo RTS, which is where this next question comes from.

The raspberry pi "knows" when the alarm is set, based upon a digital input on the PiFace board.

Is there an easy way to "interlock" a device, i.e. the following logic:

if (alarmSet()) {
disableGarageDoorButton();
else if (alarmUnset()) {
enableGarageDoorButton();
}

An alternative, would be to intercept the button click for "Open" and NOT take any action if the alarm is current set/armed. This will prevent any "accidental" triggering of the alarm by fumbling the door open button!

I'm guessing it might be possible via a Lua script, but I have no idea where to start and what's the *best* approach for this.

Thanks in advance.

Re: Interlocking devices

Posted: Tuesday 07 June 2016 19:21
by mmcnamee
I guess this might also be used for heating / lighting purposes. e.g. shutting down the boiler when a window/door sensor opens.

Any direction or assistance greatly appreciated

Re: Interlocking devices

Posted: Thursday 07 July 2016 10:25
by mmcnamee
Not sure it's the most optimal, but this appears to work...

Create an Actual switch for the device, e.g. "RealSwitch"
Create a Virtual Switch called "Switch"

Create a LUA event script for the device, programming the required logic into the script, and call RealSwitch = ON / OFF from the virtual switch's script.

I guess this is why there's a $hiddenDevices "room" in Domoticz - to hide the real ones out the way?!

Re: Interlocking devices

Posted: Thursday 07 July 2016 19:51
by RayAmsterdam
You could do this in blockly