Known Devices: Local Picture?

Hi. I’m trying to keep all of the pictures for devices inside if the “known_devices.yaml” file to be stored on the pi itself. I have the images in the directory “/home/hass/./homeassistant/images/”. In the known_devices.yaml file, where it says “picture:” for each device, what path do I set to point to where I have the images stored?

You have to put images on a folder named www on your HA directory.

In picture: use /local/image_name.jpg

3 Likes

I dont have a folder named “www” in the HA directory. What should I CD into to get this? The config directory or what?

Your HA installation (if you did not modified path) should be /home/pi/.homeassistant , so your folder should be at /home/pi/.homeassistant/www and put pictures inside.
Path will be /local/image_name.jpg

4 Likes

I didnt modify anything at all, I just dont have a www folder. Should i create one?

Yes, just create the folder.

This did not work for me

danichispa has right
you should create an www folder in the home assistant folder and put your images in.
to customize your installation with picture you could do that

customize :
  input_boolean.myinput:
      friendly_name: "My Input boolean"
      entity_picture: /local/image_name.jpg

take a look here if you want Customizing entities - Home Assistant

1 Like

This is still not working. The devices just show up with a white/blank picture. Nothing shows up in the log either related to the issue.

Hi,

You need to put the picture in /home/pi/.homeassistant/www on your device.
Then reference the picture on known_devices.yaml.
Example below:

apple_ipad_gen_1:
name: Apple iPad Gen 1
mac:
picture: /local/AppleIpad1.jpg
track: yes
hide_if_away: no

I am doing this though. I did exactly as the guide said and as everyone on the forum has said, yet they still show up as little white boxes. They are all .jpg files and I have the extensions added on.

It’s working fine on my HA. Did you restart the process?

pi@raspberrypi:~/.homeassistant $ sudo systemctl restart home-assistant@pi

  • Replace pi with your user

When i restarted it, I get this message. Here is what I ran, and the message I got:

pi@raspberrypi:/home/hass/.homeassistant $ sudo systemctl restart home-assistant@pi Failed to restart [email protected]: Unit [email protected] failed to load: No such file or directory.

Looks like you are using the Raspberry PI All-in-One installer. You can run “sudo reboot” to restart the whole raspberry pi.

I have done this as well as unplugged the pictures and replugged it back in (after shutting down, of course). Still nothing. I’d rather not reinstall HA as it took 2 hours…

I am not sure about it… I installed HA on Raspbian Jessie, the picture just working fine on my HA. Maybe someone expert can assist you on this…

I asked this question before and was told **" had this issue last night, the config needs to say local/filename but the file actually goes in config__dir/www". I took that to mean that the directory needs to be created here: /home/pi/.config

That said, I never got a chance to play around with the local images (just went with the http option), so I can’t verify if that information is correct.

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.