Interlocking devices

Moderator: leecollings

Post Reply
mmcnamee
Posts: 6
Joined: Monday 06 June 2016 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Interlocking devices

Post 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.
mmcnamee
Posts: 6
Joined: Monday 06 June 2016 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Interlocking devices

Post 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
mmcnamee
Posts: 6
Joined: Monday 06 June 2016 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Interlocking devices

Post 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?!
RayAmsterdam
Posts: 115
Joined: Sunday 11 January 2015 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Interlocking devices

Post by RayAmsterdam »

You could do this in blockly
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest