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


#1

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.


#2

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


#3

yes and i have an fan too


#4

can u please tell me how it can be done


#5

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.


#6

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


#7

https://www.instructables.com/id/Make-SMART-Your-Washing-Machine/

https://www.instructables.com/id/Arduino-UNO-MQTT-Meteo-Station/

https://www.instructables.com/id/Arduino-MKR1000-IoT-Simple-With-Cayenne/

https://www.instructables.com/id/Arduino-YUN-Cayenne-Quality-of-Light/


#8

Check out www.plc.us 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.


#9

I’ve done something like this:
https://www.instructables.com/id/IoT-cloud-Globe-Light/

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.