Hello everyone,

I hope you are all doing well. I am currently working on a home automation project that involves controlling LEDs using Cayenne and a push button. I would like to add an option that enables me to control the LEDs manually without an internet connection (using the push button). If anyone has any ideas on how I can modify the code, I would be happy to share it with you.

Thank you.
cayenne.txt (3.3 KB)

You can use the below function to check if the no internet.

  CAYENNE_LOG("Connection finished");
  Serial.println("\n--  Cayenne Disconnected ! --");    //  can be deleted
//<==== HERE i do something when Cayenne is disconnected