Confusion with Light control over swicth


#1

Hi!

Im new in this comunity, I develop a simple escenario with raspberry Pi 3 and arduino UNO, I configure them correctly in the plataform.

Now i, triying to control lights over plataform and work correctly, but when I install a phisical swicth, to control manually lighst, dont refresh in cloud turn of and turn on.

Rasperry pi connected via USB to Arduino, Arduino connect to Relay 8 channels

In relay I connect lamp, work fine over cayenne
Not work with swicth conmutador connect to relay, no refrest to cayenne status turn on turn of( swicth conmutador work , but not refresh status to cayenne plataform)

Please , I really gratefull if some body can send me some manual to do this.

I atach a link video that resume my goal

In my project only work over plataform, and not over phisical switchs…


#2

@eromero i do not know how you are doing but try this what i think the guy from video is doing.
connect your switch to your arduino to read the status of the switch whether it is on or off.
next add a if condition to turn on the relay and write the status to the dashboard using “cayenne.virtualWrite” command.
add a custom digital output switch to your dashbaord and add if condition to turn on/off the relay and write the status to the dashboard.