Open pszafer opened 2 years ago
Just if somebody has same issue, I made workaround with pyscript addon from HACS:
from PIL import Image
@service
def convert_image(filename):
with Image.open(f"/config/www/tmp/{filename}", "r") as im:
im.save(f"/config/www/tmp/{filename}")
and run service just before sending to telegram_bot.
@rroller let me know if you'd like to get some more info or should I close the issue (I guess it's more Dahua firmware bug)
I have the same issue with a DB61 doorbell but when I checked the mime type of the file it read correctly as image/jpeg
. Identical to other fully functional Dahua cameras. I suspect there is something else preventing the snapshot camera service from working. If I use the ONVIF integration with the same DB61 doorbell camera the snapshot service works just fine, the problem is something to do with the HTTP API / Dahua integration...
Version of the custom_component
Version 0.9.40
Configuration
Describe the bug
Hello, first, thanks for this integration! I want to send picture via telegram bot when somebody is detected.
I used automation like this:
it end up with log as above. Looking through other issues it seems that snapshot service is making jpg without proper mimetype. https://github.com/home-assistant/core/issues/7413
Can you check it out? Thanks!