Relay with switch
-
Hi
Is it possible to connect simple relay to regular on/off wall switch?
Oded
-
You have to change some wiring if you have only a single wire availble in the switch box.
Have you checked the Relay project?
-
In the relay project the button is push button.
Can I use on/off switch with the same sketch?
-
I think you just need to change this line:
if (value != oldValue && value==0) {
to
if (value != oldValue) {
And wire the original switch , in order to short GND and pin 3. The original wires now go to the relay (and not more to the switch).
You need to somehow power arduino + radio + relay , I use cheap phone chargers but the risk of fire is too high. We are testing other alternatives here.
And please be careful when working with AC Mains! It is letal!
-
Thanks for this input, please can you share which kind of relay i have to use ?
Suggested Topics
-
💬 MySensors compact (junction box) relay
OpenHardware.io • 3 Feb 2020, 19:01 • openhardware.io 3 Feb 2020, 19:01 -
Sonoff and Vera
Vera • 30 Dec 2016, 21:16 • nicomedia 10 Oct 2017, 15:10 -
💬 Battery powered glass touch switch
OpenHardware.io • 31 May 2017, 18:57 • openhardware.io 20 Nov 2018, 07:44 -
💬 Homini In-Wall Battery Powered Light Switch Module
OpenHardware.io • 19 Mar 2016, 09:01 • openhardware.io 1 Sept 2016, 09:10 -
MQTT unsure of relay state
Troubleshooting • 16 Jul 2016, 13:23 • Samuel235 16 Jul 2016, 13:23 -
💬 RFM69 - 8 relays board
OpenHardware.io • 24 Jan 2017, 13:33 • openhardware.io 24 Jan 2017, 13:33 -
Motion & Relay Sensor issue
Troubleshooting • 27 Mar 2015, 19:15 • kunall 3 Oct 2015, 11:50 -
Need some minor help with MQTT strings
Troubleshooting • 22 Dec 2015, 23:09 • drock1985 23 Dec 2015, 16:01