HA cannot find image files

Being as well a Linux as a Home Assistant novice I reinstalled a Medion portable from scratch with Ubuntu 22.04.1 LTS and then installed Docker and Home Assistant Core on it as described in https://siytek.com/how-to-install-home-assistant-on-ubuntu/ manner.

The installation ran without any problems.

The login to Home Assistant with Firefox was also successful, although I had to use the IP address for this: http:// my-IP-adress :8123/ , connection from Firefox with http:// homeassistant.local :8123/ does not work.

Very annoying is that I can’t manage to add images such as the floorplans of my home to HA-dashboards: floorplans are essential to display controls and easily operate the smart devices.

After having placed the images by means of the command ““sudo cp” in the folder /homeassistant, I took ownership of that folder with “sudo chown -R user:user ” and set the permissions of the folder with “sudo chmod 755” so that the files in the folder should be accessible to all users.

Despite these measures, HA cannot find the floorplans in the /homeassistant folder: when I add a Picture Elements Card to a dashboard with following lines of code:

type: picture-elements
elements:
- type: image
image: http://<my-ip-adress>:8125/homeassistant/picture.png

the floor plan does not appear, but an icon indicating that the link is broken does appear.

Ditto when I add a Picture Card to a dashboard:

type: picture
image: http://<my-ip-adress>:8125/homeassistant/picture.png

The problem not only occurs with png files, but also with jpg files.

Anyone have any idea what’s wrong and how I should fix it?

What’s the name of your domain? Typically routers default to local, but if you changed it… it could be anything else.

if the image is local, you should be putting it in the config/www folder and the path would be /local/picture.png

Hi Petro,

I will first create the config/www folder, move the pictures to it and use /local/picture.png as path in the Picture Elements Card. Hopefully that works.

In the mean time I will also dive into the modem settings and try to figure out what the name of my domain is. Beiing (also …) a modem novice that may take a while. At a first glance i can’t find anything with “domain” as title but there are a bunch of other settings: WAN MAC-adres, IP Gateway, sunet mask, IPv4 adress range, no static IP-adresses, …

Chris

petro

Your domain is most likely local if you didn’t change it.

Did you change the name of your home assistant? If you don’t know, you can view what the hostname is in HA.

Open your Home Assistant instance and manage your systems network configuration.

That page will show you your hostname, then you’d just use hostname.domain. Making the default homeassistant.local, however if you change either of those things it will be different.

Lastly, you can probably find your domain name by googling your router with “default domain”, I’m sure something would come up.

Why not simply follow the official instructions and run HA Container on Ubuntu?

Hi Petro,
Problem solved!
When i returned to the dashboard after changing the language in my profile settings from “Nederlands” (my language) to English, the images appeared suddenly! When I verified the url I saw that /local/image.png did the job. When i changed the language back to “Nederlands” the images still appeared. Everything allright now!
Tx for having me guided!

Hi Christoph,
I tried to do that several times but encountered problems. Therefor I looked for another solution and the Siytek-procedure went well from the first time. I hope that it keeps going well.
If that’s not the case I will surely return to the official instructions and retry them.
Tx for the reaction!