Local files not updating

Hello,

I have noticed that HomeAssistant does not recognize that an existing image has been replaced or deleted. (In config/www)
Even if I delete the file and go to the link again (cache cleared even tried other browser) the same image is still displayed. For me this is a problem because I have an automation that sends a notification to the phone with a screenshot of the camera, the screenshot is stored in config/www before and replaces the old image.
Does anyone know how to clear this internal Home Assistant cache?

Restart home assistant?

Well I cant restart Home Assistant every time I send a notification due to movement with the current screenshot of a camera.

Is there not another way to clear the cache?

Clearing the browser cache works for me. I just tested it.

Make a camera from the image and it will update.

?
Ok you opened a picture over as example: /local/test1.jpg
Replaced test1.jpg with a different picture than it was before, cleared the cache of your browser
and opened the /local/test1.jpg again? Well for me this is not working instantly, it takes a long time until it changes to the new picture.

It’s not going to update. You need to make a camera entity so that home assistant knows to update the image

Ok Im not exactly sure what you mean with that one.
The screenshots are saved in /local/go1984/garage.jpg as example.
Every time go1984 reports movement, go1984 instantly saves a screenshot to /www/go1984/garage.jpg and calls an event in HomeAssistant.

Do I have to create a camera from the local file cause there is no MJPEG stream of the camera? And what do I have to call in the automation then?

Ok I got it… Im just stupid… sorry.
I just created cameras now with the local file platform.

When I change the Image now its instantly changing to the new picture :wink: Thank you ^^

Almost. Instead of opening the new picture in my browser it was assigned to a Lovelace card background. A forced cache refresh updated it instantly.

1 Like

This is still happening, and responses such as clear the cache or restart homeassistant don’t address the issue or are workable - I have both html and png files that are in the homeassistant/config/www directory, one main html page which is pointed to from the left menu via a panel_iframe in configuration.html is very hard to refresh - refreshing in chrome doesn’t help. Has this been a constant (unsolved) problem since '21?

It’s not unsolved, this post mentions how they solved their issue.

petro, this is a workaround for one specific scenario, that doesn’t mean it’s resolved…

That’s exactly what it means. They had an issue. They solved it.

You have a different issue. Open a new topic.