witnessmenow / Universal-Arduino-Telegram-Bot

Use Telegram on your Arduino (ESP8266 or Wifi-101 boards)
MIT License
1.09k stars 302 forks source link

Using Async OTA causes UniversalTelegramBot sendMessage to fail #324

Closed lilbuzz closed 1 year ago

lilbuzz commented 1 year ago

I have an ESP32 D1 Mini project that sends text messages to my cell phone via Telegram using the UniversalTelegramBot class, and this is working like a charm. I added code and libraries to enable OTA updates to my project using AsyncElegantOTA, but now the sendMessage method of the UniversalTelegramBot object fails. I assume it times out as it blocks for quite a long time. The libraries I added are AsyncTCP, ESPAsyncWebServer (not ESPAsyncWebSrv), and AsyncElegantOTA. Does anyone have OTA updates working with UniversalTelegramBot?

lilbuzz commented 1 year ago

I resolved this issue. I was calling WiFi.config() to use a static IP Address, but the default gateway was incorrect. The OTA update still worked, but the message sending to Telegram did not. Now that I have the correct default gateway both are working together.