Gallery Panel for images/videos

I think there is a problem when there are no files in directory…

Excellent work, thank you!

Just one question, does it display correctly for you on Android? For me it just flickers when trying to play the first video and doesn’t stop flickering.

Your post may go to the issue I am having.
I am not able to re-start hA after adding the sensor lines to configuration.yaml getting this

Platform error sensor.files - Integration 'files' not found.

My media files are at /mnt/usb2TBMount /(Music etc.) and I have a symlink to this folder in /config/www/ called mediaFiles. My config lines are

  - platform: files
    folder: /config/www/mediaFiles
    name: gallery_images
    sort: date

I don’t have the folder you quote in yr fstab line but I do have
~/homeassistant/share/hassio/share

I am not that familiar with bind mounts. Is …/Deck/ an empty folder of is that where you have your files? Would the following work with the symlink
~/homeassistant/share/hassio/share/Deck/ ~/homeassistant/share/hassio/homeassistant/www/mediaFiles

EDIT Got it worked out:
/mnt/usb2TBMount /home/pi/homeassistant/share/hassio/homeassistant/www/mediaTest

Hrm, no, it plays for me. I wasn’t sure if you meant the app or the website, but tried both and while the app is slower to load, it still works.

See if it’s a bandwidth problem. Try setting maximum_files low, like to 2, and see if it still does it. If not, then try upping that to a setting that performs well.

That did it, thanks! Managed to get it working with maximum_files: 15

Cheers!

I have rewritten the panel to be a card. This ensures the functionality will be supported going forward, and provides some extra features and flexibility.

If you’re moving from Gallary Panel, the files component is unchanged.
You can remove the panel from your configuration and home assistant file structure, and set up the new one starting with the “Installation - Gallery Card” instructions.

New features include:

  • It is a card! Which means it can be added to any dashboard. To get the old panel equivalent, add a new Dashboard and add the card in Panel Mode.
  • Added a configuration panel, so you don’t have to use yaml/configuration to setup the card (still required for the files component, however). You also get a “live” preview.
  • Added a new option for Menu Alignment. Leaving it out or setting to Responsive will work the way it did before.
  • Added left/right swipe of the large image on touch screen devices for navigation.
  • Fixed the error that occurred when there were no files detected.
3 Likes

Nice job! But…I’ve noticed something annoying. When recordings list containts only one file and is aligned to bottom it displays a very large image comparing to list containing for example three images…
Ad. Is it possible to add opton to select a few entities rather than only one?

Hello, the integration of this component is not available through hacs?
when trying to add the custom repository it gives me this error:
Repostitory structure for master is not compliant

@majkers - I’ll look into those. I almost never have less than a dozen things on mine so I hadn’t noticed the sizing thing.

@pollinolas - no, it’s not in hacs (yet). I haven’t looked into what that takes at all. Maybe some day. :slight_smile:

1 Like

I fixed the sizing issue. Replace the card with the latest .js and clear your browser cache.

Yes, I can see how that one would be very annoying.

1 Like

Thanks! Now the size is OK but how about hiding scroll when it is not necessary?

does the tab function still exist in the new card?

No, I removed it from the card, but you can get more or less the same with functionality in Home Assistant. I.e. add a new dashboard, add as many views to the dashboard as you need, set them each to Panel mode, and add a Gallery card to each set to display the corresponding entity. This allows you to combine it with other modules also, e.g. Custom Header.

1 Like

That makes sense. Thanks!

Just released v2.0 of the Gallery Card, which adds two most requested features:

  • Ability to add multiple entities. Images from entities will be shown in the order of the entities (i.e. will not sort together by date, unfortunately). But the maximum_files will apply to each entity (e.g. 2 entities and maximum_files = 5 will result in a maximum of 10 images).

  • Support for camera entities. The latest image or stream of the camera will be displayed on the thumbnail as well as the large image.

Use case: I have added my camera entity first followed by the files entity, which means on my display I get the live image followed by the newest recordings from the folder.

To update: replace the gallery_card.js and clear your browser cache.

2 Likes

Can I get the filelist sort order reversed?

It doesn’t have that feature, but I’ll try to get it added.

Good work!!

I have migrated from html panel and works like a charm. Only a few style things could be better but nothing important!.

Waiting for disponibility in hacs! Thanks @TarheelGrad1998

1 Like

I’ve added HACS support. You may have to add it as a Custom Repository for now, but hopefully it will be in the default soon.

1 Like

Have a question that I hope someone will be able to help me with. I had this working very well with camera recordings saved to the HA directory /config/www/cameras. I am now changing to saving the images to a windows share - the share is mounted with a shell command when home assistant starts. The problem occurs when defining the file sensor that is used within Card Gallery. The path where the videos are stored is not created until HA starts, therefore the file sensor always returns an error (directory does not exist). I have searched everywhere, but have not found a way to change the file_path attribute of the file sensor dynamically. Does anyone else have any suggestions to make this work?