-
Notifications
You must be signed in to change notification settings - Fork 64
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
Problem with longer updateInterval #126
Comments
1000 * 60 is more readable as 60 secs than 60000. I doubt your scanInterval is shorter than updateInterval. when a new scan is performed, your photo list would be renewed. That makes your current photos being invalid. One more reason; the life of a photo might be at longest 1 hour (not sure exactly)after its scan because Google doesn't want long lives of external usage of photos. So your next photo after 1 hour might be dead. I'm not sure what exact reason at this moment, but my guess. |
I didn't expect 30 to 60 min refresh times, so this is new. The module sends 20 minutes worth of pictures to the front end at a time. Since they are only good for 60 min, this makes sure the links are always 'fresh' and leaves enough room to keep working even something fails. I suspect the issue is either:
to:
If both these don't help and you'd like to debug further, please add "debug: true," to your config and lets see what the logs say. |
Thanks for the help. To answer your other questions: I have 270 photos showing randomly. I haven't done anything to alter In case there was a 60 min hard limit from the Google API end, I decided to set I can live with the 58/59 if going over 60 creates a lot of extra work. This is a Christmas gift for my mom, so after Monday my access for running further tests will be significantly reduced. PS - Just FYI, the reason I prefer longer interval times is because I find a picture changing every minute (or even 15 minutes) is kind of distracting. A longer interval time allows you to still display changing photos, but have it become part of the background of the room. For my personal MM (which just uses https://github.com/darickc/MMM-BackgroundSlideshow, I actually have an interval of 6 hrs. |
Here's the output from the terminal, from when I started the MM to when it starts to go crazy. I scrubbed the "googleusercontent" addresses because I was concerned that the long random text string might be a token of some sort, but let me know if you need them. Thanks!
|
Excellent. Scrubbing the long string was fine. For documentation sake, a description of what's happening. The front end gets a list of pictures from the backend. Whenever it gets a new payload, it immediately displays the latest. When it displays the last picture in the list, it requests more pictures. Or if there is an error with a picture(like the 1 hour link expired), it also requests more pictures. The backend sends 20 minutes worth of pictures to each request. In this case, when there is only 1 picture being sent at a time, it immediately displays, but its also the last(only) one in the list, so immediately requests more pictures and the cycle repeats. This isn't an issue at the beginning, because if there is a cache saved, it sends 5 pictures at startup to make startup extra fast. When these 5 are 'used up' or after an hour when they start to expire, it gets into the described loop. I don't plan to make changes to the code because I don't have a way to test it at the moment. Here is what I would recommend: make it so the minimum pictures sent is at least 2. this can be done by 2 ways:
|
Thanks for providing the two workarounds. I tried the code in (2.) and it seems to work fine. In case anyone else wants to use it, I've added in the line breaks that seem to have gotten removed:
Just FYI, when I run now, my logs show a "Client network socket disconnected..." error followed by an "UnhandledPromiseRejectionWarning..." error (lines 57 to 66), but maybe that's not significant as things seem to be working fine otherwise.
Also, just for documentation sake, can either the workarounds you mention above be used to set an updateInterval that is longer than 60 min, or is this a hard limit because of the Google API? Regardless, thanks again for the helpful module! |
If I try to set
updateInterval
to something long like 30 or 60 minutes, the MM show the first photo for the set time and then starts rapidly scrolling through my photos (changing like every 10 sec) until I quit the MM and restart. However, everything works fine if I set a lower interval like 5 minutes.PS - Is there a technical reason
updateInterval
is written like1000 * 60
(as opposed to 60000) in the config or is it just stylistic?The text was updated successfully, but these errors were encountered: