Posts: 1
Joined: Sun Jun 10, 2018 7:28 pm

TX - RX Switch

Sun Jun 10, 2018 7:45 pm

Hello everyone!
I was hoping anyone here on this forum would be able to help me out a bit.
RPI and all that follows it is brand new to me, I used some time reading and trying to get a basic understanding of it all, but as the sky is the limit, I simply am not able to get a hang of everything.

The question/Problem;
I would like to turn on a light from a RPI. Wireless, preferably via WiFi. And I need the switch I’m controlling, sending back a positive or negative feedback to the RPI, confirming if the switch actually created a closed circut. Thus the light got switched on.
Same in reverse, when I turn the light off, I want a signal coming from the switch confirming it broke the connection, and the circuit is now open. Light off.

Reason is if the switch is out of reach, i need the RPI telling me 'the command could not be done. Failed to turn on light'.

Are there switches like this out there? Could it be made in a compact and neat design. I would be very interested in getting more information from you home professionals!

Hope for positive feedback.
Thanks. Michael.

User avatar
Z80 Refugee
Posts: 358
Joined: Sun Feb 09, 2014 1:53 pm

Re: TX - RX Switch

Sun Jun 10, 2018 9:29 pm

You've hit the nail on the head, and that's exactly why I don't like X10 and similar home automation systems: no status return on command sent, you just have to trust that it was actioned. The reason there is no status return is because the transmission is one way - either by radio link or through the mains wiring.

There exist network-controlled (Wi-Fi) mains sockets. I have not investigated them, but I assume that (being a two-way comms system) the web control panel (or whatever they use) would provide a status return.

There would be no great difficulty making such a thing using an RPi, a relay, and a 5V supply. If you want absolute verification of the output to the load (instead of just that the relay is being driven) you need an opto-isolator to feed the load status back to the RPi's input.
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

Posts: 303
Joined: Fri Oct 11, 2013 12:28 pm

Re: TX - RX Switch

Mon Jun 11, 2018 4:47 pm

Look at the Energenie smart sockets; they have two ranges, and the more costly range gives you feedback not only of switch status, but also mains voltage, current draw etc. There's an interface board which plugs onto the Pi, and some example software.

I believe Sonoff might do something suitable.

Or you could get one of the ESP8266-based boards, which hooks up over WiFi, and add the mains interface side (with care, of course!).

Return to “Automation, sensing and robotics”