jesserockz / wizmote-esphome

Apache License 2.0
66 stars 30 forks source link

ESPNow issues on ESP32 #17

Closed micw closed 11 months ago

micw commented 11 months ago

Hello,

thank you for the great library. After my first attempt to flash the remote itself, I went back to the original remote firmware and did a PoC with your library. My idea is to run the code directly on the lamp (which is also ESPHome), so everything works without WiFi.

While my PoC ona d1 mini (ESP8266) works very well, on my lamp it failed. Only one out of 3-5 button presses is recognized. The lamp uses a d1 mini32 (ESP32), so I took another D1 Mini 32 on my desk and applied my PoC code to it - just wifi + esp_now + wizmote to log the buttons.

But on the ESP32, almost no ESPNow packages are received. On ESP8266, I see 12 packages per button sequence. On ESP32 I see only one or two (if any) per button press.

Do you know what's wrong with ESP32 and the ESPNow library?

micw commented 11 months ago

I have just flashed WLED on this ESP32 and registered the remote. Works pretty well, every single button press is recognized. So it's not a hardware issue..

micw commented 11 months ago

Figured it out after looking through the WLED code. One must disable WiFi power savings on ESP32 to make ESPNow work reliable: https://esphome.io/components/wifi.html#wifi-power-save-mode

micw commented 11 months ago

@jesserockz Maybe you might add this info to the README :-)

micw commented 11 months ago

BTW, here's how I use the library: https://github.com/micw/esphome-projects/blob/master/wozilampe.yaml#L47