I would like to add a web camera that monitors an external resource (static image url). Am I correct that there is no way to limit the number of queries (per time unit) other than limit_refetch_to_url_change"? In my case, the URL does not change (but the image can change).
I am looking for something like scan_interval that I can be set to 5 minutes or so.
Currently, Home Assistant currently seems to fetch the image every 10 seconds and I don’t want to abuse the external resource. (Or is this a bug?)
(if I am correct, this can be considered a feature request)
I have a similar issue. Using platform: generic with a still_image_url which is fetching every 10 seconds, regardless of whether a scan_interval is set. According to the doc the camera and platform are part of the entity components so should support the scan_interval?
Since I couldn’t search up a solution to this one, here’s what I ended up doing…
The Generic IP camera supports templates in the url, plus the limit_refetch_to_url_change option, so I added a dummy parameter to the url that is time-dependent (and changes at the desired refresh interval). Something like this:
camera:
- platform: generic
limit_refetch_to_url_change: true
# This url changes once every 10 minutes
still_image_url: "http://194.218.96.92/jpg/image.jpg&my_refresh={{ now().minute//10 }}"
Caveats:
This only works for slowing down the refresh (like OP, I’m trying not to abuse an external server)
You need to find a parameter name that the server will ignore and not give an error
I would also like to see the possibility to set the ‘scan_interval’. Having the local webcam from my city in lovelace is nice and the workaround of having the webpage card is not fitting well since there’s no adaptation of the picture to the size of the card etc.
So I vote for having the ‘scan_interval’ available in the Generic Camera!
Would be great if this could be added! Thx and all the best!