ESP-NOW based switch for ESP8266. Alternate firmware for Tuya/SmartLife/eWeLink WiFi switches.
- After turn on (or after rebooting) creates an access point named "ESP-NOW switch XXXXXXXXXXXX" with password "12345678" (IP 192.168.4.1). Access point will be shown during 5 minutes. The rest of the time access point is a hidden.
- Periodically transmission of system information (every 60 seconds), availability status (every 10 seconds) and state status (every 300 seconds) to the gateway.
- Saves the last state when the power is turned off. Goes to the last state when the power is turned on.
- Automatically adds switch configuration to Home Assistan via MQTT discovery as a switch.
- Possibility firmware update over OTA (if is allows the size of the flash memory).
- Web interface for settings.
- Optionally support one external one wire digital climate sensor (DS18B20, DHT11 or DHT22) with automatically added sensor configuration to Home Assistan via MQTT discovery as a sensor. Periodically transmission sensor status (every 300 seconds) to the gateway.
- Normal or reverse relay mode (normal by default).
- ESP-NOW mesh network based on the library ZHNetwork.
- Regardless of the status of connection to gateway the device perform ESP-NOW node function.
- For show the access point for setting or firmware update, send the command "update" to the device's root topic (example - "homeassistant/espnow_switch/E8DB849CA148"). Access point will be shown during 5 minutes. Similarly, for restart send the command "restart".
See here.
- A gateway is required. For details see ESP-NOW Gateway.
- ESP-NOW network name must be set same of all another ESP-NOW devices in network.
- If encryption is used, the key must be set same of all another ESP-NOW devices in network.
- Upload the "data" folder (with web interface) into the filesystem before flashing.
- For using this firmware on Tuya/SmartLife/eWeLink WiFi switches, the WiFi module must be replaced with an ESP8266 compatible module (if necessary).
Any feedback via e-mail would be appreciated. Or... Buy me a coffee.