Telegram bot error

Hello,

When trying to let a trigger send a message to my telegram bot, I get the following error:

Log Details (ERROR)

Fri Nov 23 2018 23:27:33 GMT+0100 (Central European Standard Time)

Error while bootstrap del webhook: urllib3 HTTPError HTTPSConnectionPool(host=‘api.telegram.org’, port=443): Max retries exceeded with url: /bot745477681:AAGyGvh********RQKE1fxTcCoU_E-rmYww/deleteWebhook (Caused by NewConnectionError(‘<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x757157d0>: Failed to establish a new connection: [Errno -3] Try again’,))

I have the following code in configuration.yaml

telegram_bot:

  • platform: polling
    api_key: 745477681:AAGyGv************KE1fxTcCoU_E-rmYww
    allowed_chat_ids:

notify:
  - name: telegram    
    platform: telegram
    chat_id: *********

Strange thing is that it has worked, but only for a few hours or so…

There are a few old topics where people present the same problem, but I can’t seem to find a solution to it…

I think there might be an intermittent problem with the telegram servers this evening, I haven’t changed my telegram/notifications in ages but I got a couple of these error messages earlier.

It’s been a week for me now. I’m afraid it’s something on my end

Have you checked the syntax is correct?

This is how I have it and it’s working fine

# Telegram
telegram_bot:
  - platform: polling
    api_key: !secret api_telegram 
    allowed_chat_ids:
      - !secret chat_id 

And on my separate notify.yaml (I have separated them just for ease)

# Telegram
  - name: telegram
    platform: telegram
    chat_id: !secret chat_id 

Check your yaml code, specially the telegram_bot: part as the issue is probably there

I triplechecked everything, copied your examples, requested a new api key, doublechecked my chat_id but it still returns the same error… It really seems to be a telegram related issue I’m afraid :frowning:

Mine is working fine with that config…

How can I check if hassio has a working internet connection? I’m starting to think it might not be able to connect outside the local network.

Well… just try to connect to it from outside your network…

nevermind, I can acces the plugin page and download stuff so that can’t be the issue…
Thinking back about when it worked, I just realised I installed (and uninstalled) pi-hole on my hass.io on the same day because I have a seperate pi running pi-hole and wanted to install it on the hassio pi instead. However, I couldn’t get the hassio pi-hole add-on working so I uninstalled it. Could that somehow be related?

I have the same issue, and also noticed it started with pi-hole being a HA plugin. When I run pi-hole from a different device there were no issues

I’m having the same problem. Did someone find a solution to this?

Not really… I think it’s related to installing and uninstalling the pi-hole plugin. A fresh install of hassio did the trick. Copied my configuration.yaml and installed the necessary plugins and everything was running again :slight_smile:

Any news regarding this issue? I have the pi-hole addon, everything works well, even Telegram. But its very annoying to see the same warning message every minute:

WARNING (updater) [telegram.vendor.ptb_urllib3.urllib3.connectionpool] Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(’<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x6fc2d250>: Failed to establish a new connection: [Errno -3] Try again’)’: /botAPI_KEY_BOT/getUpdates`

Any advance?

1 Like

No solution yet but I feel like I’ve pinpointed the cause. I now have problems logging in to HA cloud, again because of pihole. I learned that, by installing pihole on the same system, you change the device’s dns settings. By uninstalling it, the system keeps refering to the pihole dns, which is non existent, leading to this behaviour. Since I started this topic I moved to ubuntu, giving me much better debugging options. That’s how I found out the above. Tonight I’ll reset my systems dns settings back to default. I’ll update this topic to let you know if it fixed the problem.

Yes, it seems that Pi-hole is the problem.

I’m sorry to have to do without him. Anyway, the Pi-hole addon for Hass.io is quite improvable (you can not even delete the logs).

Any advance you tell us

Didn’t manage to reset the DNS settings so ended up doing a clean install xD I’m a new linux user, still learning every day.
Anyway, both the telegram and HA cloud problems are solved, as expected. To confirm that pi-hole was the problem I installed pi-hole on a Rpi, hooked it up to my router, changed the router DNS settings and boom, telegram errors are back. Remove the Rpi with pi-hole, restore router’s DNS settings, and everythings working again.

I read online that it is possible in linux to bypass the pi-hole DNS, so that way you can exclude your entire machine from the filtering. I’ll try that sometime later. For now I’m happy that my problem is kind off solved, but not happy that all the webpages are infested with adds :’)

would be awesome if pi-hole offered an option in it’s dashboard to excluse an IP address from being filtered.

I have this problem in a clean install of hassio, then its not a pihole problem.

Any updates here? Did you guys found a way to fix this? I started experiencing this issue about a week ago :frowning:

Hi all, I have pihole installed as addon on my hassio and have same kind of warning logs, anyway the bot is working because I receive message, is only a warning, maybe someone can tell us how to set something in the bot, I don’t want to discard pihole, is usefull to remove ads for all devices in my local network, and I have not another system to install pihole standalone.

Hey guys, I’ve also got the problem, while using PiHole I get these messages. Also my system gradually gets slower (I don’t know if that’s related), it’s like the logs gradually clog op the available memory. This is the third time I’ve done a fresh install and it’s allways the same problems. Telegram works fine by the way. I’m thinking about getting myself a second Pi for a dedicaded install of PiHole.