diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp
index ce5a8643..1cc01a4f 100644
--- a/wled00/cfg.cpp
+++ b/wled00/cfg.cpp
@@ -483,6 +483,13 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
CJSON(retainMqttMsg, if_mqtt[F("rtn")]);
#endif
+#ifndef WLED_DISABLE_ESPNOW
+ JsonObject remote = doc["remote"];
+ CJSON(enable_espnow_remote, remote[F("remote_enabled")]);
+ getStringFromJson(linked_remote, remote[F("linked_remote")], 13);
+#endif
+
+
#ifndef WLED_DISABLE_HUESYNC
JsonObject if_hue = interfaces["hue"];
CJSON(huePollingEnabled, if_hue["en"]);
@@ -964,6 +971,13 @@ void serializeConfig() {
if_mqtt_topics[F("group")] = mqttGroupTopic;
#endif
+#ifndef WLED_DISABLE_ESPNOW
+ JsonObject remote = doc.createNestedObject(F("remote"));
+ remote[F("remote_enabled")] = enable_espnow_remote;
+ remote[F("linked_remote")] = linked_remote;
+#endif
+
+
#ifndef WLED_DISABLE_HUESYNC
JsonObject if_hue = interfaces.createNestedObject("hue");
if_hue["en"] = huePollingEnabled;
diff --git a/wled00/data/settings_wifi.htm b/wled00/data/settings_wifi.htm
index fb7be660..71fd7148 100644
--- a/wled00/data/settings_wifi.htm
+++ b/wled00/data/settings_wifi.htm
@@ -182,6 +182,17 @@
Disable WiFi sleep:
Can help with connectivity issues.
Do not enable if WiFi is working correctly, increases power consumption.
+
+
+
Wireless Remote
+ Listen for events over ESP-NOW
+ Keep disabled if not using a remote, increases power consumption.
+
+ Enable Remote:
+ Hardware MAC:
+ Last Seen: None
+
+
Ethernet Type
diff --git a/wled00/fcn_declare.h b/wled00/fcn_declare.h
index 98f95caa..5a1ff163 100644
--- a/wled00/fcn_declare.h
+++ b/wled00/fcn_declare.h
@@ -204,12 +204,16 @@ bool presetsActionPending(void); // WLEDMM true if presetToApply, presetToSave,
void initPresetsFile();
void handlePresets();
bool applyPreset(byte index, byte callMode = CALL_MODE_DIRECT_CHANGE);
+void applyPresetWithFallback(uint8_t presetID, uint8_t callMode, uint8_t effectID = 0, uint8_t paletteID = 0);
inline bool applyTemporaryPreset() {return applyPreset(255);};
void savePreset(byte index, const char* pname = nullptr, JsonObject saveobj = JsonObject());
inline void saveTemporaryPreset() {savePreset(255);};
void deletePreset(byte index);
bool getPresetName(byte index, String& name);
+//remote.cpp
+void handleRemote();
+
//set.cpp
bool isAsterisksOnly(const char* str, byte maxLen);
void handleSettingsSet(AsyncWebServerRequest *request, byte subPage);
diff --git a/wled00/html_settings.h b/wled00/html_settings.h
index 9d7bb827..364313d2 100644
--- a/wled00/html_settings.h
+++ b/wled00/html_settings.h
@@ -151,142 +151,150 @@ const uint8_t PAGE_settings[] PROGMEM = {
// Autogenerated from wled00/data/settings_wifi.htm, do not edit!!
-const uint16_t PAGE_settings_wifi_length = 2144;
+const uint16_t PAGE_settings_wifi_length = 2262;
const uint8_t PAGE_settings_wifi[] PROGMEM = {
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xb5, 0x58, 0x6b, 0x73, 0xdb, 0xba,
- 0x11, 0xfd, 0xae, 0x5f, 0x01, 0xa3, 0x1d, 0x0f, 0x39, 0xa6, 0x29, 0xc9, 0x4a, 0x72, 0x53, 0x5b,
- 0x54, 0xea, 0x87, 0x6e, 0xec, 0x36, 0xd7, 0x56, 0x47, 0x9e, 0x78, 0x3a, 0x69, 0xe6, 0x5e, 0x9a,
- 0x5c, 0x49, 0x88, 0x49, 0x80, 0x25, 0x40, 0xc9, 0x1e, 0x47, 0xff, 0xbd, 0xbb, 0x00, 0xf5, 0xb4,
- 0x9d, 0x76, 0x32, 0xee, 0x64, 0x92, 0x90, 0xc4, 0x62, 0x77, 0x71, 0xf6, 0xec, 0x03, 0xea, 0xee,
- 0x9c, 0x5d, 0x9d, 0x5e, 0xff, 0x73, 0xd0, 0x67, 0x13, 0x93, 0x67, 0xbd, 0x2e, 0xfd, 0xcb, 0xb2,
- 0x58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e8, 0x91, 0x16, 0x00, 0x00
};
diff --git a/wled00/ir.cpp b/wled00/ir.cpp
index 50490634..f3b6643f 100644
--- a/wled00/ir.cpp
+++ b/wled00/ir.cpp
@@ -70,15 +70,15 @@ void decBrightness()
}
}
-// apply preset or fallback to a effect and palette if it doesn't exist
void presetFallback(uint8_t presetID, uint8_t effectID, uint8_t paletteID)
{
- USER_PRINTF("presetFallback1 %d %d %d\n", presetID, effectID, paletteID);
- applyPreset(presetID, CALL_MODE_BUTTON_PRESET);
+ //USER_PRINTF("presetFallback1 %d %d %d\n", presetID, effectID, paletteID);
+ //applyPreset(presetID, CALL_MODE_BUTTON_PRESET);
//these two will be overwritten if preset exists in handlePresets()
- USER_PRINTF("presetFallback2 %d %d %d\n", presetID, effectID, paletteID);
- effectCurrent = effectID;
- effectPalette = paletteID;
+ applyPresetWithFallback(presetID, CALL_MODE_BUTTON_PRESET, effectID, paletteID);
+ USER_PRINTF("applyPresetWithFallback %d %d %d\n", presetID, effectID, paletteID);
+ //effectCurrent = effectID;
+ //effectPalette = paletteID;
}
byte relativeChange(byte property, int8_t amount, byte lowerBoundary, byte higherBoundary)
diff --git a/wled00/presets.cpp b/wled00/presets.cpp
index 2aff5e5a..cd2bdfe2 100644
--- a/wled00/presets.cpp
+++ b/wled00/presets.cpp
@@ -134,6 +134,15 @@ bool applyPreset(byte index, byte callMode)
return true;
}
+// apply preset or fallback to a effect and palette if it doesn't exist
+void applyPresetWithFallback(uint8_t index, uint8_t callMode, uint8_t effectID, uint8_t paletteID)
+{
+ applyPreset(index, callMode);
+ //these two will be overwritten if preset exists in handlePresets()
+ effectCurrent = effectID;
+ effectPalette = paletteID;
+}
+
void handlePresets()
{
if (presetToSave) {
diff --git a/wled00/remote.cpp b/wled00/remote.cpp
new file mode 100644
index 00000000..ca13d1e9
--- /dev/null
+++ b/wled00/remote.cpp
@@ -0,0 +1,204 @@
+#include "wled.h"
+
+#define ESP_NOW_STATE_UNINIT 0
+#define ESP_NOW_STATE_ON 1
+#define ESP_NOW_STATE_ERROR 2
+
+#define NIGHT_MODE_DEACTIVATED -1
+#define NIGHT_MODE_BRIGHTNESS 5
+
+#define WIZMOTE_BUTTON_ON 1
+#define WIZMOTE_BUTTON_OFF 2
+#define WIZMOTE_BUTTON_NIGHT 3
+#define WIZMOTE_BUTTON_ONE 16
+#define WIZMOTE_BUTTON_TWO 17
+#define WIZMOTE_BUTTON_THREE 18
+#define WIZMOTE_BUTTON_FOUR 19
+#define WIZMOTE_BUTTON_BRIGHT_UP 9
+#define WIZMOTE_BUTTON_BRIGHT_DOWN 8
+
+#ifdef WLED_DISABLE_ESPNOW
+void handleRemote(){}
+#else
+
+#if !defined(ARDUINO_ARCH_ESP32) && !defined(ESP_OK)
+#define ESP_OK 0 // add missing constant for stupid esp8266
+#endif
+
+// This is kind of an esoteric strucure because it's pulled from the "Wizmote"
+// product spec. That remote is used as the baseline for behavior and availability
+// since it's broadly commercially available and works out of the box as a drop-in
+typedef struct message_structure {
+ uint8_t program; // 0x91 for ON button, 0x81 for all others
+ uint8_t seq[4]; // Incremetal sequence number 32 bit unsigned integer LSB first
+ uint8_t byte5 = 32; // Unknown
+ uint8_t button; // Identifies which button is being pressed
+ uint8_t byte8 = 1; // Unknown, but always 0x01
+ uint8_t byte9 = 100; // Unnkown, but always 0x64
+
+ uint8_t byte10; // Unknown, maybe checksum
+ uint8_t byte11; // Unknown, maybe checksum
+ uint8_t byte12; // Unknown, maybe checksum
+ uint8_t byte13; // Unknown, maybe checksum
+} message_structure;
+
+static int esp_now_state = ESP_NOW_STATE_UNINIT;
+static uint32_t last_seq = -1;
+static int brightnessBeforeNightMode = NIGHT_MODE_DEACTIVATED;
+static message_structure incoming;
+
+// Pulled from the IR Remote logic but reduced to 10 steps with a constant of 3
+static const byte brightnessSteps[] = {
+ 6, 9, 14, 22, 33, 50, 75, 113, 170, 255
+};
+static const size_t numBrightnessSteps = sizeof(brightnessSteps) / sizeof(uint8_t);
+
+static bool nightModeActive() {
+ return brightnessBeforeNightMode != NIGHT_MODE_DEACTIVATED;
+}
+
+static void activateNightMode() {
+ brightnessBeforeNightMode = bri;
+ bri = NIGHT_MODE_BRIGHTNESS;
+}
+
+static bool resetNightMode() {
+ if (!nightModeActive()) {
+ return false;
+ }
+ bri = brightnessBeforeNightMode;
+ brightnessBeforeNightMode = NIGHT_MODE_DEACTIVATED;
+ return true;
+}
+
+// increment `bri` to the next `brightnessSteps` value
+static void brightnessUp() {
+ if (nightModeActive()) { return; }
+ // dumb incremental search is efficient enough for so few items
+ for (uint8_t index = 0; index < numBrightnessSteps; ++index) {
+ if (brightnessSteps[index] > bri) {
+ bri = brightnessSteps[index];
+ break;
+ }
+ }
+}
+
+// decrement `bri` to the next `brightnessSteps` value
+static void brightnessDown() {
+ if (nightModeActive()) { return; }
+ // dumb incremental search is efficient enough for so few items
+ for (int index = numBrightnessSteps - 1; index >= 0; --index) {
+ if (brightnessSteps[index] < bri) {
+ bri = brightnessSteps[index];
+ break;
+ }
+ }
+}
+
+static void setOn() {
+ if (resetNightMode()) {
+ stateUpdated(CALL_MODE_BUTTON);
+ }
+ if (!bri) {
+ toggleOnOff();
+ }
+}
+
+static void setOff() {
+ if (resetNightMode()) {
+ stateUpdated(CALL_MODE_BUTTON);
+ }
+ if (bri) {
+ toggleOnOff();
+ }
+}
+
+static void presetWithFallback(uint8_t presetID, uint8_t effectID, uint8_t paletteID) {
+ applyPresetWithFallback(presetID, CALL_MODE_BUTTON_PRESET, effectID, paletteID);
+}
+
+// Callback function that will be executed when data is received
+#ifdef ESP8266
+void OnDataRecv(uint8_t * mac, uint8_t *incomingData, uint8_t len) {
+#else
+void OnDataRecv(const uint8_t * mac, const uint8_t *incomingData, int len) {
+#endif
+
+ sprintf (last_signal_src, "%02x%02x%02x%02x%02x%02x",
+ mac [0], mac [1], mac [2], mac [3], mac [4], mac [5]);
+
+ if (strcmp(last_signal_src, linked_remote) != 0) {
+ USER_PRINT(F("ESP Now Message Received from Unlinked Sender: "));
+ USER_PRINTLN(last_signal_src);
+ return;
+ }
+
+ if (len != sizeof(incoming)) {
+ USER_PRINT(F("Unknown incoming ESP Now message received of length "));
+ USER_PRINTLN(len);
+ return;
+ }
+
+ memcpy(&(incoming.program), incomingData, sizeof(incoming));
+ uint32_t cur_seq = incoming.seq[0] | (incoming.seq[1] << 8) | (incoming.seq[2] << 16) | (incoming.seq[3] << 24);
+
+ if (cur_seq == last_seq) {
+ return;
+ }
+
+
+ USER_PRINT(F("\nIncoming ESP Now Packet["));
+ USER_PRINT(cur_seq);
+ USER_PRINT(F("] from sender["));
+ USER_PRINT(last_signal_src);
+ USER_PRINT(F("] button: "));
+ USER_PRINTLN(incoming.button);
+ switch (incoming.button) {
+ case WIZMOTE_BUTTON_ON : setOn(); stateUpdated(CALL_MODE_BUTTON); break;
+ case WIZMOTE_BUTTON_OFF : setOff(); stateUpdated(CALL_MODE_BUTTON); break;
+ case WIZMOTE_BUTTON_ONE : presetWithFallback(1, FX_MODE_STATIC, 0); resetNightMode(); break;
+ case WIZMOTE_BUTTON_TWO : presetWithFallback(2, FX_MODE_BREATH, 0); resetNightMode(); break;
+ case WIZMOTE_BUTTON_THREE : presetWithFallback(3, FX_MODE_FIRE_FLICKER, 0); resetNightMode(); break;
+ case WIZMOTE_BUTTON_FOUR : presetWithFallback(4, FX_MODE_RAINBOW, 0); resetNightMode(); break;
+ case WIZMOTE_BUTTON_NIGHT : activateNightMode(); stateUpdated(CALL_MODE_BUTTON); break;
+ case WIZMOTE_BUTTON_BRIGHT_UP : brightnessUp(); stateUpdated(CALL_MODE_BUTTON); break;
+ case WIZMOTE_BUTTON_BRIGHT_DOWN : brightnessDown(); stateUpdated(CALL_MODE_BUTTON); break;
+ default: break;
+
+ }
+
+ last_seq = cur_seq;
+}
+
+void handleRemote() {
+ if (enable_espnow_remote) {
+ if (esp_now_state == ESP_NOW_STATE_UNINIT) {
+ USER_PRINTLN(F("\nInitializing ESP_NOW listener!\n"));
+ // Init ESP-NOW
+ if (esp_now_init() != ESP_OK) {
+ USER_PRINTLN(F("Error initializing ESP-NOW"));
+ esp_now_state = ESP_NOW_STATE_ERROR;
+ }
+
+ #ifdef ESP8266
+ esp_now_set_self_role(ESP_NOW_ROLE_SLAVE);
+ #endif
+
+ esp_now_register_recv_cb(OnDataRecv);
+ esp_now_state = ESP_NOW_STATE_ON;
+ }
+ } else {
+ if (esp_now_state == ESP_NOW_STATE_ON) {
+ USER_PRINTLN(F("Disabling ESP-NOW Remote Listener"));
+ if (esp_now_deinit() != ESP_OK) {
+ USER_PRINTLN(F("Error de-initializing ESP-NOW"));
+ }
+ esp_now_state = ESP_NOW_STATE_UNINIT;
+ } else if (esp_now_state == ESP_NOW_STATE_ERROR) {
+ //Clear any error states (allows retrying by cycling)
+ esp_now_state = ESP_NOW_STATE_UNINIT;
+ }
+ }
+}
+
+#endif
\ No newline at end of file
diff --git a/wled00/set.cpp b/wled00/set.cpp
index b3b08cf7..d99eeda2 100644
--- a/wled00/set.cpp
+++ b/wled00/set.cpp
@@ -48,6 +48,14 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
noWifiSleep = request->hasArg(F("WS"));
+ #ifndef WLED_DISABLE_ESPNOW
+ enable_espnow_remote = request->hasArg(F("RE"));
+ strlcpy(linked_remote,request->arg(F("RMAC")).c_str(), 13);
+
+ //Normalize MAC format to lowercase
+ strlcpy(linked_remote,strlwr(linked_remote), 13);
+ #endif
+
#ifdef WLED_USE_ETHERNET
ethernetType = request->arg(F("ETH")).toInt();
WLED::instance().initEthernet();
diff --git a/wled00/wled.cpp b/wled00/wled.cpp
index 663c9c69..a0c38365 100644
--- a/wled00/wled.cpp
+++ b/wled00/wled.cpp
@@ -105,6 +105,9 @@ void WLED::loop()
handleIR(); // 2nd call to function needed for ESP32 to return valid results -- should be good for ESP8266, too
#endif
handleConnection();
+ #ifndef WLED_DISABLE_ESPNOW
+ handleRemote();
+ #endif
handleSerial();
#if defined(ARDUINO_ARCH_ESP32) && defined(WLEDMM_PROTECT_SERVICE) // WLEDMM experimental: handleNotifications() calls strip.show(); handleTransitions modifies segments
diff --git a/wled00/wled.h b/wled00/wled.h
index af86782c..f20455f0 100644
--- a/wled00/wled.h
+++ b/wled00/wled.h
@@ -45,6 +45,8 @@
#define WLED_ENABLE_WEBSOCKETS
#endif
+//#define WLED_DISABLE_ESPNOW // Removes dependence on esp now
+
#define WLED_ENABLE_FS_EDITOR // enable /edit page for editing FS content. Will also be disabled with OTA lock
// to toggle usb serial debug (un)comment the following line
@@ -77,6 +79,9 @@
{
#include
}
+ #ifndef WLED_DISABLE_ESPNOW
+ #include
+ #endif
#else // ESP32
#include // ensure we have the correct "Serial" on new MCUs (depends on ARDUINO_USB_MODE and ARDUINO_USB_CDC_ON_BOOT)
#include
@@ -93,6 +98,10 @@
#include
#endif
#include "esp_task_wdt.h"
+
+ #ifndef WLED_DISABLE_ESPNOW
+ #include
+ #endif
#endif
#include
#include
@@ -459,6 +468,12 @@ WLED_GLOBAL bool hueApplyColor _INIT(true);
WLED_GLOBAL uint16_t serialBaud _INIT(1152); // serial baud rate, multiply by 100
+#ifndef WLED_DISABLE_ESPNOW
+WLED_GLOBAL bool enable_espnow_remote _INIT(false);
+WLED_GLOBAL char linked_remote[13] _INIT("");
+WLED_GLOBAL char last_signal_src[13] _INIT("");
+#endif
+
// Time CONFIG
WLED_GLOBAL bool ntpEnabled _INIT(false); // get internet time. Only required if you use clock overlays or time-activated macros
WLED_GLOBAL bool useAMPM _INIT(false); // 12h/24h clock format
diff --git a/wled00/xml.cpp b/wled00/xml.cpp
index 904e4b3c..b77509bd 100644
--- a/wled00/xml.cpp
+++ b/wled00/xml.cpp
@@ -345,6 +345,14 @@ void getSettingsJS(AsyncWebServerRequest* request, byte subPage, char* dest) //W
sappend('v',SET_F("AC"),apChannel);
sappend('c',SET_F("WS"),noWifiSleep);
+ #ifndef WLED_DISABLE_ESPNOW
+ sappend('c',SET_F("RE"),enable_espnow_remote);
+ sappends('s',SET_F("RMAC"),linked_remote);
+ #else
+ //hide remote settings if not compiled
+ oappend(SET_F("document.getElementById('remd').style.display='none';"));
+ #endif
+
#ifdef WLED_USE_ETHERNET
sappend('v',SET_F("ETH"),ethernetType);
#else
@@ -377,6 +385,19 @@ void getSettingsJS(AsyncWebServerRequest* request, byte subPage, char* dest) //W
{
sappends('m',SET_F("(\"sip\")[1]"),(char*)F("Not active"));
}
+
+ #ifndef WLED_DISABLE_ESPNOW
+ if (last_signal_src[0] != 0) //Have seen an ESP-NOW Remote
+ {
+ sappends('m',SET_F("(\"rlid\")[0]"),last_signal_src);
+ } else if (!enable_espnow_remote)
+ {
+ sappends('m',SET_F("(\"rlid\")[0]"),(char*)F("(Enable remote to listen)"));
+ } else
+ {
+ sappends('m',SET_F("(\"rlid\")[0]"),(char*)F("None"));
+ }
+ #endif
}
if (subPage == 2)