LAB02-Research / HASS.Agent

Windows-based client for Home Assistant. Provides notifications, quick actions, commands, sensors and more.
https://hassagent.lab02-research.org
MIT License
1.54k stars 67 forks source link

Misc: Hass.Agent on Windows does not display image? #278

Open digitaldias opened 1 year ago

digitaldias commented 1 year ago

Hello. This is probably more me than the product, but I've set up a shared folder in my NAS where I store snapshots from my webcamera. I would like to display these snapshots in a notification. The image URL that I am sending is a file url: file://<my NAS>/docker/ha/snapshots/<mycamera>_latest.jpg

The script that I am testing this with looks like:

service: notify.<my computer>
data:
  message: Oh noes, lookie here!
  title: Spooky times!
  data:
    image: file://<my computer>/docker/ha/snapshots/<my camera>_latest.jpg

The URL checks out fine in the browser but does not show in the windows notification. I only get the title and the text. I would love some hints as to what might be wrong, I searched through the documentation and issues here, but I couldn't find the answer. I am betting that it is something really silly though :)

amadeo-alex commented 1 year ago

Hello, By default HASS.Agent treats the image resources as a http/s resources, this is why URI "file://..." fails. Would you please check your logs for following: "[NOTIFIER] Image download failed, dropping"?

I'll think about adding this as an additional feature for https://github.com/LAB02-Research/HASS.Agent.Staging/pull/18, need to do some tests before though.

amadeo-alex commented 1 year ago

Done :)