ESP-NOW Gateway
Gateway for ESP32 ESP-IDF for data exchange between ESP-NOW devices and MQTT broker via WiFi/LAN.
Tested on
- ESP32 ESP-IDF v5.2
Features
- Automatically adds gateway configuration to Home Assistan via MQTT discovery as a binary_sensor.
- Automatically adds supported devices configurations to Home Assistan via MQTT discovery.
- Update firmware from HTTPS server via OTA.
- Update firmware of supported devices from HTTPS server via ESP-NOW.
- Direct or mesh work mode.
Notes
- All devices on the network must have the same work mode.
- ESP-NOW mesh network based on the zh_network.
- For initial settings use "menuconfig -> ZH Gateway Configuration".
- To restart the gateway, send the "restart" command to the root topic of the gateway (example - "homeassistant/gateway/70-03-9F-44-BE-F7").
- To update the gateway firmware, send the "update" command to the root topic of the gateway (example - "homeassistant/gateway/70-03-9F-44-BE-F7"). The update path should be like as "https://your_server/zh_gateway_esp32.bin". The online status of the update is displayed in the root gateway topic.
Build and flash
Run the following command to firmware build and flash module:
cd your_projects_folder
git clone https://github.com/aZholtikov/zh_gateway.git
cd zh_gateway
idf.py menuconfig
idf.py build
idf.py flash
Attention
- The program is written for and tested only on LILYGO T-ETH-Lite ESP32. To work on another module it will be necessary change ZH_LAN_MODULE_TYPE and ZH_LAN_MODULE_POWER_PIN (for using LAN connection only). No changes are required when using a WiFi connection.
- If using a WiFi connection, the WiFi router must be set to the same channel as ESP-NOW.
- Only one device can be updated via ESP-NOW at a time. During the device upgrade, there may be delays in the response of others devices on the network.
- The certificate (certificate.pem) must match the upgrade server.
Supported devices
Any feedback will be gladly accepted.
Description
Gateway for ESP32 ESP-IDF for data exchange between ESP-NOW devices and MQTT broker via WiFi/LAN.
Version 1.0.9
Latest
Languages
C
99.5%
CMake
0.5%