I have a Telegram bot that relays information about the status of my home network, but I’m having an issue with it. Sometimes when my internet is interrupted (ISP issues) and restored, I miss at least one message.
I can see in the automation trace where it says it ran and passed the correct information but it just doesn’t get to my Telegram chat.
The common scenario is something like this:
- Internet goes out
- Router fails over to backup ISP
- Bot sends message about status
- I get the message of the change
- Primary ISP comes back
(Gets fuzzy here)
- Bot sends message about status
- Router fails back to primary ISP
(I never get the message about it coming back to normal)
I can reproduce it more than half the time…I’m guessing it’s a race condition where its sending the message as the connection switches over and is interrupted. I’m not sure how to get Home Assistant bot to “verify” if the message was sent and re-send it if required, or ensure its REALLY connected to Telegram servers before sending.
Thoughts?