witnessmenow / Universal-Arduino-Telegram-Bot

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

How to not receive the same message again after restart? #333

Open dmikushin opened 11 months ago

dmikushin commented 11 months ago

I'm doing ESP.restart() in response to a restart message sent by Telegram client. However, after device reboots, it get the same restart message, and eventually restarts forever. How do I avoid executing the same message again after restart?

Dilbao commented 11 months ago

If you restart from within the function that processes messages, the processing of the current message will be incomplete. Instead do something like this:

robedua commented 2 months ago

Boa tarde isso não funciona !!!!!

ldijkman commented 1 month ago

Hmmm think i doing it as describe but i get a boot loop

https://t.me/Luberth_Dijkman https://github.com/ldijkman/async-esp-fs-webserver/blob/master/docs/ino/thermostat_web_flash/chatgpt_thermostat.ino

Screenshot from 2024-05-11 06-34-53