Trigger Operation - Relay & Button - Dashboard Notification

Hi,
I am using an Arduino Yun and a 4 relay board for my project. I can control the relays from the dashboard successfully (on/off). For my project needs i have connected a button and when is pressed i want to turn off a particular relay. That operation is working but when the button is pressed and the relay goes off, the icon indication in the dashboard remains on until i press it again from the dashboard. How can i turn off the indication in the dashboard? I used the trigger function but it only worked for one day and then is not responding so i added the code manually.

If you are using virtual pins in your sketch you can put Cayenne.virtalWrite(virtualpin,LOW) replacing virtual pin with your virtual pin number. This should update the dashboard.

Yes it works!
Thank you.

1 Like