diff --git a/code/espurna/config/general.h b/code/espurna/config/general.h index 05b66868..1f530cab 100644 --- a/code/espurna/config/general.h +++ b/code/espurna/config/general.h @@ -319,6 +319,7 @@ PROGMEM const char* const custom_reset_string[] = { #define LED_MODE_MIXED 5 // A mixed between WIFI and FINDME #define LED_MODE_ON 6 // LED always ON #define LED_MODE_OFF 7 // LED always OFF +#define LED_MODE_STATUS 8 // If any relay is ON, LED will be ON, otherwise OFF // ----------------------------------------------------------------------------- // WIFI diff --git a/code/espurna/data/index.html.gz b/code/espurna/data/index.html.gz index 1a8a4882..2a2d22f6 100644 Binary files a/code/espurna/data/index.html.gz and b/code/espurna/data/index.html.gz differ diff --git a/code/espurna/led.ino b/code/espurna/led.ino index 412212f9..8b8813dd 100644 --- a/code/espurna/led.ino +++ b/code/espurna/led.ino @@ -235,6 +235,17 @@ void ledLoop() { _ledStatus(i, status); } + if (_ledMode(i) == LED_MODE_STATUS) { + bool status = false; + for (unsigned char k=0; kWiFi status + @@ -299,6 +300,7 @@ When in "WiFi status" it will blink at 1Hz when trying to connecting. If successfully connected if will briefly lit every 5 seconds if in STA mode or every second if in AP mode.
When in "MQTT managed" mode you will be able to set the LED state sending a message to "<base_topic>/led/0/set" with a payload of 0, 1 or 2 (to toggle it).
When in "Find me" mode the LED will be ON when all relays are OFF. This is meant to locate switches at night.
+ When in "Status" mode the LED will be ON whenever any relay is ON, and OFF otherwise. This is global status notification.
When in "Mixed" mode it will follow the WiFi status but will stay mostly on when relays are OFF, and mostly OFF when any of them is ON.
"Always ON" and "Always OFF" modes are self-explanatory.