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

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
gurzixo
Posts: 5
Joined: Wednesday 10 August 2016 1:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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?
SweetPants

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

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

Who is online

Users browsing this forum: Bing [Bot] and 1 guest