Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Picsum Pictures didnt show up in Fully Kiosk Browser #322

Open
kobraevents opened this issue Dec 30, 2024 · 1 comment
Open

Picsum Pictures didnt show up in Fully Kiosk Browser #322

kobraevents opened this issue Dec 30, 2024 · 1 comment

Comments

@kobraevents
Copy link

Hey there,
found a new issue:

on some users i always use the urls like in the examples:
https://picsum.photos/${width}/${height}?random=${timestamp}
in the webbrowser (for instance: MS Edge, Chrome) there isnt any problem, and wallpanel shows up some pictures from picsum.
on the android fully kiosk app it didnt load pictures from the url. i cant tell why, just saw it after installing the fully app on a tablet. same tablet with browser is no problem.

its not directly a wallpanel HA problem in my opionion.

@kobraevents
Copy link
Author

Update: With some changes and automation i run a own script in order to download stock pictures in a custom folder an play them with wallpanel.

AUTOMATION:
`alias: Automate Picsum Download Image Wallpanel
description: /media/local/pictures/Picsum
trigger:

  • platform: time_pattern
    minutes: /6
    condition:
  • condition: or
    conditions:
    • condition: state
      entity_id: input_text.wallpanel_image_url
      state: media-source://media_source/local/pictures/Picsum
    • condition: state
      entity_id: input_text.wallpanel_image_url_kids
      state: media-source://media_source/local/pictures/Picsum
      action:
  • action: script.turn_on
    target:
    entity_id: script.download_picsum_image
    data: {}
    enabled: true
  • choose:
    • conditions:
      • condition: time
        weekday:
        • sat
          after: "23:00:00"
          sequence:
      • action: shell_command.clean_picsum_image
        metadata: {}
        data: {}
        mode: single`

this automation runs the script to download and clean folder files -> you can possible change the folder in the following script to your nas. but i leave it in home assistant and due to running out of file space i clean the files ones a week.

SCRIPT:
`alias: Download Picsum Image
sequence:

  • action: shell_command.download_picsum_image
    data: {}
  • action: shell_command.clean_picsum_image
    data: {}
    enabled: false
    mode: restart
    description: ""
    icon: mdi:download-box
    alias: Clean Picsum Image
    sequence:
  • action: shell_command.clean_picsum_image
    data: {}
    enabled: true
  • action: shell_command.download_picsum_image
    data: {}
    enabled: false
    mode: restart
    description: ""
    icon: mdi:television-shimmer`

CONFIG YAML
shell_command: download_picsum_image: > bash -c 'wget --header="Accept: image/jpg" --header="Accept: image/jpeg" -O "/media/pictures/Picsum/picsum_$(date +%s).jpg" "https://picsum.photos/1920/1080.jpg?nature?random=$(date +%s)"' clean_picsum_image: > bash -c "ls -1t /media/pictures/Picsum | tail -n +8 | xargs -I {} rm -f /media/pictures/Picsum/{}"
This is the whole script that downloads the pictures, you can try them at first within the terminal. Note that the folder Picsum is createt first by mkdir. every pictures is saved by the name picsum followed by date and time in seconds.

Picsum is not the best plattform yet but i hav´nt found a better free one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant