Page 1 of 1

Action on off signal even if device is off

Posted: Sunday 18 December 2016 11:42
by timdek
Hi,

I'm new to Domoticz, I haven't even purchased an rfxtrx433e yet but before I do I have one question. I found some good looking touch 433 switch remotes on AliExpress.

They happen to be compatible with the old klik aan klik uit protocol. It has two buttons on it, one sends an off signal one sends an on signal. However I want to use both buttons for two different devices.

So I was wondering, is it possible to use the exact same signal for example the off signal to put a switch on when off and off when on even tough the signal received is always off? If not native maybe via a "received signal" API or something like that?

I'm currently using a self modified version of PiLight for this but I rather switch to Domoticz but before I purchase an expensive rfxtrx433e I would like to know if this is going to work.

Thanks in advance.

Re: Action on off signal even if device is off

Posted: Sunday 18 December 2016 12:31
by Egregius
Yes, easy in pass2php:

Code: Select all

<?php
if($s['remote']=='On') sw($i['lightone'],'Toggle');
else sw($i['lighttwo'],'Toggle');
 
This would toggle lightone with every on push and toggle lighttwo with every off push.

Re: Action on off signal even if device is off

Posted: Sunday 18 December 2016 18:37
by timdek
Exactly what I need, thanks!