• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Multiple instances of ImagesPhotos module

Scheduled Pinned Locked Moved Solved Troubleshooting
20 Posts 2 Posters 8.3k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Away
    sdetweil @Nneuland
    last edited by Dec 14, 2023, 3:10 AM

    @Nneuland you ARE using my fork , right?

    https://github.com/sdetweil/MMM-ImagesPhotos

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    1 Reply Last reply Reply Quote 0
    • N Offline
      Nneuland @sdetweil
      last edited by Dec 14, 2023, 6:52 PM

      @sdetweil

      Thank you! I hit a large wall last night and needed to stop.
      I’m back up and running, but still need to reinitiate my auto restart and get back to the task at hand of duplicating two separate ImagesPhotos modules.

      My attempt at duplicating an additional MMM-ImagesPhotos module has still fallen short. I enjoy using the MMM-RemoteControl to customize the mirror real time. Which included the idea of running two identical MMM-ImagesPhotos modules (different names) to be in the exact same space on the mirror, but only one at a time. One url set showing family photos and the other showing my son’s favorite cartoons.
      So having two different running modules (MMM-ImagesPhotos, and MMM-ImagesPhotos2, on MMM-RemoteControl is ideal for my purposes.

      I’ll need some fresh eyes on it tonight. I figured since they were referencing different uploads folders from two different module folders, this wouldn’t be a problem.

      Unfortunately adding the path to my config file did not allow for the module to run.
      I’ll need to keep at it

      S 1 Reply Last reply Dec 14, 2023, 7:07 PM Reply Quote 0
      • S Away
        sdetweil @Nneuland
        last edited by sdetweil Dec 14, 2023, 7:09 PM Dec 14, 2023, 7:07 PM

        @Nneuland remove the old separates and copied code, only confuses things.

        use my new forked code only

        the module looks for images in the uploads folder inside the module folder

        you can ADD to that with path (not my design)

        so some pics are in uploads/foo and some are in uploads/bar

        each module config needs that path:“foo”, or path:“bar”

        else it looks in uploads and with my recursive support will get everything .

        the new fork code adds the module identifier to the url paths to make things unique.

        took a bit to make all that work tho. mostly in the node helper, as it has to service all the instances at once

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        N 2 Replies Last reply Dec 14, 2023, 7:15 PM Reply Quote 0
        • N Offline
          Nneuland @sdetweil
          last edited by Dec 14, 2023, 7:15 PM

          @sdetweil

          Thank you. I’m hoping to look at this tonight

          1 Reply Last reply Reply Quote 1
          • N Offline
            Nneuland @sdetweil
            last edited by Dec 17, 2023, 1:59 AM

            @sdetweil

            Finally got it up and running. Thank you for your patience.
            The only thing, because I’m running two instances, the positioning and photo size is quite off. MaxHeight and MaxWidth in config doesn’t seem to be influencing any and the custom css modifications also are not working as expected. Looking to keep the same posting for both url sets

            S 1 Reply Last reply Dec 17, 2023, 2:03 AM Reply Quote 0
            • S Away
              sdetweil @Nneuland
              last edited by Dec 17, 2023, 2:03 AM

              @Nneuland yes, I said maybe the sizing was wrong. I’ll look at it.in the morning.

              I added some special code to fix the sizes so that they kept the original aspect ratio, but never tried in non full screen. I’ll see if I can turn that off easily.

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              N S 2 Replies Last reply Dec 17, 2023, 2:06 AM Reply Quote 0
              • N Offline
                Nneuland @sdetweil
                last edited by Dec 17, 2023, 2:06 AM

                @sdetweil

                you did. Maybe I can simply rescale my images, but if you have a work around that would be great. Just curious if it were my ignorance, or something else.

                S 1 Reply Last reply Dec 17, 2023, 2:41 AM Reply Quote 0
                • S Away
                  sdetweil @Nneuland
                  last edited by Dec 17, 2023, 2:41 AM

                  @Nneuland all my fault

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • S Away
                    sdetweil @sdetweil
                    last edited by sdetweil Dec 18, 2023, 11:08 PM Dec 17, 2023, 6:20 PM

                    @Nneuland ok, update

                    git pull in the module folder

                    make sure to set the maxHeight and width in the config

                    {
                          {
                                    module: "MMM-ImagesPhotos",
                                    disabled: false,
                                    position:"top_left",
                                    config: {
                                      backgroundColor: "grey",
                                      fill: true,
                                      blur: 10,
                                      sequential: true,
                                      path:"foo",
                                      debug:true,
                                      maxWidth:"50%",
                                      maxHeight:"50%"
                                    },
                                    order: "*",
                                    bad_position: "fullscreen"
                                  },
                                  {
                                    module: "MMM-ImagesPhotos",
                                    disabled: false,
                                    position:"top_right",
                                    config: {
                                      backgroundColor: "blue",
                                      fill: true,
                                      blur: 10,
                                      sequential: true,
                                      path:"test1",
                                      debug:true,
                                      maxWidth:"500px",
                                      maxHeight:"500px"
                                    },
                                    order: "*",
                                    bad_position: "fullscreen"
                                  },
                    

                    note 50% vs 500px produces different sizes

                    Screenshot at 2023-12-17 12-18-52.jpg

                    there are two different image css classes… one when full screen, one not

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    N 1 Reply Last reply Dec 19, 2023, 1:21 PM Reply Quote 0
                    • N Offline
                      Nneuland @sdetweil
                      last edited by Dec 19, 2023, 1:21 PM

                      @sdetweil
                      This is amazing! Thank you for all of your hard work. Works perfectly

                      1 Reply Last reply Reply Quote 1
                      • 1
                      • 2
                      • 2 / 2
                      2 / 2
                      • First post
                        14/20
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy