Two way switch one is physical one is blynk switch connected to the same relay. How to check light on or off

I am new to blynk. I want to monitor my room’s light is on or off from outside of location. I used a two way switch and a relay controlled by blynk switch in the same relay. i have completed the basic on and off from switch and blynk switch i.e. when i on the blynk switch , 220 v light glows and when i off the physical switch light off.but the status of the blynk switch remains on , when making blynk switch off that makes light on.
I need solution of my project as soon as possible. Is it possible without any sensor to check light?

No. You can’t sense something without sensors :wink: You would need something like a current sensor to monitor power usage in the wiring. You could make relatively accurate guesses based on the pin status of the relay that controls the light, but that won’t work if you have another switch inline with the power to the light.

Search around the forum for many other projects doing similar things like this…

For example: 2 way lighting circuit control with blynk and feedback updates

@Gunner please help me out, its related to my job. i just want to see that if my home light is turned on by home physical switch?

I just did help out… and this forum isn’t even my job :wink:

1 Like

:pensive:

You need to measure if there is current running through the circuit. That would be the most reliable method. And you do need a sensor for that, as @Gunner states.

You could do it by software, but it requires some skill. You physical button as to actuate a relay and you have to send the relaystate to Blynk too. Same with the Virtual button, it has to actuate the physical relay, but it needs a lot of logic to determine the correct state of a button. Also a regular Flip-switch won’t do the trick because your relay will be on or off, so you need a Push-button as physical button.

1 Like

The link I showed him gets very detailed about what he is asking… he just needs to click on it :wink:

2 Likes

if i use a photo diode as sensor , can it use as status giving method?

You could, but it’s very unreliable as this method will also be influenced by outside lights.

:smile: i saw it before @Gunner, but i was confused.

As long as you don’t have any windows in the room… daylight will also trip an LDR

Confused about the link or the other users project?

yah right…

i was confused with my logic… i thought, without using any sensor just reading it from virtual pin it will be possible. 3 example in sketch made me confused, button interrupt,poll,sync… what the actually do? is it related to my project?

There called virtual pins, not magic pins :smiley: Basicly they are just variables used by Blynk to transfer data and logic back and forth between the App and Hardware. Physical sensors read data and physical actuators manipulate things.

Interrupt, poll and sync are terms that relate to many things…

Basicly an interrupt on a supported hardware pin “interrupts” the code loop to say “Hey, something happened! Look at me”.

Poll is the code intermittently “checking in” on the kids (pin state etc.).

And Sync, as far as Blynk is concerned, just updates the App with the latest virtual pin states (from the server) if connection got interrupted.

1 Like

thanks gunner… got help from you.:slight_smile:

The bill is in the mail… get your job to expense it :stuck_out_tongue_winking_eye:

1 Like

The simplest way is to use a 220v to 3.3v AC/DC converter connected to your light bulb. If the bulb is on then you’ll get 3v from the converter, which you can detect using one of the pins on your ESP8266 (or whatever you’re using to control your relay and talk to Blynk).
Connect the 3.3v positive to one of the GPIO pins and the 3.3v negative to the ground pin.
If you’re using an Arduino then go for 5v rather than 3.3v.

Pete.

You could also try this hall effect sensor

1 Like

thanks @Fettkeewl… i will try after i buy it