Open wilcomir opened 4 months ago
I have tried to manually send a message to the relevant group chat via curl
:
-H 'Content-Type: application/json' \
-d '{"chat_id": "123456789", "text": "This is a test from curl", "disable_notification": true}' \
https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage```
and it works just fine, I get back an ok response and the message arrives to the chat.
Restarting homeassistant fixes the issue, I have just tried. I suspect this might have something to do with the fact that I use the cloudflare add on to expose my instance to the internet. In the past I had a fixed public IP and exposed my instance via a reverse proxy & port forwarding, now that is not true anymore but this has changed a few months ago so I am not sure how the two can be connected.
I have the exact same problem. I can't figure out what's going on. I understand that when you start working in WebHook mode, some handshake happens and Secret Token is negotiated. And it seems that after some time (or some number of messages) this token is incorrectly reinstalled. I can't determine at what moment it happens.
Maybe this is because HA is installed behind Nginx which is used as Reverse Proxy?
I am running my homeassistant instance through the cloudflare add on. Not sure why it would have an impact - perhaps webhooks work via ip, and not fqdn? That would be rather odd though, and many more people would have this problem.
I'm not using a reverse proxy or cloudflare and am had the same issue.
I was just about to log into telegram to see if the API key had expired but after reading this issue tried a Home Assistant restart instead. That fixed it. 🤷♂️
The problem
About two or three days ago, my Telegram Bot that I use with homeassistant stopped working. I went through the log and noticed that the token was not working, I thought that perhaps they have a finite duration. Using the bot father I created a new token, updated my
configuration.yaml
, restarted homeassistant and it started working again.Fast forward this morning, I have the exact same problem again. I have pasted below the error log, albeit it is not super useful.
Can anyone help me in further debugging this issue? Thanks!
What version of Home Assistant Core has the issue?
core-2024.5.5
What was the last working version of Home Assistant Core?
core-2024.5.5
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
No response
Anything in the logs that might be useful for us?
Additional information
No response