I am running HA on a Raspberry Pi 4. I’ve installed the HASS. Agent on multiple computers in my network. I am trying to set up a simple broadcast message that includes an image. I have set it up to notify a group. When I set the location image to an external server it displays great. However when I try to include an image from the local Raspberry Pi file system all I get is a pop-up with text and no photo.
This code works perfectly:
broadcast_test:
alias: broadcast_test
sequence:
- service: notify.hassagent_group
data:
message: This is a test broadcast with image
title: Broadcast
data:
image: http://server:8008/Photo.jpg
duration: 15
mode: single
icon: mdi:broadcast
This code only only opens up a window with the text and no photo:
broadcast_test:
alias: broadcast_test
sequence:
- service: notify.hassagent_group
data:
message: This is a test broadcast with image
title: Broadcast
data:
image: /config/www/tmp/Photo.jpg
duration: 15
mode: single
icon: mdi:broadcast
I have tried it using the local ip address with no port and with port 8123 with no success. When I tried the ipaddress with no port I did see an error in the HASS.Agent log on the Windows computer: “Error: No connection could be made because the target machine actively refused it.” When I tried the ip address and port 8123 there was nothing in the log file. When I use just the relative path I get this error: “Unable to download image: only HTTP uri’s are allowed, got: /config/www/tmp/Photo.jpg”.
How do I set up the Raspberry Pi/HA application to serve up these files?
Also this is unrelated but it seems link the duration parameter does nothing. No matter what I set it to the pop up only stays visible for about 5 seconds.
Any help is greatly appreciated.