Remote light switch with manual switch

Hello guys,

I made a remote light switch with an olimex esp8266-evb and openhab and I would like to add a manual switch in the circuit. My problem is to figure a way that when i turn off the manual switch, my server will take a an mqtt message to switch off the switch on my sitemap.

My switch in the items file looks like this

Switch mqttCeilingLight “Ceiling Light” { mqtt=">[broker:FragkiadamisSmartHouse/lights.CeilingLight1:command:ON:L1ON],>[broker:FragkiadamisSmartHouse/lights.CeilingLight1:command:OFF:L1OFF],

This is an interesting problem. I don’t know the esp8266-evb per se , but I’ll offer the following observation.

First … a lot will depend on your wiring. Can the manual switch turn the light both ON or OFF ? Does the switch direction (up/down) to turn the light ON/OFF depend on the current state of the esp8266-evb ? It sounds like you are trying to create an n-way situation where multiple switches control the same fixture. (Often used in stairwells etc).

How many wires connect to the esp8266 ? just line and load ? is there a third wire connected to it ? or a place for one ? is this same set of wires (literally the same set) available where you want to put your manual switch ? what is the wiring at the fixture itself – in/out, which are wire-nutted together etc.

I went thru a similar experience (I think) putting zwave switches in my two stairwells. One stairwell went fine, the other physically cannot be automated because of how the electrician (same guy) wired the n-way circuitry. Totally legitimate with the electrical code, just does not provide the right wiring for (at least z-wave).

In your case, the act of using the manual switch has to generate some sort of event which would be detectable by the esp8266-evb…it would still have to be powered in order to send a signal, so that means it would have to detect the state of a third wire and report on that.

This can be a REAL rat’s nest/time-sink and may not even be possible depending on your wiring and the capabilities of the esp8266-evb.

At the very least you’ll probably need an electrician to help you figure out the wiring pattern and possibly do some work depending on your skills and local building codes. Not sure where you are located, but in the US the cost of this can easily outweigh any convenience factor your manual switch might create.

I think you should re-examine the problem you are trying to solve…why do you need/want a manual switch ? Is it a stairwell-type situation ? Is the common wiring even accessible in the location where you would put such a switch ?