question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Static image is not refetched correctly

See original GitHub issue

I currently using this card to show static camera image by default. Image does not refresh unless you reload browser page. I used before Generic Camera built-in integration. It updates static_image_url every 10 seconds. Maybe it’s possible to add same functionality for this card? Configuration could be something like this:

image:
  src: http://192.168.1.104:5000/api/camera/latest.jpg #latest snapshot URL from frigate
  refresh: true
  timeout: 10

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
peledziuscommented, Jan 18, 2022

How can I test changes? HACS does not allow to download main branch. Getting No content to download error. I think it’s because frigate-hass-card.js does not exist in directory.

EDIT: Never mind, didn’t see build instructions at the bottom of the page. But still would be nice to have a possibility to download it with HACS and without need to download required dependencies for building.

EDIT 2: Tested, now image refreshing every 10 seconds. Very nice work @dermotduffy

0reactions
peledziuscommented, Jan 18, 2022

Multiple loops refreshing image. For example: Edit card in Lovelace, new image refresh loop spawns. I think there are also some situations where it spawns new loop without editing card.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Image Component will not update correctly when passing in ...
Given the same URL a new key will not "reload" the image (the component will be rerendered but the image won't be refetched)....
Read more >
javascript - Refresh image with a new one at the same url
Try adding a cachebreaker at the end of the url: newImage.src = "http://localhost/image.jpg?" + new Date().getTime();. This will append the ...
Read more >
Fixing the Top 10 Mistakes in Handling Website Images
A tip: Even if the metadata is of no use to your site, do retain the image's original shooting orientation to ensure a...
Read more >
Queries - Apollo GraphQL Docs
Refetching enables you to refresh query results in response to a particular user action, as opposed to using a fixed interval. Let's add...
Read more >
Next.js automatic image optimization with next/image
Learn about automatic image optimization and how it can benefit developers with the native, game-changing, and powerful next/image API.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found