Local_file camera too slow to be useful

I’m using Asterisk to alert FreePBX via NodeRed when a caller rings. I have about 20 regular callers whose names are linked to a picture on my system. I’m trying to get Home Assistant to display the picture in lovelace when they ring. It has to happen in a timely fashion if it’s to be of any use at all.

At the moment I’m doing it by overwriting an image file stored locally on the same server as Home Assistant. In theory Home Assistant is able to detect the camera image file has changed and update it.

In practice for me at least this is a really slow process. Occasionally it happens within a few seconds (but this is rare). Sometimes flicking from one tab to another prods it into waking up but usually I’m finding I have to reload the page to get the correct (up to date) image to show.

Surely this can’t be right?

Is there a better way?

I’m using the local file camera component

  - platform: local_file
    file_path: /config/www/images/caller.jpg
    name: caller

Cheers!

The camera image in a home assistant card only updates every 10 seconds. You have to click on it to pop up the more info camera view for a ~1sec update rate.

drat. Thanks

You might be able to pop up the latest image using this:

thank you - but hmmm - not sure - the most relevant example seems to be this

- id: popup_camera_when_human_detected
  alias: Popup Camera When Human Detected
  hide_entity: true
  initial_state: 'true'
  trigger:
    platform: state
    entity_id: binary_sensor.human
    to: 'on'
  action:
    - service: browser_mod.command
      data:
        command: more-info
        entity_id: camera.main
        deviceID:
          - 12345678-12345678

but all that’s doing i showing the camera - which, as we know, isn’t very good at being up to date.

As I said earlier, the pop-up polls 10x faster than the card - though I don’t know if this holds true for browser-mod pop-ups. Try it. What have you got to lose?

I’ll try it. Thanks

1 Like