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 11.6k 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 Offline
      sdetweil @Nneuland
      last edited by sdetweil

      @Nneuland I would do that, yes

      doesn’t matter, as long as both url strings are different. I would add a 2 on the end of both, in all the places

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      N 1 Reply Last reply Reply Quote 0
      • N Offline
        Nneuland @sdetweil
        last edited by

        @sdetweil

        Seemed simple enough, but leave it to me. No visuals for this duplicated module.

        css folder renamed- but empty
        node-helper.js and MMM-ImagesPhotos.js folders renamed as well as every instance of ImagesPhotos(2) renamed

        Where can I look to troubleshoot?

        S 2 Replies Last reply Reply Quote 0
        • S Offline
          sdetweil @Nneuland
          last edited by

          @Nneuland I fixed the code so it can do multiple instances…

          make sure to set the path: variable to the subset of pics in the uploads folder
          if path is not set then uploads is the folder

          oh, and I added recursive folder support a few weeks ago

          the image drawing may be mangled I had two side by side… top_left/right, filled the screen

          my config

          {
                  module: "MMM-ImagesPhotos",
                  disabled: false,
                  position:"top_left",
                  config: {
                    backgroundColor: "grey",
                    fill: true,
                    blur: 10,
                    sequential: true,
                    path:"foo",   // uploads/foo
           //         debug:true
                  },
                },
                {
                  module: "MMM-ImagesPhotos",
                  disabled: false,
                  position:"top_right",
                  config: {
                    backgroundColor: "blue",
                    fill: true,
                    blur: 10,
                    sequential: true,
                    path:"test1",   // uploads/test1
          //          debug:true
                  },
                },
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @Nneuland
            last edited by

            @Nneuland you didn’t do npm install in the module folder

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            N 1 Reply Last reply Reply Quote 0
            • N Offline
              Nneuland @sdetweil
              last edited by

              @sdetweil

              I don’t know what I did, but I lost my auto restart. Seem to have MagicMirror AND mm running (twice) somehow. My vnc isnt showing what the mirror is showing, MMM-RemoteControl on my phone lost my second instance of ImagesPhotos (which I couldnt get working anyway)…

              I think I need a break for the night and possibly a fresh install in the near future, I don’t know how you do this

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @Nneuland
                last edited by sdetweil

                @Nneuland

                MagicMirror crashed cause this module was missing a library . that’s why you don’t see anything and can’t connect

                do this

                cd ~/MagicMirror/modules/MMM-InagesPhotos
                npm install
                cd ~
                pm2 stop all
                cd ~/MagicMirror
                npm start
                

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                N 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @Nneuland
                  last edited by

                  @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

                    @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 Reply Quote 0
                    • S Offline
                      sdetweil @Nneuland
                      last edited by sdetweil

                      @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 Reply Quote 0
                      • N Offline
                        Nneuland @sdetweil
                        last edited by

                        @sdetweil

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

                        1 Reply Last reply Reply Quote 1
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          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