Could change the output to an animated PNG file, might work better.
Happy to test. Just FYI this is what the image looks like when I open on TG mobile.
Itās really not the biggest deal but I liked it for convenience. Oh, and I donāt think the hass app supports gifs yet, just tried and no luck.
Ok so I triedā¦
How do I get the image? I tired adding a path to the mail_today.gif and I couldnāt find where to put the camera.mail_usps.
Thanks
Get the image where? Lovelace? Notification?
With the UPS Update: Follow Your Delivery on a Live Map
email did it still come from [email protected]
email address?
It did yes.
Iāll add this to the next version I have cooking
Did you add this bit of code to your configuration.yaml under the camera:
section? And verify that the path is accurate?
I just saw the documentation was updated. Iām getting a config error now that Iām working through after putting the sensors: template in
FINALLY!!!
Holy crap that was an adventure. Thanks for all the help!
Iām getting a weird error regarding the image in the Home Assistant logs:
2020-02-14 15:40:12 ERROR (MainThread) [homeassistant.components.hangouts.hangouts_bot] Failed to fetch image, <class 'aiohttp.client_exceptions.ClientConnectorError'>
Going to see if itās a permissions thing.
EDIT: Not a permissions thing, but the notification via the mobile app works perfectly fine.
With the gif? Hmmā¦must not have mine right.
Hereās my log erroring out in TG:
2020-02-14 08:09:40 ERROR (SyncWorker_1) [homeassistant.components.telegram_bot] Error sending message: Timed out. Args: (XXXXXXXXXX, "*Today's Mail and Packages*\n3 pieces of mail will be delivered. No packages are in transit."), kwargs: {'parse_mode': 'Markdown', 'disable_notification': False, 'disable_web_page_preview': None, 'reply_to_message_id': None, 'reply_markup': None, 'timeout': None}
2020-02-14 08:09:40 ERROR (SyncWorker_8) [homeassistant.components.telegram_bot] Error sending file: Timed out. Args: (XXXXXXXX, <_io.BufferedReader name='/config/www/mail_and_packages/mail_today.gif'>), kwargs: {'caption': None, 'parse_mode': 'Markdown', 'disable_notification': False, 'disable_web_page_preview': None, 'reply_to_message_id': None, 'reply_markup': None, 'timeout': None}
Also had this later when I tried manually:
2020-02-14 10:26:57 WARNING (updater) [telegram.vendor.ptb_urllib3.urllib3.connectionpool] Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x7f47d71c3a10>, 'Connection to api.telegram.org timed out. (connect timeout=5.0)')': /botXXXXXXXXXXXXXXX/getUpdates
2020-02-14 10:27:02 WARNING (updater) [telegram.vendor.ptb_urllib3.urllib3.connectionpool] Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x7f47d5430950>, 'Connection to api.telegram.org timed out. (connect timeout=5.0)')': /botXXXXXXXXXXXXXXXXXXXXX/getUpdates
Via the Home Assistant companion app notifications with the image work fine, Iām not sure whatās going on as the image seems fine when I hit it from external sources.
Taking a look through the Imageio docs I see that gifsicle also has a python port. This can dramatically reduce the size of animated gifs.
I use it to reduce the size of the animated weather maps I pull in from the National Weather Service in a shell script. Iām going to look into this so I donāt have to load the binary for my weather card.
I have image scaling to 700x315 on my branch for testing if anyone wants to give it a go for testing as well. @moralmunky
Iāve installed the efficiency branch. No mail today. Commenting out the image deleting so I can check out the images.
Once the efficiency branch is merged Iāll create a development branch.
Version 0.1.1 up on github and HACS
Changes:
- Only login to email once and pull all the emails needed in one swoop
- Changed GIF rotation time to 5 seconds
- Subtract delivered packages from āin transitā packages, should no longer result in negative counts
- No more slow start warnings since we check the email in one call now
- Added aspect ratio calculations to keep image looking correctly
- Added additional subject searches for FedEx emails
- Bump version to 0.1.0 since weāre no longer using Imagemagick and fixed the speed issues
If you find bugs fire up an issue on github.
First thanks for all the work everyone has done on this it is an awesome component that I am really excited to get working. Unfortunately I am having some trouble.
Before I updated to 0.1.1 I go to the point that it created all the sensors but I couldnāt get it to detect the emails. Now that I have updated the sensors are gone and I am getting an error in the logs saying āunable to install package scipyā and it is suggesting that I upgrade the pip. Truth is I am not at all savy when it comes to command line so I am hoping someone could point me in the right direction.
I am running the homeassistant docker in Unraid if it matters.