shurillu / CTBot

A simple (and easy to use) Arduino Telegram BOT Library for ESP8266/ESP32
MIT License
147 stars 34 forks source link

Problem after global telegram down 6.06.2020 #52

Closed hamster66 closed 4 years ago

hamster66 commented 4 years ago

Hi After after global telegram down at 6.06.2020 I see only

Connected using DNS
getNewMessage error: {}

in debug mode and no more info :( and messages will not be sent or received... Bots on other devices, for example, on my router work normally HELP!!! :)

Araris commented 4 years ago

Hi The same situation, bots on all devices except ESP8266 + CTBot work... Condition is met if (!telegramServer.connect(telegramServerIP, TELEGRAM_PORT))

potonzio commented 4 years ago

I have the same problem with UniversalTelegramBot library, so the problem doesn't reguard only CTbot library

smrtlve commented 4 years ago

yeah, i have same situation on ESP8266 NodeMCUv3

shurillu commented 4 years ago

Hello,

now I’m away from home and I don’t have my notebook. I’ll be back wednesday, so please hold on!

Stefano

Di-Strix commented 4 years ago

@shurillu I've made a pull request with quick fix of this problem. Please check it. https://github.com/shurillu/CTBot/pull/53 It seems telegram has changed certificate again... And for some reason telegramServer.print(URL) works fine, but telegramServer.println(URL) doesn't

hamster66 commented 4 years ago

This fix dont work

Di-Strix commented 4 years ago

@hamster66 Try to set debug mode in CTBot.h to 1 and run echo bot from examples folder. After open serial monitor at 115200 and paste log here.

Di-Strix commented 4 years ago

BTW Telegram now supports ONLY https. If you try to connect over http it will return error 301 (moved permanently)

mad-b commented 4 years ago

I just noted something. I don't know if something changed on Telegram itself, or what, however I did not change a single bit on it, it was running 24x7 and not communicating. I asked to a person to recycle power on the 8266 (it is located remotely from here), and it regain connection and is responding now. Is there some issue on long term running - the mais idea for me and for this bot interaction, I presume - that causes connection to be lost and not regain anymore? Or should I eventually rescan WiFi connection or some sort of similar periodical "reset" on it?

hamster66 commented 4 years ago

Everything worked again! Apparently something was fixed on the telegram servers

shurillu commented 4 years ago

Everything worked again!

Apparently something was fixed on the telegram servers

Mmm are you saying that you didn’t modify/recompile the firmware and now it work again? In other words, do the old firmware now works again?

Stefano

mad-b commented 4 years ago

Precisely. However it was stuck - unfortunatedly I don't know now if it hanged on connection issues - it may be with the local router or so. I think I will make a periodic "reconnection" method to avoid running continuously and if the connection drops for whatever reason, it would not be connected without a manual power cycle. Anyway, as I told, just a power recycle and is talking again. No changes at all

mad-b commented 4 years ago

Question, should I rely on the recent fix, or in existing code?

hamster66 commented 4 years ago

Everything worked again! Apparently something was fixed on the telegram servers

Mmm are you saying that you didn’t modify/recompile the firmware and now it work again? In other words, do the old firmware now works again?

Stefano

Yes

I only change fixed ip: #define TELEGRAM_IP "149.154.167.220" But it doesn’t matter - everything works on a branch with URL

mad-b commented 4 years ago

BTW I have always used dns option set

shurillu commented 4 years ago

Good! BTW, when I’ll be back to home (-2 days) I’ll do several test to check all the functionalities.

Stefano

Di-Strix commented 4 years ago

Strange things are happening... But if it started working - great :)

Di-Strix commented 4 years ago

Question, should I rely on the recent fix, or in existing code?

If it works with existing code - use it. Because recent fix is only working with one set of settings.

shurillu commented 4 years ago

Hello to all, finally I got the time to check the issue: it may be a temporary issue due to Telegram server because the old code seems to work just ok - no patch needed (and all the pre "Telegram down" firmwares should work). For these reasons, I'll close the issue. BTW, if someone should find issue related to this thread, fell fre to reopen it.