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

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

Why don’t you modify the physical switch to work with Blynk?

Can the light/relay be controlled with a button connected to a digital pin instead of switch connected inline with the high voltage? In other words replace the inline high voltage switch with a low voltage botton connected to a digital pin. You could then monitor the digital pin and also control the relay.

Take a look at the thread @Gunner posted at the top of this thread. The guy who started that thread ended up developing a really neat system which answes all the questions in this thread, and he even provides code and part list.

So yeah… please go an read that thread… yes its massive but worth reading every post! :slight_smile:

1 Like

Another way possible is to modify your wall switch
If there is room to add a small tactile push button
Behind the main switch that way you can detect the state of the wall button and act accordingly in code.

This of course if you can hide your entire device inside or near said switch

1 Like

It would be easier to use a switch connected to arduino to manipulate the relay, and also have the ability to manipulate the same relay with Blynk. Then Arduino can detect the state as it is the gatekeeper for both means of state changes. A simple SPST rocker switch can be used.

Your point is valid, any such switch would be good enough however unless you want a house of varying type of switches that do not match each other, avoid it. That is an ugly solution in my opinion :stuck_out_tongue:

This is my wall switch, got ample room around the physical switch for manipulation,

2 Likes

Couldn’t a regular wall switch be connected to the MCU so long as no other voltage source runs through it? The switch would match the rest of the switches and it would still produce the desired effect.

That works aswell providing that your MCU is programmed so it can work OFFLINE
aswell handeling the on/off based on the physical switch state.

However should the MCU fail then your lights wont work at all.

While in my suggested solution you have one system working independant of the MCU aswell as with it.

1 Like

Why not replace the outdated switch for something already with a mcu you could hack in to? maybe there is a serial output with the light status that you could hook in to an interupt.

https://www.aliexpress.com/store/product/Free-Shipping-Denoo-Luxury-White-Black-Touch-Switch-Panel-110-250V-Gentleman-Touch-Screen-Wall-Light/130220_1283460499.html

1 Like

Those look so nice, I would have bought some if they weren’t 1 way only.
Can’t be used in multi switch lights :confused:

Well, it isn’t a challenge if you don’t see the problem. But for the price I’d hesitate to take them apart, but I can’t imagine you cannot hack them into a two way switch :slight_smile:

1 Like

I’ve seen the insides on some, they don’t break put the third pin, those that use sordo relays :confused:

EDIT: you must mean this?
https://www.aliexpress.com/item/Wall-Light-Controler-Smart-Home-Automation-AC110V-220V-1-Gang-2-Way-Touch-Switch-EU-Standard/32792063902.html

There are loads of 1/2 gang and 1/2 way switches on aliexpress! All sorts of styles, but you have to dig hard because they’re mixed with the 1 way results :sleeping:

Heres a place to start looking: https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20170418224619&SearchText=2+gang+touch+switch+2+way

wow thanks, I ment 2-way actually, first link seems promising, I wonder if its an ESP device inside! Sonoff touch is a esp based device but only 1-way.

Crappio… 433mhz devices

Maybe this can help you out:

He made a light switch that works with blynk and when the blynk server is down or no connection, it is still working with the actual button.

also hackable … :wink: