Giter VIP home page Giter VIP logo

Comments (32)

j-a-n avatar j-a-n commented on June 9, 2024

I could not find any problem except that Nominatim API is sometimes a bit slow.
With version 3.5, the timeout for Nominatim API operations is now 15 seconds.
Also, the data is cached.
The Nominatim data contains a varying list of fields.
So it might be helpful to specify a list of alternatives, like this: ${address.town|address.city|address.municipality}.

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

That’s my current configuration

wallpanel: enabled: true idle_time: 2 image_url: / image_fit: scale-down display_time: 17 hide_toolbar: false hide_sidebar: false fullscreen: true image_order: random show_exif_info: true, fetch_address_data: true, exif_info_template: >- <span style="color:#990000"> </span> ${address.country!prefix=!suffix=; } ${address.region!prefix=!suffix=; } ${address.tourism!prefix=!suffix=; } ${address.county!suffix= / } ${address.town!suffix= / } ${DateTimeOriginal} image_list_update_interval: 600 screensaver_entity: input_boolean.wallpaper_screensaver info_animation_duration_x: 50 info_animation_duration_y: 50 info_animation_timing_function_x: steps(1, end) info_animation_timing_function_y: steps(1, end) style: wallpanel-screensaver-info-box: '--wp-card-width': 800px wallpanel-screensaver-info-box-content: '--ha-card-background': rgba(131,139,131,0) '--ha-card-box-shadow': none text-shadow: >- -0.5px -0.5px 0 rgb(17, 17, 17), 0.5px -0.5px 0 rgb(17, 17, 17), -0.5px 0.5px 0 rgb(17, 17, 17), 0.5px 0.5px 0 rgb(17, 17, 17) '--primary-text-color': '#ffffff' '--secondary-text-color': '#dddddd' wallpanel-screensaver-image-info-exif: font-weight: '900' color: '#ff9a00'

still (v 3.5) same problem, sometimes Date and location is correct, sometimes nothing is shown, pretty often the exif info from a prior shown image is shown, sometimes only date ……

i probably have to say, that I have a couple of hundred images in the folders to pick from, can that be the issue?

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

BDB49C82-8A4F-4C06-B79F-1FEBF612770E

This is an example of a mismatch, (only lower part of the picture) as the image itself shows the exif data. The exif data shown by wallpanel is from an image that has been shown a number of images before

from lovelace-wallpanel.

j-a-n avatar j-a-n commented on June 9, 2024

Any error messages in the browser console?

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

Found this

`Logger: frontend.js.latest.202209070
Source: components/system_log/init.py:227
First occurred: 12. September 2022, 18:28:40 (5 occurrences)
Last logged: 09:31:48

http://192.168.177.73:8123/hacsfiles/lovelace-wallpanel/wallpanel.js?hacstag=30950641634:955:21 TypeError: null is not an object (evaluating 'img.exifdata.address = info.address')
http://192.168.177.73:8123/hacsfiles/hass-swipe-navigation/swipe-navigation.js?hacstag=501725479150:6:51 TypeError: Argument 1 ('target') to MutationObserver.observe must be an instance of Node
http://192.168.177.73:8123/hacsfiles/lovelace-wallpanel/wallpanel.js?hacstag=30950641635:979:47 TypeError: null is not an object (evaluating 'img.exifdata.address = info.address')

`

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

And this`Logger: frontend.js.es5.202209070
Source: components/system_log/init.py:227
First occurred: 12. September 2022, 15:12:28 (1 occurrences)
Last logged: 12. September 2022, 15:12:28

http://192.168.177.73:8123/hacsfiles/lovelace-wallpanel/wallpanel.js?hacstag=30950641634:1781:34 Could not load image `

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

I just looked up the reverse nominatim with the gps data of an image where wallpaper showed the exif data of another image,

{ Altitude = "39 m \U00fcber dem meeresspiegel"; AltitudeRef = 0; DateStamp = "2013:07:19"; ImgDirection = "99.30026809651474"; ImgDirectionRef = T; Latitude = "1.286333333333333"; LatitudeRef = N; Longitude = "103.8501666666667"; LongitudeRef = E; TimeStamp = "10:43:50"; }

it worked fine, nominatim showed the correct location

31, Boat Quay, Clarke Quay, Singapore River, Singapur, Central, 049820, Singapur31Boat QuayClarke QuaySingapore RiverSingapurCentralSG-01049820Singapursg

so it doesnot seem to be an issue with the exif data

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

Somewhere it says that the exif data are cached. How can I delete the cache, maybe the problem is in there?

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

Do you yet have any idea for the reason of the problems? And maybe an idea to solve? And it is definitely not nay the location which is again and again wrong but also the date even when location is disabled.
It’s really a pity that it doesn’t work, I would love to have those infos displayed

from lovelace-wallpanel.

j-a-n avatar j-a-n commented on June 9, 2024

I am not sure, but it could be due to some faulty images.
There are some changes in version 4.0 that could solve the problem.

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

Well, after Installing 4.0 I first thought it’s solved, however it’s not.
But I get kind of an idea. Maybe it’s a matter of timing, caching, and mismatching exif Info
When I first started after 4.0, I still had ‚sorted order‘ and by that showing the same images as before with exact the same (wrong) exif. I then switched to random, the first 2 or 3 images didn’t show exif at all. Then the exif showed up and were correct for at least 6 or 7 images (display time currently 30 sec). Then I started to manually change the images by tapping. The next images showed first no exif then the exif of a past image (maybe 2 images back) and then everything was out of sync again. Sometimes correct exif, sometimes wrong (old) exif.
I read somewhere on internet, that therapist you use has sometimes a timing issue. So maybe wallpanel loads sometimes the image faster than the exif? And uses chanced exif if the new oe is not available?
well, I am not a coder and have not really knowledge, but looking at the behavior something like this sound logic for me.
Is there a way to reset / delete the cache, so old info is eliminated? Would make testing more reliable.
Also, can you somehow prevent that ‚old‘ / cached exif data is used? (Rather none then wrong)
What exactly is the effect of image-list_update_intervall? Should the number be rather low or high? (Especially with a large number of images to select from)

from lovelace-wallpanel.

j-a-n avatar j-a-n commented on June 9, 2024

I am working on a fix.
Could you please try this version:
https://github.com/j-a-n/lovelace-wallpanel/raw/fix-exif/wallpanel.js

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

First I appreciate your efforts, thanks.
Ok, her is what I did:
Downloaded the new wallpanel.js from the fix folder
Replaced wallpanel 4.0 version in www/community/Lovelace-wallpanel with the new version
Restarted HA
First - fifth image no exif, 6th image correct exif , 7th no exif, 8th correct exif, 9th exif from 6, 10th no exif , 11th exif from 6, 12 exif from 9 etc etc
Sorry for not having better feedback

I watched it now a little bit longer, it seems that about every 2-3rd image the exif is correct, then the next image the exif is incorrect, using the exif of the last but one or last but two images.
so I assume, that for what ever reason the exif can not be found (although all images do have full exif) and the prog is using ne of the last in list.
This seems to going on, meaning two images later the exif is correct, but one more the exif is from last but one or last but two (never seen that the image of the immediately precedent image was used)

I then terminated the HA app on my iPad and restarted, the first two images were correct, then for the next five or so the exif of those first two were used in switching order, then a correct one and then mor or less the same pattern.
Sometimes there are even two or three (never seen more) in a row were correct and then again one, two, three ‘old’ exif before a correct match again.

i also double checked on some of those images with incorrect exif shown, that the file does have complete exif data.

from lovelace-wallpanel.

j-a-n avatar j-a-n commented on June 9, 2024

Seems like your are still using the 4.0 version.
Please be sure that you clear your browser cache and try again.

from lovelace-wallpanel.

j-a-n avatar j-a-n commented on June 9, 2024

You can go to settings => dashboards => three dots in the top right corner => resources.
Then set the hacstag to something else in /hacsfiles/lovelace-wallpanel/wallpanel.js?hacstag=30950641640.
This will force the browser to load the new version.

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

from lovelace-wallpanel.

j-a-n avatar j-a-n commented on June 9, 2024

Just made some changes to the EXIF handling again.
New version is here:
https://github.com/j-a-n/lovelace-wallpanel/raw/fix-exif/wallpanel.js
Please replace your current wallpanel.js and change the hacstag number again.
Now you can add the placeholder ${image.path} to exif_info_template which will show the full path of the corresponding file.
Hopefully this helps to clarify any remaining issues.

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

Well I have done this, however no changes, I also can’t see the path
My current yaml

`wallpanel:
enabled: true
idle_time: 2
hide_toolbar: false
hide_sidebar: false
fullscreen: true
image_url: /
image_excludes: []
image_order: random
image_fit: scale-down
display_time: 10
show_exif_info: true
fetch_address_data: true
exif_info_template: >-
${address.tourism!prefix=!suffix=; }
${adress.country_code|address.country!prefix=!suffix=; }
${address.county|address.region!suffix= / }
${address.town|address.city|address.municipality|adress.village!suffix= / }
${DateTimeOriginal}
${image.path}
image_list_update_interval: 6000
screensaver_entity: input_boolean.wallpaper_screensaver
info_animation_duration_x: 50
info_animation_duration_y: 50
info_animation_timing_function_x: steps(1, end)
info_animation_timing_function_y: steps(1, end)
style:
wallpanel-screensaver-info-box:
'--wp-card-width': 800px
wallpanel-screensaver-info-box-content:
'--ha-card-background': rgba(131,139,131,0)
'--ha-card-box-shadow': none
text-shadow: >-
-0.5px -0.5px 0 rgb(17, 17, 17), 0.5px -0.5px 0 rgb(17, 17, 17), -0.5px
0.5px 0 rgb(17, 17, 17), 0.5px 0.5px 0 rgb(17, 17, 17)
'--primary-text-color': '#ffffff'
'--secondary-text-color': '#dddddd'
wallpanel-screensaver-image-info-exif:
font-weight: '900'
color: '#ff9a00'
cards:
- type: weather-forecast
wp_style:
width: 250px
grid-row: 1
grid-column: 1
name: Vorhersage
show_current: false
show_forecast: true
entity: weather.wettervorhersage_pirateweather
- type: glance
square: false
wp_style:
width: 450px
grid-row: 1
grid-column: 2
entities:
- entity: binary_sensor.regensensoren
show_name: false
show_state: true
icon_height: 10px
- entity: sensor.aussentemperatur
name: Temp
icon: mdi:home-thermometer
- entity: sensor.wetterstation_wind_speed_2
name: Wind
- entity: sensor.e3dc_battery_state_of_charge
name: Solarbatterie
- entity: sensor.e_golf_battery_level
name: Golf-Akku
- type: grid
square: true
columns: 4
wp_style:
width: 300px
grid-row: 2
grid-column: 1
margin-top: 650px
cards:
- type: button
entity: binary_sensor.fenster_erdgeschoss
name: Fenster EG
show_state: true
show_icon: false
theme: synthwave
card_mod:
style: |

          ha-card {
               color: black;
               font-size: 15px; 
               {% if states (config.entity) == 'on' %} background: rgba(238,64,0, 0.6)

               {% else %} background: rgb(78,238,148,0.6)
               {% endif %};
               {% if states (config.entity) == 'on' %} animation: blinking 4s linear alternate infinite

               {% else %} 
               {% endif %};    
               size: 20px;
               
             }      
          @keyframes blinking {
               30% {opacity: .2;}
               100% {opacity: .6;}
             }
    - type: button
      entity: binary_sensor.fenster_obergeschoss
      name: Fenster OG
      show_state: true
      show_icon: false
      theme: synthwave
      card_mod:
        style: |

          ha-card {
               color: black;
               font-size: 15px; 
               {% if states (config.entity) == 'on' %} background: rgba(238,64,0, 0.6)

               {% else %} background: rgb(78,238,148,0.6)
               {% endif %};
               {% if states (config.entity) == 'on' %} animation: blinking 4s linear alternate infinite

               {% else %} 
               {% endif %};    
               size: 20px;
               
             }      
          @keyframes blinking {
               30% {opacity: .2;}
               100% {opacity: .6;}
             }
    - type: button
      entity: binary_sensor.fenster_dach
      name: Fenster DG
      show_state: true
      show_icon: false
      theme: synthwave
      card_mod:
        style: |

          ha-card {
               color: black;
               font-size: 15px; 
               {% if states (config.entity) == 'on' %} background: rgba(238,64,0, 0.6)

               {% else %} background: rgb(78,238,148,0.6)
               {% endif %};
               {% if states (config.entity) == 'on' %} animation: blinking 4s linear alternate infinite

               {% else %} 
               {% endif %};    
               size: 20px;
               
             }      
          @keyframes blinking {
               30% {opacity: .2;}
               100% {opacity: .6;}
             }
    - type: entities
      entities:
        - entity: sensor.e3dc_solar_power
      name: Solarsstrom
      show_state: true
      show_icon: false
      theme: synthwave
      card_mod:
        style: |

          ha-card {
               color: black;
               font-size: 15px; 
               {% if states (config.entity) == 'on' %} background: rgba(238,64,0, 0.6)

               {% else %} background: rgb(78,238,148,0.6)
               {% endif %};
               {% if states (config.entity) == 'on' %} animation: blinking 4s linear alternate infinite

               {% else %} 
               {% endif %};    
               size: 20px;
               
             }      
          @keyframes blinking {
               30% {opacity: .2;}
               100% {opacity: .6;}
             }
- type: conditional
  wp_style:
    width: 150px
    grid-row: 2
    grid-column: 1
  conditions:
    - entity: sensor.garagentor_door_state_2
      state: open
  card:
    type: custom:banner-card
    background: red
    row_size: 1
    heading:
      - Achtung !
    entities:
      - entity: sensor.garagentor_door_state_2
        name: Garagentor
        map_state:
          open:
            value: Steht offen
          closed:
            value: Geschlossen
- type: conditional
  wp_style:
    width: 150px
    grid-row: 2
    grid-column: 2
  conditions:
    - entity: binary_sensor.keller_aussentuer_state
      state: open
  card:
    type: custom:banner-card
    background: red
    row_size: 1
    heading:
      - Achtung !
    entities:
      - entity: binary_sensor.keller_aussentuer_state
        name: Kellerausgang
        map_state:
          open:
            value: Steht offen
          closed:
            value: Geschlossen

profiles:
night:
info_animation_duration_x: 0
info_animation_duration_y: 0
style:
wallpanel-screensaver-overlay:
background: '#000000bb'
black:
black_screen_after_time: 1
profile_entity: input_select.wallpanel_profile `

I double checked that I updated the file and the hacstag number

from lovelace-wallpanel.

j-a-n avatar j-a-n commented on June 9, 2024

Your config looks good.
If ${image.path} is not filled in, you are still using the previous version.
Please try again to clear the cache.
Perhaps try to open the Dashboard on another device in a browser.

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

Ok, I I just downloaded the new version again, deleted the old js installed the new ne, changed the hacsnumber again and restarted HA
Now it works.
It’s still not perfect but much better. Now now for some images the exif is shown (incl. Path) for most of the images no exif (although available); but at least so far I had no mismatch.
It’s about 2-4 images with exif and 3-6 without

from lovelace-wallpanel.

j-a-n avatar j-a-n commented on June 9, 2024

Okay, thanks for the feedback!
Is the EXIF information always missing from the same images?
If that's the case, maybe you could send me one of the problematic images.

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

Here are exif data of an images where exif is not shown

{ ColorModel = RGB; DPIHeight = 72; DPIWidth = 72; Depth = 8; "File Name" = "D5B88381-282D-40C7-BDE6-A25153412AE8_image.JPG"; "File Size" = "5,4 MB"; Format = JPEG; "Image Size" = "4.032 x 3.024"; Orientation = 1; PixelHeight = 3024; PixelWidth = 4032; ProfileName = "Display P3"; Zeitzone = "GMT-10"; "{Exif}" = { ApertureValue = "1.69599381283836"; BrightnessValue = "4.930902035321138"; ColorSpace = 65535; ComponentsConfiguration = "1, 2, 3, 0"; DateTimeDigitized = "2019:10:04 09:21:13"; DateTimeOriginal = "2019:10:04 09:21:13"; ExifVersion = "2, 2, 1"; ExposureBiasValue = 0; ExposureMode = 0; ExposureProgram = 2; ExposureTime = "0.00819672131147541"; FNumber = "1.8"; Flash = 24; FlashPixVersion = "1, 0"; FocalLenIn35mmFilm = 26; FocalLength = "4.25"; ISOSpeedRatings = 64; LensMake = Apple; LensModel = "iPhone XS Max back dual camera 4.25mm f/1.8"; LensSpecification = "4.25, 6, 1.8, 2.4"; MeteringMode = 5; OffsetTime = "-10:00"; OffsetTimeDigitized = "-10:00"; OffsetTimeOriginal = "-10:00"; PixelXDimension = 4032; PixelYDimension = 3024; SceneCaptureType = 0; SceneType = 1; SensingMethod = 2; ShutterSpeedValue = "6.923665289888328"; SubjectArea = "2013, 1511, 2116, 1270"; SubsecTimeDigitized = 873; SubsecTimeOriginal = 873; WhiteBalance = 0; }; "{GPS}" = { Altitude = "86 m \U00fcber dem meeresspiegel"; AltitudeRef = 0; HPositioningError = "4.851004835632847"; ImgDirection = "79.6337724033686"; ImgDirectionRef = T; Latitude = "22.0527195"; LatitudeRef = N; Longitude = "159.36542"; LongitudeRef = W; Speed = 0; SpeedRef = K; }; "{IPTC}" = { DateCreated = 20191004; DigitalCreationDate = 20191004; DigitalCreationTime = 092113; TimeCreated = 092113; }; "{JFIF}" = { DensityUnit = 0; JFIFVersion = "1, 0, 1"; XDensity = 72; YDensity = 72; }; "{MakerApple}" = { 1 = 11; 12 = "62.57422, 54.92188"; 13 = 1; 14 = 0; 15 = 2; 16 = 1; 2 = E0009400DB00D900DB00C200DD00FD0025012901D9002701A101D10060006D003C010D012C01D000BA009D009000A10001011F01B301A2018301F70034019600E100E900ED0013016701D100DD00D700BB00C000FE00CE0193014E01A700B800C000C400FC00CF004A013501BB0071009600BF0095007401EF01D400A6007E000801DB0020010201330116019A004600780099007300AA000B01E40080004500E200C400CA00CA00E6000D014F0176001F01AA006D004C00D300DF005B004D00C100CE00AC00E3000801FE0043020A01460126018A006E008E0087008500730078007B00E200C400C000EA00FD01AC01B900D000A9006700B10095007D006B009800CE00DC00E800AA0003017E015B01D300B8003E0137017F010C0323015C007500D000D4006B00AC00EC001101FA00E20080001901F500BA01FF00E1004B007100A70059008A008500B200C9000201E700CC0051008400D9009601E7006F00960048006200A0007D00A900A700D500E100E50062005200F900AC006D004A003C00360055006E007400B3009E00BE00F2000301A2004200530094006A00430038003F005C005A007A009C006B00BC00E9000F01D300520041005C005A0054003A004500690053007000770051007600B400DB00A000580044004D004B003800740081004C006300860050006C006D00A200A000750065004B00460052004A00; 20 = 10; 23 = 13631488; 25 = 2; 3 = { epoch = 0; flags = 1; timescale = 1000000000; value = 526736273257708; }; 31 = 0; 32 = "191BA421-4445-444A-A3F2-43486D78A46B"; 33 = 0; 35 = "145, 268435515"; 37 = 394; 38 = 3; 39 = "43.32733"; 4 = 1; 40 = 2; 43 = "2930371A-8314-425B-9E8F-275B6BABBA0C"; 5 = 184; 6 = 191; 7 = 1; 8 = "-0.9916368, -0.01352542, -0.1320387"; }; "{TIFF}" = { DateTime = "2019:10:04 09:21:13"; Make = Apple; Model = "iPhone XS Max"; Orientation = 1; ResolutionUnit = 2; Software = "13.0"; XResolution = 72; YResolution = 72; }; "{iOS Metadaten}" = { Ablage Erstellungsdatum = 03.09.22, 20:36:14; Ablage Datum geändert = 03.09.22, 20:36:14; Ablage Zuletzt geöffnet = 03.09.22, 20:36:14; Ablage Einstellungen Datum geändert = 20.09.22, 14:12:21; }; }

from lovelace-wallpanel.

j-a-n avatar j-a-n commented on June 9, 2024

Sorry, I would need a jpg file.

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

2012 Aida Gibraltar 538 23674

for this image no exif data is shown and yes it looks like this is kind of constantly. I changed the order to sorted, this is always the first image shown without exif

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

2012 Aida Gibraltar 553 23723

For this the exif data (always) show up after a couple of seconds

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

2012 Aida Gibraltar 796 24225

another one where exif data is not shown

from lovelace-wallpanel.

j-a-n avatar j-a-n commented on June 9, 2024

Thanks for the images!
Found one problem:
Images with uppercase .JPG extension where not checked for EXIF data.
This is now fixed in:
https://github.com/j-a-n/lovelace-wallpanel/raw/fix-exif/wallpanel.js

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

from lovelace-wallpanel.

j-a-n avatar j-a-n commented on June 9, 2024

Nice!
Fix released in v4.1

from lovelace-wallpanel.

kwithus avatar kwithus commented on June 9, 2024

from lovelace-wallpanel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.