ESP-NOW based led controller/light for ESP32 ESP-IDF and ESP8266 RTOS SDK. Alternate firmware for Tuya/SmartLife/eWeLink WiFi led controllers/lights.
- ESP8266 RTOS_SDK v3.4
- ESP32 ESP-IDF v5.2
- Saves the last state when the power is turned off.
- Automatically adds led configuration to Home Assistan via MQTT discovery as a light.
- Update firmware from HTTPS server via ESP-NOW.
- Direct or mesh work mode.
- Work mode must be same with gateway work mode.
- ESP-NOW mesh network based on the zh_network.
- For initial settings use "menuconfig -> ZH ESP-NOW Led Configuration". After first boot all settings will be stored in NVS memory for prevente change during OTA firmware update.
- To restart the led, send the "restart" command to the root topic of the led (example - "homeassistant/espnow_led/24-62-AB-F9-1F-A8").
- To update the led firmware, send the "update" command to the root topic of the led (example - "homeassistant/espnow_led/70-03-9F-44-BE-F7"). The update path should be like as "https://your_server/zh_espnow_led_esp32.bin" (for ESP32) or "https://your_server/zh_espnow_led_esp8266.app1.bin + https://your_server/zh_espnow_led_esp8266.app2.bin" (for ESP8266). Average update time is up to some minutes. The online status of the update will be displayed in the root led topic.
- To change initial settings of the led (except work mode), send the X1,X2,X3,X4,X5,X6 command to the hardware topic of the led (example - "homeassistant/espnow_led/70-03-9F-44-BE-F7/hardware"). The configuration will only be accepted if it does not cause errors. The current configuration status is displayed in the configuration topic of the led (example - "homeassistant/espnow_led/70-03-9F-44-BE-F7/config").
MQTT configuration message should filled according to the template "X1,X2,X3,X4,X5,X6". Where:
- X1 - Led type. 1 for W, 2 for WW, 3 for RGB, 4 for RGBW, 5 for RGBWW.
- X2 - First white GPIO number. 0 - 48 (according to the module used), 255 if not used.
- X3 - Second white GPIO number. 0 - 48 (according to the module used), 255 if not used.
- X4 - Red GPIO number. 0 - 48 (according to the module used), 255 if not used.
- X5 - Green GPIO number. 0 - 48 (according to the module used), 255 if not used.
- X6 - Blue GPIO number. 0 - 48 (according to the module used), 255 if not used.
Legend: W - Cold white or Warm white or one another color. WW - Cold white + Warm white. RGB - Red + Green + Blue colors. RGBW - Red + Green + Blue + Cold white or Warm white colors. RGBWW - Red + Green + Blue + Cold white + Warm white colors.
Run the following command to firmware build and flash module:
cd your_projects_folder
git clone --recurse-submodules https://github.com/aZholtikov/zh_espnow_led.git
cd zh_espnow_led
For ESP32 family:
idf.py set-target (TARGET) // Optional
idf.py menuconfig
idf.py build
idf.py flash
For ESP8266 family:
make menuconfig
make
make flash
See here.
- A gateway is required. For details see zh_gateway.
- Use the "make ota" command instead of "make" to prepare 2 bin files for OTA update.
Any feedback will be gladly accepted.