refreshable-picture-card icon indicating copy to clipboard operation
refreshable-picture-card copied to clipboard

Auto-refresh only works with Firefox

Open makoONE opened this issue 1 year ago • 11 comments

I have integrated a refreshable-picture-card in a home assistant dashboard. I noticed that the automatic refresh of the card only works with the Firefox browser. With other browsers like Chrome, Edge and Safari the automatic refresh does not work. The behavior is independent of the value of refresh_interval in the card configuration. Is this a bug in the card or a feature of the respective browser?

makoONE avatar Mar 12 '23 16:03 makoONE

I updated a few days ago via home assistant hacs and could not understand why my images that save from my IP cameras 'on motion' to a tmp folder and then get displayed in refreshable-picture-card where not updating. (Same image remained no matter what I did) After messing around for literally the entire day until I finally tried the firefox and it worked. So I can confirm the new version only works in firefox and not chrome/brave/edge/etc.. There must be some caching issue that is causing a bug in chrome/brave/edge/... PS: The slider for refresh interval is not working but putting in manually does work - unrelated I am sure.

macflyhub avatar Mar 12 '23 23:03 macflyhub

Is there something we can do from our side ( besides refreshing the browsercache ) ?

howi42 avatar Mar 13 '23 10:03 howi42

I am not a javascript developer, but is the browser behavior perhaps related to the fact that since card version 0.2.0 code fragments are now loaded from external CDN unpkg.com?

makoONE avatar Mar 14 '23 14:03 makoONE

I have obtained the refreshable picture card via HACS. What is the best way to downgrade to the previous version? The card also does not update in the Home Assistant app and is therefore unusable for me.

makoONE avatar Mar 16 '23 19:03 makoONE

same for me refresh interval don't work on chrome

AlainBRUNEL avatar Mar 22 '23 04:03 AlainBRUNEL

@makoONE My 55" display is made up using many of these cards and it literally has ruined my home assistant by not having this working. I cannot figure out how it can be fixed and the developer isn't commenting here. I can only give it another week before I am forced to abandon ship.

macflyhub avatar Mar 23 '23 01:03 macflyhub

I replaced the refreshable with the solution described in the thread earlier. Works without problems.

  • Wolfgang

On Thu, Mar 23, 2023, 02:02 macflyhub @.***> wrote:

@makoONE https://github.com/makoONE My 55" display is made up using many of these cards and it literally has ruined my home assistant by not having this working. I cannot figure out how it can be fixed and the developer isn't commenting here. I can only give it another week before I am forced to abandon ship.

— Reply to this email directly, view it on GitHub https://github.com/dimagoltsman/refreshable-picture-card/issues/26#issuecomment-1480440719, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACC3MNA53E4XFRKCC6UPWC3W5OOKHANCNFSM6AAAAAAVYGPAPA . You are receiving this because you commented.Message ID: @.***>

howi42 avatar Mar 23 '23 10:03 howi42

I must be really stupid because I can't figure this out.

macflyhub avatar Mar 24 '23 20:03 macflyhub

Sorry, my answer was too fast ! I used a solution from a different thread : https://community.home-assistant.io/t/refresh-cached-images-in-lovelace-picture-elements-maybe-other-places-too/98351/9

Here is my version:

The picture which is update regularly via an automation : /local/media/meteogram.svg

Then I created a Generic Camera in Integrations , using this url : http://192.168.10.41:8123/local/media/meteogram.svg

This resulted in an Entity : camera.meteogramm_2

In the UI I defined a card : ` type: custom:config-template-card entities:

  • camera.meteogramm_2 card: show_state: false show_name: false type: picture-entity camera_image: camera.meteogramm_2 aspect_ratio: 1 entity: camera.meteogramm_2

Hope this helps.

  • Wolfgang

howi42 avatar Mar 24 '23 21:03 howi42

Is there a workaround for this bug ?

AlainBRUNEL avatar May 01 '23 09:05 AlainBRUNEL

Oh boy, I'm really sorry for this issue!

I introduced the # url because I read that it would be easier on servers, but tested only on firefox... I'm a too lazy programmer!

Glad that it is fixed in 0.2.1!

sanzoghenzo avatar May 14 '23 09:05 sanzoghenzo