I want to send an image file in a Telegram notification, but (assume) I require the full file path to the file. Since I am within the Docker container the config folder is mapped to /config, but what should the full path be? I currently get the error below:
Error sending file: Can't parse entities: can't find end of the entity starting at byte offset 54. Args: (339855604, <_io.BufferedReader name='/config/www/deepstack_images/deepstack_person_2019-06-26-21-25-01.jpg'>), kwargs: {'caption': 'Captured /config/www/deepstack_images/deepstack_person_2019-06-26-21-25-01.jpg', 'parse_mode': 'Markdown', 'disable_notification': False, 'disable_web_page_preview': None, 'reply_to_message_id': None, 'reply_markup': None, 'timeout': Nonne}
So I have discovered the full path, but appears HA cannot access it, so I will have to use the local share approach. This is one of those ‘docker lessons’
Log Details (WARNING)
Thu Jun 27 2019 06:05:01 GMT+0100 (British Summer Time)
'/var/services/homes/robmarkcole/Home-Assistant/www/deepstack_images/deepstack_person_2019-06-26-21-25-01.jpg' are not secure to load data from!
I use Docker (non-hassio) and I have an “alarm system” that I configured that takes a snapshot from the camera that monitors the area that triggered the alarm then it sends that snapshot to my pushbullet notifications.
Here is the snippet of the code that maps the sensor that triggered the alarm to the file name to be saved:
I was looking to make it work without success when I’ve found this topic. My problem was that the “www” folder had just been created so access by /local/ path was not working.
If someone has the same problem, you just had to reboot HA !