darickc / MMM-BackgroundSlideshow

MIT License
147 stars 84 forks source link

New feature idea // Play - Pause rotation upon notification #28

Open bolish opened 5 years ago

bolish commented 5 years ago

Hi!

Thanks for the module. I'm experiencing some laggin issues for now but I need to check from where it's coming on my side before digging in.

This ticket because I would love an module update that would support Play / Pause option of the rotation upon notification.

If you have any time for a future update, would be perfect!

Thanks already for your time, and thanks again for the module.

gpetersen commented 5 years ago

I've been working on a fork to do something similar. E.g. right now the code will also refresh any time the module's .resume function is called, which means for modules like MMM-Carousel, the image changes every time the slide changes. I've submitted a change to fix that behavior. Wouldn't be too difficult to incorporate this as well. What would you like the notifications to look like? Something like: BACKGROUNDSLIDESHOW_PAUSE BACKGROUNDSLIDESHOW_PLAY

Any need to change the slideshow timer interval?

bolish commented 5 years ago

@gpetersen Hi,

Implementation of BACKGROUNDSLIDESHOW_PAUSE (stop refresh / rotation) BACKGROUNDSLIDESHOW_PLAY (resume) BACKGROUNDSLIDESHOW_PRV (go to next image) BACKGROUNDSLIDESHOW_NXT (got to previous image) BACKGROUNDSLIDESHOW_SHOW EXIF (I just noticed your other module called "Exif", should be great to have both integrated)

Would be perfect indeed. (I will look at your fork for my information)

Having an option to change the timer interval within config.js would beperfect also!

By the way, do you experience some issues with lagging or timer stability ? In some case, 4 or 5 different images are displayed wihtin 10seconds, sometimes one image during 30s, Strange...

gpetersen commented 5 years ago

@bolish

Play, Pause, Next should be easy and I'll post an update after I finish working on EXIF. So far it's working and I'm pretty happy with it. PREV is harder since they're random and it's not yet retaining history so far as I can tell, not impossible, but would take some thought.

To answer your original question: I used to have the timer issues until I moved the refresh outside of the .resume function. I haven't seen problems since.

bolish commented 5 years ago

@gpetersen Ok. Play / pause is.priority for me. Previous could be cherry on the cake. I will try your fork to check timer improvement! (FYI my picture library is an remote NFS folder, maybe it can explain the lagging issue). Keep me posted for the updates!!

gpetersen commented 5 years ago

@bolish My changes are posted, I also found the bug in the timer/multiple refresh issues. The problem was there were some conditions where there were multiple timers running, and this could create the situation where the images changed quickly. While implementing the Play/Pause/Next I fixed that. Tested so far on my end.

There's two modules. I haven't actually run it on Linux yet, just on my setup that runs on Windows, so there may be some issues. https://github.com/gpetersen/MMM-BackgroundSlideshow is my fork of the BackgroundSlideshow with the new functionality, and in addition it will also send a notification when the image is updated to allow my second module: https://github.com/gpetersen/MMM-BackgroundSlideshowInfo to know the image has changed and to get the image metadata and show it.

Please test them out and submit any bugs over there. If they work well I'll request a Pull from @darickc .

bolish commented 5 years ago

@gpetersen Everthing seems to work perfectly on my side. Notifications (Next, Play, Pause) works well. Seems the timer issue is definetly solved. What to say?? Works life a charm, thank you very much. Let's get that PR into the original branch so that everybody can enjoy your work!!

darickc commented 5 years ago

Thanks for working on this. I have seen the timer issue also, glad you got it fixed. I'm also glad that others have found this module useful.

gpetersen commented 5 years ago

No problem. This module fit 80% of what I needed for my "MagicPictureFrame", but wanted a couple more features on top, a good learning exercise. Will look into other options like "PREV" in the future, but wanted to get the easy ones out sooner than later.

bolish commented 5 years ago

@gpetersen @darickc Sorry to bother again guys. Is it normal that the module is not able to pick into subfolders?

I'm targeting the module to folder A which does only contain subfolders. Pictures are in those subfolders. When I do that, module is not showing any picture.

I can only get it do work when pictures are at folder A root.

Strange or normal?

recursiveSubDirectories: true,......

Sorry guys...

gpetersen commented 5 years ago

recursiveSubDirectories: true, Should be all you need.. I have some pretty deep subdirectory trees and it works well on my system, definitely not normal.

Is the recursiveSubDirectories within the “config” section of your module config? Right next to the imagePaths:

bolish commented 5 years ago

don't know what happened...I tried several time again, and worked each time... Anyway, one more thanks for the module, it rocks.

bolish commented 5 years ago

Guys, I have a new feature idea... Maybe @gpetersen is already managing that as your project is a picture frame... How do you manage pictures which are not in the right format (let's say your screen is portrait, and the image to display landscape)? I believe you're using "contain" instead of "cover".

What do you think about a third mode which could be ':

ie : screen is portrait. picture is landscape. Setting is "cover". The image height = screen height but the movement (starting from left edge) will slowly bring the picture to the right side edge.

gpetersen commented 5 years ago

Good question, my screen is landscape, but you could have the same problem either way. I think for now it meets my needs, but may look into a more dynamic slideshow/collage at some point in the future.

sony8943 commented 4 years ago

Hello Darik I have PIR sensor and it's working great with my magic mirror it's open the HDMI screen but this is not the issue that the problem is I want when it's open the screen HDMI to start to play the picture then when the screen it's off to put in in pause mode. Another one question if you have from the keyboard to press to put the play mode and the pause mode. Thank you