[PROJECT] Google Photos integration for dashboard image slide-show

Any error logs during install?

I opened the log page, then repeated the uninstall/reinstall. Logs show this error:

[app:6691](http://192.168.6.30/logs#app6691)2021-05-25 09:44:12.404 am [info](http://192.168.6.30/installedapp/configure/6691)Google Photos App updating

[app:6691](http://192.168.6.30/logs#app6691)2021-05-25 09:44:03.366 am [error](http://192.168.6.30/installedapp/configure/6691)java.lang.RuntimeException: CronExpression '*/60 * * ? * *' is invalid. on line 204 (installed)

[app:6691](http://192.168.6.30/logs#app6691)2021-05-25 09:44:03.315 am [info](http://192.168.6.30/installedapp/configure/6691)Google Photos App installed

Ok, I see - a bug when I added the refresh interval setting, that impacts new installs, but not updates. Will push a fix later today.

2 Likes

photos-app:0.2.1 has a fix for this install bug

1 Like

It's working now. Thank you for fixing it so fast!

Confirmed. Working great now. Thank you.

Thanks again for this app - the dashboard tile has become a fan favorite in my house. Just wondering - is it possible to support multiple 'devices' - each one representing a Google Photo's folder? I was imagining having a couple of dashboard tiles - each one rotating through images.

1 Like

You could install multiple instances of the App, and use the same GCP Project and credentials.json, to accomplish this.

I'm sure it could be implemented under one App instance - but will have to spend some time thinking about how to architect this.

1 Like

Is there a way to shuffle the pictures? Thanks.

Currently the photos are cycled in the order they are in the album -- so you can re-order the album, and the new order will be picked up by the nightly refresh (if enabled) or when you click Load Photos from Album.

If a randomized order each time through is what you're looking for, then no -- that is not currently implemented.

It's probably easiest to start tracking enhancement requests via GitHub issues -- so feel free to start adding items there, if there are features you'd like to see!

1 Like

Thanks for this btw - I didn't know/think of that option. I haven't tried it yet but probably will once I get my custom dashboard changes working..

speaking of - here's what I've got..

  • I'm only interested in showing images on the main dashboard view so if I get a video mediaType I'm replacing the =dv param with the image one.
  • when a video is clicked on I'm showing the video in a full-screen dialog with media controls

There was 1 more thing I wanted to add but it would require driver changes and not sure how difficult it'd be (or if it's even worth it since I don't know how any other dashboards would use it).. What about adding 2 methods to the driver - next() and prev() - which would just replace the image attribute with the next or previous one? For my dashboard I'd add next/previous buttons to the tile which would make those calls (through the MakerAPI)

Anyway, I don't have any Hubitat driver experience but I can look into that myself too.. but, just wondering out loud in case it's something that others would also benefit from

thanks!
joe

1 last question --

What is the refresh interval in? I was thinking seconds but valid values are are < 60. Is it in minutes?
image

I've noticed I get a new image every minute when it's set to "60"

The current refresh() method technically loads the next image - easy enough to do the reverse.

The refresh interval is in seconds - I made an assumption (perhaps a poor one) that you wanted to configure a smaller interval, not longer? As implemented, it will technically only work properly for numbers that divide a minute evenly, since it's using a cron/quartz expression

cool - thanks!

The refresh interval is in seconds - I made an assumption (perhaps a poor one) that you wanted to configure a smaller interval, not longer?

Yeah, I was looking for 5 minutes or longer. I have a few always on wall mounted tablets so I figured no need to load a new image every minute

App: 0.3.0 and Driver:0.1.0 pushed tonight. New features:

  • Preferences toggle to shuffle images -- requested by @Navat604
  • New commands for more granular "slideshow" control
    • next
    • previous
    • pause -- @jpage4500 thought this might be desired when a user goes to fullscreen?
    • resume -- when user exits fullscreen
4 Likes

Much appreciated! I also noticed you can now enter refresh time in minutes - thanks!

I've already got an update out for my dashboard app which allows you to advance to the next or previous image. I decided against using the pause function for now - just to avoid accidentally pausing it and not resuming it again. Plus, the user can always go back if the image changes.

Hi @dkilgore90 . Thanks for great app and great job. I'm trying to use your application in Sharptools dashboard. I managed to create sharptools dashboard tile which shows photos from chosen album.
My problem is that photo tile in sharptools is not updating when photo changes. Photo changes normally when checking it in Hubitat but won't update in sharptools and needs manual refresh.

Sharptools instruction says:

" * Attribute - enter the name of the attribute that is stuffed with html"

and..

"Some community developed Hubitat device handlers use a ‘hack’ in which they stuff device attributes with HTML to enable them to display data as tables or embed images."

So I'm using just image attribute but can't figure out what would be stuffed html attribute for the image in your application? I'm wondering if just using image attribute causes tile to not refresh in sharptools. Does that "stuffed image attribute ring any bells?

Clearly everything in your application works like it should be but for some reason photo/image change does not work in sharptools..

Unlike the normal SharpTools tiles which get instant updates, this particular 'custom tile' uses polling to get status updates. Since the original use case for that tile was rendering custom weather layouts, the polling was set to every hour. I’m on dad duty this glorious Saturday (watching the kids), but when I get some availability I can add a refresh rate option to the custom tile.

In the meantime, I shared a quick fix in your thread in the SharpTools community on how to make the polling faster. :smiley:

2 Likes

Hi,

Shuffle does not work. It worked before but when I added photos to google photo album and pressed load photos from album.. after that it started to show photos in that exact order from album. Any ideas what to try?

EDIT. or is it so that album needs to be rolled through once before shuffle can be used..

You figured it out - currently the shuffle applies after the album rolls over the first time. You raise a valid concern, though -- will look into shuffling on load, too.

1 Like