core: Telegram bot: timeouts when sending video files >10mb

it gives me the following error

ERROR (SyncWorker_13) [homeassistant.components.telegram_bot] Error sending file: urllib3 HTTPError ('Connection aborted.', timeout('The write operation timed out',))

until know it worked without problem with files up to 15mb then suddendly and without code changes on my side it gives me this error if the files is bigger than 10mb.

Is there a way to modify the timeout time?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 34 (10 by maintainers)

Most upvoted comments

so, i fix it hard: copy all this files to /config/custom_components/telegram_bot/ (create this folder if not exist) and replace this lines in __init__.py:

if CONF_TIMEOUT in data:
                params[CONF_TIMEOUT] = data[CONF_TIMEOUT]

To this (set timeout hardcode):

params[CONF_TIMEOUT] = 1000

this solved the problem

No need to copy any files, simply use this construct:

  action:
      - service: notify.telegram_bot
        data:
          title: Your title
          message: "Your message"
          data:
            video:
              - file: '/path/to/your.mp4'
                timeout: 180 # set any timeout

@amigthea thank you so much

@Azertooth Please use the issue template that is shown when creating an issue. Thanks! 👍