Error sending messages from Telegram bot
The problem
Some of the messages I send to Telegram using Telegram bot are missing in a random way. I was using notify service. Changed to telegram_bot.send_message service but it fails the same. I have updated to last core version with the same result.
What version of Home Assistant Core has the issue?
core-2024.7.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
telegram bot
Link to integration documentation on our website
https://www.home-assistant.io/integrations/telegram_bot
Diagnostics information
No response
Example YAML snippet
telegram_bot:
- platform: polling
api_key: !secret telegram_api_key
allowed_chat_ids:
- !secret telegram_chat_id_one
- !secret telegram_chat_id_two
notify:
- name: telegram_one
platform: telegram
chat_id: !secret telegram_chat_id_one
- name: telegram_two
platform: telegram
chat_id: !secret telegram_chat_id_two
Anything in the logs that might be useful for us?
Registrador: homeassistant.components.telegram_bot
Fuente: components/telegram_bot/__init__.py:717
integración: Telegram bot (documentación, problemas)
Ocurrió por primera vez: 20:34:05 (2 ocurrencias)
Último inicio de sesión: 20:34:10
Error sending message: Timed out. Args: (Id_one, 'Subiendo la persiana izquierda de la terraza...'), kwargs: {'parse_mode': <ParseMode.MARKDOWN>, 'disable_web_page_preview': None, 'disable_notification': False, 'reply_to_message_id': None, 'reply_markup': None, 'read_timeout': 60, 'message_thread_id': None}
Error sending message: Timed out. Args: (Id_two, 'Subiendo la persiana izquierda de la terraza...'), kwargs: {'parse_mode': <ParseMode.MARKDOWN>, 'disable_web_page_preview': None, 'disable_notification': False, 'reply_to_message_id': None, 'reply_markup': None, 'read_timeout': None, 'message_thread_id': None}
Additional information
I'm using a script that send the same message to two different people with different chat_id according to the state of two helpers that enable the sending of the message. In one of the chats I've added 'timeout: 60'. I think that when a message fails, is in both chats but I'm not sure about that.
I have made a new telegram bot two days ago, and changed telegram api key to use new bot. Today I've lost one message. "Error sending message: Timed out" again
have same problem (ha 2024.8.1)
Error sending message: Timed out. Args: (XXXX, 'HA запущен'), kwargs: {'parse_mode': <ParseMode.MARKDOWN>, 'disable_web_page_preview': None, 'disable_notification': False, 'reply_to_message_id': None, 'reply_markup': None, 'read_timeout': None, 'message_thread_id': None}
Hello, same error . Sometimes after a restart it works better and sometimes nothing happens
`Logger: homeassistant.components.telegram_bot Quelle: components/telegram_bot/init.py:717 Integration: Telegram bot (Dokumentation, Probleme) Erstmals aufgetreten: 17. August 2024 um 21:08:50 (4 Vorkommnisse) Zuletzt protokolliert: 16:42:20
Error sending message: Timed out. Args: (TG id, 'Das Fenster im Bad ist seit 10min offen! 23.8°C / 72.4%'), kwargs: {'parse_mode': <ParseMode.HTML>, 'disable_web_page_preview': None, 'disable_notification': False, 'reply_to_message_id': None, 'reply_markup': None, 'read_timeout': None, 'message_thread_id': None} Error sending message: Timed out. Args: (TG id7, 'Das Fenster im Bad ist seit 10min offen! 22.3°C / 76.4%'), kwargs: {'parse_mode': <ParseMode.HTML>, 'disable_web_page_preview': None, 'disable_notification': False, 'reply_to_message_id': None, 'reply_markup': None, 'read_timeout': None, 'message_thread_id': None} Error sending message: Timed out. Args: (TG id, 'Das Fenster im Bad ist seit 10min offen! 22.6°C / 73.5%'), kwargs: {'parse_mode': <ParseMode.HTML>, 'disable_web_page_preview': None, 'disable_notification': False, 'reply_to_message_id': None, 'reply_markup': None, 'read_timeout': None, 'message_thread_id': None} Error sending message: Timed out. Args: (TG id, 'Die Außentemperatur beträgt zur Zeit 19.0 °C / Garten: 18.4°C / Hof: 18.4 °C'), kwargs: {'parse_mode': <ParseMode.HTML>, 'disable_web_page_preview': None, 'disable_notification': False, 'reply_to_message_id': None, 'reply_markup': None, 'read_timeout': None, 'message_thread_id': None}`
Same thing Error sending message: Timed out.
same here (with 2024.8.2) . one test message worked, after that nothing
2024-08-20 09:58:41.952 ERROR (MainThread) [homeassistant.components.telegram_bot] Error sending message: Timed out. Args: (-4....1, 'test2'), kwargs: {'parse_mode': <ParseMode.MARKDOWN>, 'disable_web_page_preview': None, 'disable_notification': False, 'reply_to_message_id': None, 'reply_markup': None, 'read_timeout': None, 'message_thread_id': None}
Approximately 90% of my automations are in Node Red. Until now Telegram notifications were done by calling a Home Assistant script. Last Sunday, I changed these notifications to Node Red directly using nodes from the 'node-red-contrib-telegrambot' palette. Since that moment and after four days, I have not missed any Telegram notifications. I think this indicates that there is a problem with the Home Assistant Telegram_bot integration. Perhaps a library that this integration depends on has recently changed and this error is a side effect. Who knows
the exact same error occurs when sending service messages. At the same time, no such error occurred before the update (2024.6.1 for sure). `homeassistant.components.telegram_bot Source: components/telegram_bot/init.py:717 Integration: Telegram bot (Documentation, problems)
Error sending message: Timed out. Args: (1087794605, '🌍 san xxxxxxxxxxxxxxx'), kwargs: {'parse_mode': <ParseMode.HTML>, 'disable_web_page_preview': None, 'disable_notification': False, 'reply_to_message_id': None, 'reply_markup': None, 'read_timeout': None, 'message_thread_id': None}`
Core 2024.8.3 Supervisor 2024.08.0 Operating System 13.1
Hi, same for me , i never have this issue before but i cannot give the core version
My actual configuration Core 2024.9.3 Supervisor 2024.09.1 Operating System 13.1 Interface utilisateur 20240909.1
and i have 90% of the message who are ok and 10% time out , hope this will be solve in the next core update
II've tried with polling and webhooks, and the same thing happens to me, some messages are not sent due to timeout. It's very frustrating because this worked very well a few months ago. Do you know of any alternative without using Node-Red? Thank you very much.
II've tried with polling and webhooks, and the same thing happens to me, some messages are not sent due to timeout. It's very frustrating because this worked very well a few months ago. Do you know of any alternative without using Node-Red? Thank you very much.
Sorry. I don't know any alternative of Telegram notifications without HA or NodeRed. With NodeRed, I don't have any problem. You can change to another notifications platform alternative like HA Companion aplication.
Hi , i want to share with you how i arrive to avoid to have this issue actually. To solve that I stop the extension Adguard Home. Since that i do not have anymore this time out. Look like something is not ok with both working together.
Hi , i want to share with you how i arrive to avoid to have this issue actually. To solve that I stop the extension Adguard Home. Since that i do not have anymore this time out. Look like something is not ok with both working together.
I have Adguard Home installed. But i don't want to disable it. I have compared my HA logs to see when I've lost a Telegram message and compare with Adguard logs to see any coincidence, any DNS request denegated by an Adguard filter and I can see nothing. It would be nice if the rest of people that has the same problems with Telegram messages could tell us if they are using Adguard Home. Thanks
It's was not a pleasure for me to do it because I need it to but due to the fact no one was helping on this issue I was testing a lot think. An till now since and chance the DNS on my server and do not pass the traffic via Adguard I can tell that no more 1 time out with telegram. Then for me this was the issue. But in the past I have Adguard and telegram working great. I don't know what happens. But yes if someone can like you share information that would be great 😃
the problem with Adguard is clearly indirect, because I don't have it, but there is a problem. Therefore, it is worth considering other possible options, rather than relying on only one Adguard...
Based on your information, I'm considering that something in the network configuration may be causing delays in sending and responding to Telegram requests, leading to this timeout error.
For me, it was Adguard, but for others, it could be any DNS filter.
Anyway, thank you for the information!
Yeah, same issue, "Error sending message: Timed out. ". Tested using POST direct sending on the network, meaning isolated due to network blocking. Likely due to Home Assistant's telegram_bot setup.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
My Home Assistant version is 2025.3.1. The problem sending Telegram messages persists. Today, I have four messages lost: "Error sending message: Timed out".
some Error here:
2025-04-02 08:53:36.106 ERROR (MainThread) [homeassistant.components.telegram_bot] Error sending photo: Timed out. Args: (), kwargs: {'chat_id': xxxxx, 'photo': <_io.BytesIO object at 0x7f1a29xxxxx>, 'caption': 'Pavillon Einfahrt 08:53:22"', 'disable_notification': True, 'reply_to_message_id': None, 'reply_markup': None, 'read_timeout': 12, 'parse_mode': <ParseMode.MARKDOWN>, 'message_thread_id': None}
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
I'm currently using Home Assistant version 2025.7.2. Due to bugs in the Telegram bot, I've switched 99% of my messages to Node Red. Currently, I haven't encountered any bugs in my occasional use (1%) of the Telegram bot in HA. Perhaps other users are still experiencing this issue with the Telegram bot.
I'm experiencing this in 2025.9.3, but the messages are actually being sent.