If you used the AIO installer, as stated here, " The Home Assistant configuration is located at /home/hass/.homeassistant. The virtualenv with the Home Assistant installation is located at /srv/hass/hass_venv.
"
So you’ll have to make the www
dir at one of those dirs. I don’t use the AIO or virtualenv, so can’t tell exactly where’s the right location, but should be one of those two.
I even tried setting the picutres from dropbox shared links (http) and it didnt work. They do have https as the protocol so does it need to be http?
Have you checked the file permissions? It’s working on mine with permissions set to 660 (I uploaded them to my pi through a samba shared folder from my windows desktop)
If you check the chrome developer console you can see if you have http/https conflicts, there would be an error for each picture if that is the problem. You can also use the element inspector to see what url the state-badge tags in the ui use for the background-image css.
I had the same problem with pictures showing up. The documentation says to use picture: /local/picture_name.jpg in the known_devices.yaml but I could never get that to work.
The way it works for me is to use the customize area in the configuration.yaml NOT the known_devices.yaml and “entity_picture: /local/picture_name.jpg”. Maybe a documentation change is necessary to prevent more people from getting confused.
You have to restart HA after the www dir is created. I have no problem setting the image inside known_devices.yaml to /local/myimage.png
It seems there’s a few bugs with the known_devices.yaml. I (out of habit) always restart HA after every change. This does not solve the issue, as others have commented on above. I also noticed that the known_devices.yaml file duplicates a lot of device entries over (I am using the netgear platform for device discovery). So for some reason, it’s not properly reading entries, hence the need for doing it as I indicated above in the customize section with entity_picture
Worked for me, am using AOI installer. Using this to display a plot image on a custom panel. Creating the www then /local/myImage.png + HA restart did the trick.
I appreciate it if you can share your config and html file for custom_panel.
Thanks a lot
I’m using hassbian on my raspberrypi2.
I found the python init script (looking for config, mapping of the /local path to ./www) in /srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/frontend/init.py
the www directory path you should create is /home/homeassistant/.homeassistant/www
Just somehow it is expecting the 1 under the hidden directory (same level as your configuration.yaml file) instead of the 1 relative to our home directory.
TL;DR:
su homeassistant
mkdir /home/homeassistant/.homeassistant/www
echo hello > /home/homeassistant/.homeassistant/www/index.html
sudo systemctl restart [email protected]
Now, you can access the index.html file via: http://raspberrypi:8123/local/index.html
I’m using the All-in-One installer and this works for me:
Inside of /home/homeassistant/.homeassistant/www/
I have a file mbp.png
. By default the www
directory does not exist, however, you can simply create it with mkdir www
from within the /home/homeassistant/.homeassistant/
directory after executing sudo su homeassistant
if connected via ssh
as the pi
user.
I also found this to be the only working solution after multiple attempts with known_devices.yaml and HA restarts.
Thanks a bunch!!!
Anyone any idea what the path is on my Synology docker installation? I tried to create a www directory in the homeassistant directory but that apears not to be the right path?
Assuming that you used the official home assistant docker image the path should be whichever folder on your Synology that you have set as /config in the docker gui
So if you have synology set up like this…
/volume1/your/folder : /config
The correct path should be…
/volume1/your/folder/www
Then images can be saved in this folder…
/volume1/your/folder/www/name_of_image.png
Edit: but in homeassistant configuration you would use…
customize:
entity_picture: /local/name_of_image.png
You probably need to restart hass too.
Hey JimBob,
Thank you for your quick answer, I installed Home Assistant in the following way:
sudo docker run --name home-assistant --restart=always --net=host --privileged -itd -v /volume1/Shared/docker/homeassistant/config:/config --device /dev/ttyUSB0 homeassistant/home-assistant
So the installation directory is “/volume1/Shared/docker/homeassistant/”
So I created the www map as follows “/volume1/Shared/docker/homeassistant/www” and put the jpg inside it, but this is not working, what am I doing wrong? I tried a png and a jpg file neighter one of them are showing up.
Thanks for responding,
André
You’re missing the final “config” folder in your path, so you’ll have to create the folder at /volume1/Shared/docker/homeassistant/config/www
Thank you for your answer,
You were right
Kind regards,
André
I think I’ve done everything right but I dont get the picture - only white color.
What might be wrong - can the file be too large or what?
Finally got it working by creating www directory under /config.
Mine installation is all in one installation (Hassbian). It does not has directory homeassistant/.homeassistant !!
Also it does not recognize Sudo command. Only can use hassio command.
Anyone can let me know if I need to run sudo command to do other installations !!
Thanks Kclau, I followed your advice and now it worked. Just create the www under config.