core
core copied to clipboard
Error in Telegram
The problem
I am trying to do automation in HA with Telegram and it is not working correctly. I have looked at the log and I have found two errors detailed below.
My configuration in configuration.ymal is: telegram_bot:
- platform: polling
api_key: My_api_key
allowed_chat_ids:
- #ID user 1
notify:
- platform: telegram name: "My_name" chat_id: #ID user 1
i think it is correct because I can receive messages from HA anda sometimes de commands works. Other times commands is not working.
If someome could help me I would appreciate it.
Thanks in advanced.
What version of Home Assistant Core has the issue?
core-2024.4.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
Link to integration documentation on our website
https://www.home-assistant.io/integrations/telegram
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Registrador: telegram.ext.Updater
Fuente: runner.py:189
Ocurrió por primera vez: 00:03:59 (131 ocurrencias)
Último inicio de sesión: 22:36:09
Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
Registrador: telegram.ext.Updater
Fuente: /usr/local/lib/python3.12/site-packages/telegram/ext/_updater.py:411
Ocurrió por primera vez: 00:03:59 (131 ocurrencias)
Último inicio de sesión: 22:36:09
Exception happened while polling for updates.
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/telegram/ext/_updater.py", line 742, in _network_loop_retry
if not await do_action():
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/telegram/ext/_updater.py", line 736, in do_action
return action_cb_task.result()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/telegram/ext/_updater.py", line 387, in polling_action_cb
raise exc
File "/usr/local/lib/python3.12/site-packages/telegram/ext/_updater.py", line 376, in polling_action_cb
updates = await self.bot.get_updates(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/telegram/_bot.py", line 541, in decorator
result = await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/telegram/_bot.py", line 4177, in get_updates
await self._post(
File "/usr/local/lib/python3.12/site-packages/telegram/_bot.py", line 629, in _post
return await self._do_post(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/telegram/_bot.py", line 657, in _do_post
return await request.post(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/telegram/request/_baserequest.py", line 200, in post
result = await self._request_wrapper(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/telegram/request/_baserequest.py", line 381, in _request_wrapper
raise Conflict(message)
telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
Additional information
Python version: 3.12.2
How many 'telegram_bot:' do you have in your configuration? Try first to have only 1.
Hello,
I could find the mistake. I write It here in case someoane would have the same problem.
In my case I use node red for automations but I had try one automations in HA and I was using Telegram call in both sites. I have deleted one and the problem gone.
Thanks to mchangso for answer my topic.
Best regards
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.