I would like to start using floorplans/maps with various device actions on them. This means I need locally stored images, that can be seen over the network.
I managed to upload images to HA, but as they need to be accessed with a token, I either need to refresh the token every day (no), or have an image with a long-lived token (also not a good idea).
How have other people done things?
Is it worth spinning up an http image host?
Or maybe throwing files into an nginx folder inside HA?
Thoughts on a postcard :)
HA has a “www” folder that by default that is accessible to the network. Anything in /config/www appears at http://yourhassaddress:8123/local, so your images will be at http://homeassistant.local:8123/local/image.jpg
Aha, that was what I was after, big thanks!
So, after a bit of meddling:
The location I was placing things in was media>my media (from the HA UI).
Assets there are stored in /media, and served in 8123/media/local, but require an autoSig.
Changing permissions doesn’t affect the availability, no sig is a 401 error.However, if the file is copied from /media to /config/www/ , it’s then served (as you said) under 8123/local.
Brill, not too painful a process for a few static images (or indeed if I’m feeling brave, I could just symlink the folders).
Maybe one day there will be a way to upload background images for picture elements cards from the UI :)
If you’re using HAOS (ie not running in docker), there is an official add-on called “File Editor” that allows you to edit the config.yaml and upload files from the UI. It’s not perfect but gets the job done.
That’s a very good shout, as it’ll save me mucking about in bash.
Gotta be contrarian here and say: using floorplans as your graphic frame for controls is very inefficient. And not very good graphical design.
I can appreciate that!
I do have standard layouts which are mostly big button to do a thing in the room.
But I also fancied having by-floor layouts.And you’re right: The button I have that sets the kitchen spots on/off/dim as a group is 10x more useable than a scale representation of their location in the ceiling!
For many years, I’ve used Weebly to host images, docs, etc, on our website URLs, but they’re just static. When I need to do work on my phone or laptop and need that synch’d elsewhere, I use the Microsoft suite, but those are normally Excel charts or Word docs.
I’m more interested in what people are doing for internal hosting, not external hosting services. Thanks for the info, however.
Lots of localcloud solutions have S3-compatible features. There’s also MinIO, Garage or Zenk if you just want to do it yourself.