Gallery Panel for images/videos

this works… thanks

Anyone ever notice the caption time/date being one photo off… like when I’m on the first picture it has the time and date of the next picture in the gallery as the caption (they are timestamped in the image, so that’s how I noticed)…

also anyone get it to work with a name prefix/suffix? When I have the name before or after the date format it just totally breaks the caption (NaN etc) or should I be putting that in the gallery page format ? (Although I have multiple Names I would like saved in the same folder… ie: porch_2019_06_19__20_00_00-0400.jpg, side_yard_2019_06_19__20_00_00-0400.jpg) I ended up just removing the identifier for now thinking the extra underscores caused it but that’s when I noticed they seem to be one photo off)

No I haven’t noticed that…not really sure how that would happen, but I guess anything is possible.

It does assume that all images in the folder are the same format, so having the mixed identifiers would definitely cause the NaN. The only way currently to make that work is to leave out the file name format, or to split them into two sensors/tabs as suggested for surge919 above.

So just to keep you informed… my dates were off again, so I was doing a little investigating…
Apparently my computer/HA is saving it with the wrong timestamp…

-rw-r--r-- 1 homeassistant homeassistant 351851 Mar 20 13:51 2020_03_20__13_50_45-0400.jpg
-rw-r--r-- 1 homeassistant homeassistant 337197 Mar 20 13:51 2020_03_20__13_51_12-0400.jpg
-rw-r--r-- 1 homeassistant homeassistant 327326 Mar 20 17:24 2020_03_20__13_51_48-0400.jpg
-rw-r--r-- 1 homeassistant homeassistant 316172 Mar 20 17:25 2020_03_20__17_24_17-0400.jpg

So, definitely an issue on my end that I will have to look into. Thanks.

… so I was using (last_triggered) of the automation as the source of the time stamp… clearly something is happening too fast that that attribute hasn’t always been updated by the time it saves. I do have a faster system now maybe that’s why it’s suddenly more prevalent. Thanks !

I do not want to duplicate the motioneye images or recordings to my google cloud drive consuming GB’s of space unnecessarily. Could this be adapted to use the “\share\motioneye\Camera#” path to see all files at that location?

This is something i’m looking to do also.

If you’re running home assistant on a linux system you set up this is easy to make work. I use the home assistant supervise version running on Ubuntu, which is as close to hassio as you can get without being on a restricted OS. Then you simply use a bind based mount and mount the share\motion\Camera# directory on the www/images directory. From my fstab file that mounts the directory

/usr/share/hassio/share/Deck/ /usr/share/hassio/homeassistant/www/images/deck/ none defaults,bind 0 0

Then in HA configuration.yaml

sensor:
  - platform: files
    folder: /config/www/images/deck
    name: cat_images
    sort: date

You should be able to do something similar even if you’re using hassio.

1 Like

Nice project! There is a way to add a frame with a stream? I wish to have a panel that shows live stream and the last captured pictures from ipcam

That’s a great project man! Many thanks for sharing that with the community :slight_smile:

Would it be possible to fix issue with mp4 files preview? I would be really grateful because there is no other solution like yours and I love it :slight_smile:

What issue are you seeing? My videos are mp4 and are working.

I can’t play videos in Safari. However, I just noticed that it works well in mobile and in other browsers :slight_smile:

Hi!

Sadly, with latest HA release (https://www.home-assistant.io/blog/2020/07/01/release-112/) custom panels are being deprecated and are said to be removed in the future.
Do you plan to do any re-write so your Gallery Panel will be available as add-on?

Thanks!

Thanks for letting me know, I haven’t been following the upcoming releases as closely as I should.

My understanding based on that and the documentation update (https://www.home-assistant.io/integrations/panel_custom/) is that webcomponent_path is depricated, which this panel does not use. So hopefully it is safe.

If not, I’ll definitely fix it eventually, I use it myself and it’s not functionality I’d like to lose, and I’ve yet to see anything that’s a good replacement. It just might take me a bit. :slight_smile:

2 Likes

I think you are right in your analysis of what is changing.

Thanks for replying :slight_smile:
That’s good to hear as I absolutely love your panel. Maybe I’m using it not that often but if there’s a need it is much helpful and irreplaceable – I did not find any alternative.

I’ve just received following error in the Log right after Home Assistant startup :frowning: I don’t use any other custom panels.

1 Like

This is the PR that will need addressing:

Ignore it. It is quite clear that this component is not affected.

1 Like

I am getting

Uncaught (in promise) TypeError: this.hass is undefined

in javascript console.

How does it behave otherwise? Does it load at all? If not, I’d double check your configuration and make sure your entities are correct.

On another note, I’ve done some digging, and despite it being unclear I do believe this panel will be covered by the deprecation, as they want it to be all js based now. I have started rewriting the panel, but it will probably take me a few weeks.

2 Likes