witnessmenow / Universal-Arduino-Telegram-Bot

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

Messages from universaltelegrambot being read over serial #258

Open mandgeo opened 2 years ago

mandgeo commented 2 years ago

My sketch is using multiple libraries ... pubsubclient, softwareserial, spi, sd, wifi.... Constantly waiting for messages over software serial, two ports defined. Telegram is doing his thing at one second interval.

The problem is that sometimes messages generated by universaltelegrambot are being read as messages from serial port. I think they are debug messages. They look like messages coming over http, something with connecting and so on.

Please give me a hint about this problem. Thanks!

witnessmenow commented 2 years ago

You would have to modify the telegram library to not print to serial anywhere, there is no flag to do it at the moment.

Just comment out all Serial.print in the cpp file

On Mon 18 Oct 2021, 05:00 mandgeo, @.***> wrote:

My sketch is using multiple libraries ... pubsubclient, softwareserial, spi, sd, wifi.... Constantly waiting for messages over software serial, two ports defined. Telegram is doing his thing at one second interval.

The problem is that sometimes messages generated by universaltelegrambot are being read as messages from serial port. I think they are debug messages. They look like messages coming over http, something with connecting and so on.

Please give me a hint about this problem. Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot/issues/258, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAL5PQWMLS6XIC7KDLFGOWLUHOLUNANCNFSM5GFUHMAA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

mandgeo commented 2 years ago

I think I found the guilty one. One of the devices connected over serial is a esp using asynctelegram. And that library, from time to time, reconnects to Telegram and spits info over serial. Another one going to universal :D

Thank you for your work!