I am running HASSIO Supervised on a Raspberry Pi 4.
I am receiving a JPG image file in Node-RED and I save the contents in /share.
I have also the following whitelist:
homeassistant:
whitelist_external_dirs:
- /share
How can I display the JPG file in Lovelace.
I tried the Picture Card with the Image Path /share/filename.jpg but the image is not recognized.
Picture Entity and Picture Glance also do not recognize the JPG image.
Does anybody know how to share a file between Node-RED and Lovelace (Home Assistant)?
Hi,
Save pictures under: / config / www /
Call: / local /
I hope I understand you correctly.
pwgdrx
However, the image will not update immediately or until the browser cache is cleared.
Maybe you are looking for something like generic camera?
pwgdrx
Again, I found what I actually meant:
local file
Save picture as: / config / www / …
use / local / … in configuration.yaml.
Will be updated immediately even if the image is changed.
pwgdrx
1 Like
Thanks @pwgdrx but I think I need something else
/config/www is used to share files over a http:// link
I don’t know what you mean with /local in configuration.yaml
Hallo,
Sorry, I messed up. Almost everywhere you have to specify / local / if the real directory is / config / www /. Here it is, for me the first case, probably not so… ![:frowning: :frowning:](https://community.home-assistant.io/images/emoji/twitter/frowning.png?v=12)
For me it works like this:
in configuration.yaml
camera:
- platform: local_file
file_path: /config/www/local_file_camera/image.png
Then a picture glance card:
After adding an image or renaming an existing image in the directory, it appears in the card after a few seconds.
pwgdrx
1 Like
Thanks @pwgdrx for your pointer to https://www.home-assistant.io/integrations/local_file/
I am going to try it out. Will let you know the result.
@pwgdrx it works!
- I whitelist the folder /share in configuration.yaml
- in Node-Red I save a JPG file in the folder /share
- I created a camera like you said:
camera:
- platform: local_file
name: example_camera
file_path: /share/example.jpg
Then you can refer to the camera in a card
1 Like