Electronic – Two way wiring with relay during power failure

failurepowerrelaywiring

I have below circuit employed at my home.

Since I used 2 way wiring between relay and manual switch, during power failure, I face problem of Lamp turning On or Off depending on switch position.

Out of 4 positions of two way switches 2 are working fine and other 2 are working opposite.

Please help me with some circuits preferably using relays or switches to overcome this problem during power failure. Other design are also welcome.

UPS takes over without any issues but SPDT relay 2 used for home automation system loses power from mains, changing contacts thereby toggling the lamp.

Since the space is limited, kindly give me some idea, where after power failure SPDT Relay 1 switches to UPS mode but due to power loss SPDT Relay 2 changes contact there by Lamp is toggled.

Suggest me to keep the state of Lamp, when taken over by UPS (SPDT Relay 1 works fine and Phase from UPS) after mains power failure (SPDT Relay 2 changed state).

enter image description here

Best Answer

Finally powered my Home automation relay board through UPS. Solved the problem.