Light on and off , between Cayenne app and momentary switch, for home automation by arduino

I want to turn a light on and off from the Cayenne app on my phone and be able to press a momentary switch in that room to do the same thing.The momentary switch has to latch to keep the light on too. So if I turn the light on at the momentary switch in the room and say I leave my house and forgot to turn the light off I can just turn if off using the app. I want to be able to toggle the light on and off, between the app and momentary switch.

It’s definitely possible. Is the light a light built in to the ceiling, or a lamp that plugs in to the wall?

yes and i have an fan too

can u please tell me how it can be done

Here are some projects to get you started:

You can also go the route of a pre-built power strip and just send a high/low signal to it:

I have the power strip above, I’ll see if I can find some time tonight to get it working.

these projects are for raspberry pi I would like the above for arduino

Check out they have a plcduino that’s mega based with an esp8266 for $89. I’m quite impressed with mine and others are helping with coding it.

Amazon has switched electrical modules that have 4 independent high voltage outputs that may be the safest way to go. Kind of like having an electrical node.

1 Like

I’ve done something like this:

It has momentary switch, although not latching, and it is also controlled via Cayenne. I admit I haven’t tried with latching button, but I guess it can be done, a bit more complicated than my project, though still easily.

I hope this helps.