Page 1 of 1

Stupid question: How to light a lamp with a switch?

Posted: Wednesday 10 August 2016 2:32
by gurzixo
Hello,

I am new to Domoticz :D , and have been able to make it work on a RPI, detect chacon switchs using rfxcomm and activate a sonoff relay using espeasy. I even have been able to use scenes; but I have not found yet how to activate a switch (Domoticz name for a lamp!) when another (real) switch becomes on.

The use case is: I have a Chacon switch (cheap, slim, and running on batteries) - lets call it SW - and I want this switch to command the relay of a sonoff device running espeasy - lets call it RELAY.

I do not want to command directly the sonoff device in the SW on/off action field, as I consider that the only place to send the physical command is to put it in the on/off action of RELAY.

I understand that I could use a script, and even achieved it using blocky ;) , but I suspect that there is a simpler way to do that, such as putting a magic string in the on/off Action field of SW that will set RELAY on/off which in turn will send the http command to the physical sonoff.

Am I wrong?

Re: Stupid question: How to light a lamp with a switch?

Posted: Wednesday 10 August 2016 8:18
by SweetPants
gurzixo wrote:such as putting a magic string in the on/off Action field of SW that will set RELAY on/off which in turn will send the http command to the physical sonoff.
Yes, use http:// or script:// command in On/Off action. Search the forum, there are plenty examples to find