Notification/read of status switch on/off of "stairs" scheme.

Hi, I would like to ask you,
I would like to make a remote control for my lights in house, but I would like to keep possibility of using "manual" switch.
So I came with idea of using "stairs" switch system which one switch will represent manual switch and second one will represent relay controlled by arduino.
Maybe I am already on wrong way to solve my issue, so correct me please.

But during idea of "stairs" system of switching, I will not be able to see if the light is already turned by manual switch or not, so if I will open app and program button to "turn ON" light, in case that light was already turned on over manual switch, I will turn it off even app say "turn it on".

So I am dealing with problem "how to recognize that that light is already ON by manual switch? (btw it can be even AC or heating system, so try to not be fully focus on "light" and light sensors).

  • But it was in my mind as first idea too, its cheap - but the switch doesnt need to be directly under the lamp so for example switch for light to basement.
  • I was thinking about CT sensor, but its seems like heavy caliber to "just a check" if device is on/switch is on.

Can someone help me to solve my mind struggling?

There are two distinct solutions. If all you want to do is be able to turn the lights on either from a switch or from a remote, then you simply wire the switch and the remote (relay?) in parallel. Activate either one and the light goes on. However, the light will remain on as long as either switch remains on. To turn the light off, both switches must be off. This approach is simple to implement.

The "stair" arrangement that you mention allows either switch to turn the light on OR turn the light off, regardless of the position of the other switch. If this is what you want I can draw a schematic. It requires that both of the switches or relays that you're using be SPDT types. Detecting whether the lights are already on can be accomplished. But it might be good to know what your actual requirements are, because that will determine the best approach.

“ I would like to make a remote control for my lights in house, “

Stick with the electrical code and use approved electrical equipment.

Google IOT.

What you are describing is called "two way switching" except in America where for some quite peculiar reason it is called "three way switching".

Off On

But this is the wrong way to do what you wish as indeed, you cannot know whether the light is on or off.

The proper way is to use the relay in place of the original switch to control the light, then the original switch becomes an input to the Arduino or ESP which always knows which way the switch is and of course, knows when the light is on or off because it is directly controlling it.

This is how the Sonoff Mini works (using WiFi to interface) and you will find it cheaper to use those than to attempt to make your own. :sunglasses:

The scheme is exactly as Paul_B show.

The point is that in current situation is on wall just one single switch (regular switch which you have on wall at home too - two way switch, but one "line" is not used) connected to light.

My Idea is use this switch as first part of scheme and second part will be handle by Arduino/esp with relay.
That will make it work as:

  • if you want to use manual switch, you can turn ON or OFF that lamp, but its possible that position of turn on and off will be different (up ON, down OFF).
  • if you want to turn off the light or turn on by phone (remote) you will connect or disconnect relay as switch on second part of scheme. (turning on or turning off that relay simulate switch)
    Thats fine,
    but, I want to know if the light is actually ON or not. to be able to show on phone actual status and not just "second switch is on" which in case of "stairs switch" doesnt mean anything because the second switch/cable can be ON/OFF.

TO be honest maybe its better to not saying on/off on switches but position1 and position2. beucase even if switch is off (position2) it can be still shining light.

So point is how to get feedback to ESP/Arduino, if the light is actually really ON, I was thinking about light sensor but it can be sunny day and I will need to put sensor too close to lamp,. or CT sensor between switch block and light.

Or do you have better approach how to be able to know if the light is ON/OFF + be able to control light by manual switch + remote relay?




Well, I have already explained the proper way to do this. :roll_eyes:

Simple as that!

There are any number of ways to detect if a load (any load, ac or dc) is powered. The first step in designing such
a circuit is specifying the load criteria, such as ac or dc, how much current ?, what voltage ?. Given that information
a solution using an opto coupler or other devices can be realized. Simply stating ‘a light’ , is not enough information.

But it is completely unnecessary to "detect" whether the light is powered. That is not the point here.

You use the relay, controlled by the ESP, to directly switch the light. You know in the controller whether you turned the relay on or off and light failure is a separate issue. You use the original switch as a (logic level) input to the ESP and you code as to how to deal with the state of the switch.

You can either EX-OR the switch state with the remote command and return a status of the light to the application, or as an interesting variant, you can use a "twiddle" function where you can update the actual status if the switch is changed which is to say if the light is on and the switch is off, then turning the switch on does not change anything but then turning it off again turns the light off. This would retain a degree of the on-off "sense" of the switch.

Another practical approach is to simply replace the switch with a pushbutton used as a toggle.

Just found these for monitoring a 220 V mains circuit. Voltage, not current.

Will likely work just as well for 110 V.

Aliexpress link

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.