2022-12-28 21:44:16 +03:00
# ESP-NOW gateway for ESP8266/ESP32
2022-12-11 11:28:34 +03:00
2023-02-09 18:22:15 +03:00
Gateway for data exchange between ESP-NOW devices and MQTT broker via WiFi/LAN.
2022-12-28 21:44:16 +03:00
## Features
2023-01-22 12:46:58 +03:00
1. Creates an access point named "ESP-NOW gateway XXXXXXXXXXXX" with password "12345678" (IP 192.168.4.1).
2023-02-09 18:22:15 +03:00
2. Possibility a device search through the Windows Network Environment via SSDP (at ESP_NOW_WIFI mode).
3. Periodically transmission of system information to the MQTT broker (every 60 seconds), availability status to the ESP-NOW network and to the MQTT broker (every 10 seconds) and current date and time to the ESP-NOW network (every 10 seconds).
2022-12-28 21:44:16 +03:00
4. Automatically adds gateway configuration to Home Assistan via MQTT discovery as a binary_sensor.
2023-01-04 14:02:05 +03:00
5. Automatically adds supported ESP-NOW devices configurations to Home Assistan via MQTT discovery.
2023-02-12 16:41:54 +03:00
6. Automatically adds supported nRF24 devices configurations to Home Assistan via MQTT discovery.
7. Possibility firmware update over OTA (at ESP_NOW_LAN mode via access point only).
8. Web interface for settings (at ESP_NOW_LAN mode via access point only).
9. 3 operating modes:
2023-02-09 18:22:15 +03:00
```text
ESP_NOW ESP-NOW node only. Default mode after flashing.
ESP_NOW_WIFI Gateway between ESP-NOW devices and MQTT broker via WiFi.
ESP_NOW_LAN Gateway between ESP-NOW devices and MQTT broker via Ethernet. Preferred mode.
```
2022-12-28 21:44:16 +03:00
## Notes
1. ESP-NOW mesh network based on the library [ZHNetwork ](https://github.com/aZholtikov/ZHNetwork ).
2. Regardless of the status of connections to WiFi or MQTT the device perform ESP-NOW node function.
2023-01-05 12:34:42 +03:00
3. For restart the device (without using the Web interface and only if MQTT connection established) send an "restart" command to the device's root topic (example - "homeassistant/espnow_gateway/70039F44BEF7").
2023-02-09 18:22:15 +03:00
4. W5500 connection:
```text
ESP8266 (GPIO05 - CS, GPIO14 - SCK, GPIO12 - MISO, GPIO13 - MOSI).
ESP32 (GPIO05 - CS, GPIO18 - SCK, GPIO19 - MISO, GPIO23 - MOSI).
```
2022-12-28 21:44:16 +03:00
## Attention
1. ESP-NOW network name must be set same of all another ESP-NOW devices in network.
2023-01-22 12:46:58 +03:00
2. If encryption is used, the key must be set same of all another ESP-NOW devices in network.
3. Upload the "data" folder (with web interface) into the filesystem before flashing.
2023-02-09 18:22:15 +03:00
4. At ESP_NOW_WIFI mode WiFi router must be set on channel 1.
2022-12-28 21:44:16 +03:00
2023-01-03 21:23:43 +03:00
## Tested on
2023-02-09 18:22:15 +03:00
1. NodeMCU 1.0 (ESP-12E Module). ESP_NOW_WIFI mode. Unstable work.
2. AZ-Delivery ESP-32 Dev Kit C V4. ESP_NOW_WIFI mode. Stable work.
3. NodeMCU 1.0 (ESP-12E Module) + W5500. ESP_NOW_LAN mode. Stable work.
4. AZ-Delivery ESP-32 Dev Kit C V4 + W5500. ESP_NOW_LAN mode. Stable work.
2023-01-03 21:23:43 +03:00
2022-12-28 21:44:16 +03:00
## Supported devices
2023-02-12 16:38:54 +03:00
1. [RF Gateway ](https://github.com/aZholtikov/RF-Gateway )
2023-01-04 14:02:05 +03:00
2. [ESP-NOW Switch ](https://github.com/aZholtikov/ESP-NOW-Switch )
3. [ESP-NOW Light/Led Strip ](https://github.com/aZholtikov/ESP-NOW-Light-Led-Strip )
2023-01-06 13:09:21 +03:00
4. [ESP-NOW Window/Door Sensor ](https://github.com/aZholtikov/ESP-NOW-Window-Door-Sensor )
2023-01-08 10:49:50 +03:00
5. [ESP-NOW Water Leakage Sensor ](https://github.com/aZholtikov/ESP-NOW-Water-Leakage-Sensor )
2022-12-28 21:44:16 +03:00
## To Do
2023-01-04 14:02:05 +03:00
- [X] Automatically add ESP-NOW devices configurations to Home Assistan via MQTT discovery.
2023-02-09 18:22:15 +03:00
- [X] LAN connection support.
2023-02-12 16:38:54 +03:00
- [X] nRF24 device support (via [RF Gateway ](https://github.com/aZholtikov/RF-Gateway )).
- [ ] BLE device support (via BLE Gateway).
- [ ] LoRa device support (via LoRa Gateway).
2023-02-09 18:22:15 +03:00
Any feedback via [e-mail ](mailto:github@zh.com.ru ) would be appreciated. Or... [Buy me a coffee ](https://paypal.me/aZholtikov ).