home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.7k stars 28.85k forks source link

Error in Telegram #116316

Open Ulthuan12 opened 2 months ago

Ulthuan12 commented 2 months ago

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:

notify:

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

home-assistant[bot] commented 2 months ago

telegram documentation telegram source

mchangsp commented 1 month ago

How many 'telegram_bot:' do you have in your configuration? Try first to have only 1.

Ulthuan12 commented 1 month ago

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