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.

    Third-Party Module - how to get help?

    Scheduled Pinned Locked Moved Solved Troubleshooting
    64 Posts 3 Posters 34.8k Views 4 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 @ember1205
      last edited by

      @ember1205 the pics above are without any mods… installed MM, install the module, linked to my server and started MM… they reach to the top of the window or the side (only a few), never both
      no border around. not used space is filled with the background color.

      if u accidentally zoomed in the browser using ctrl-+, it sadly remembers across instances

      ctrl-minus sign will zoom out again

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      E 1 Reply Last reply Reply Quote 0
      • E Offline
        ember1205 @sdetweil
        last edited by

        @sdetweil

        I’ll definitely give it a try. But… If it were a browser zoom issue, wouldn’t that prevent the other module from displaying them properly as well?

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

          @ember1205 yes…

          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
            last edited by sdetweil

            I just added a little bit of debug messaging…

            go to the MMM-ImagesPhotos folder, and do a git pull

            then edit the config and add
            debug:true,

            then restart MM

            using keyboard, hit ctrl-shift-i, a window will open on right side, select the tab labeled console, and type
            image into the field labeled filter…

            now u will see messages from the module as it loads images and gets the image actual size, and sets the location and dimension of the image to be displayed… like this sizes are width/height
            top is the top left corner (all locations are relative to the top left corner of the screen, 0,0 is the top left… so 0:72 is all the way left and 72 pixels down. (note its centered, so height+2*offset = max,.

            MMM-ImagesPhotos.js:237 image setting size to 3023:2015
            MMM-ImagesPhotos.js:238 image setting top to 0:72
            2015+72*2=2159 (of 2160) in this case

            MM-ImagesPhotos.js:222 image loaded=http://localhost:8080/MMM-ImagesPhotos/photo/DSC_0491.JPG size=4000:6000
            MMM-ImagesPhotos.js:237 image setting size to 1440:2160
            MMM-ImagesPhotos.js:238 image setting top to 791:0
            
            MMM-ImagesPhotos.js:222 image loaded=http://localhost:8080/MMM-ImagesPhotos/photo/PICT0097.JPG size=5472:3648
            MMM-ImagesPhotos.js:237 image setting size to 3023:2015
            MMM-ImagesPhotos.js:238 image setting top to 0:72
            
            MMM-ImagesPhotos.js:222 image loaded=http://localhost:8080/MMM-ImagesPhotos/photo/DSC_0027.JPG size=6000:4000
            MMM-ImagesPhotos.js:237 image setting size to 3023:2015
            MMM-ImagesPhotos.js:238 image setting top to 0:72
            
            MMM-ImagesPhotos.js:222 image loaded=http://localhost:8080/MMM-ImagesPhotos/photo/DSC_0476.JPG size=6000:4000
            MMM-ImagesPhotos.js:237 image setting size to 3023:2015
            MMM-ImagesPhotos.js:238 image setting top to 0:72
            
            MMM-ImagesPhotos.js:222 image loaded=http://localhost:8080/MMM-ImagesPhotos/photo/DSC_0042.JPG size=6000:4000
            MMM-ImagesPhotos.js:237 image setting size to 3023:2015
            MMM-ImagesPhotos.js:238 image setting top to 0:72
            
            MMM-ImagesPhotos.js:222 image loaded=http://localhost:8080/MMM-ImagesPhotos/photo/DSC_0198.JPG size=6000:4000
            MMM-ImagesPhotos.js:237 image setting size to 3023:2015
            MMM-ImagesPhotos.js:238 image setting top to 0:72
            
            MMM-ImagesPhotos.js:222 image loaded=http://localhost:8080/MMM-ImagesPhotos/photo/DSC_0720.JPG size=4496:3000
            MMM-ImagesPhotos.js:237 image setting size to 3023:2017
            MMM-ImagesPhotos.js:238 image setting top to 0:71
            
            MMM-ImagesPhotos.js:222 image loaded=http://localhost:8080/MMM-ImagesPhotos/photo/DSC_0697.JPG size=3000:4496
            MMM-ImagesPhotos.js:237 image setting size to 1441:2160
            MMM-ImagesPhotos.js:238 image setting top to 791:0
            
            MMM-ImagesPhotos.js:222 image loaded=http://localhost:8080/MMM-ImagesPhotos/photo/DSC_0319.JPG size=4000:6000
            MMM-ImagesPhotos.js:237 image setting size to 1440:2160
            MMM-ImagesPhotos.js:238 image setting top to 791:0
            

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            E 1 Reply Last reply Reply Quote 0
            • E Offline
              ember1205 @sdetweil
              last edited by

              @sdetweil

              “do a get pull”… To date, I’ve done little with repositories - can you elaborate on how I do this to make sure I do it correctly?

              Also… Some updates.

              1. CTRL - does not affect image size in any way. It DOES affect the sizing of the text for the other modules, though.

              2. I believe that I have determined that the desktop / browser “believes” that it is in portrait mode. The images seem to be getting constrained properly, but because the browser is configured to be as tall as it is, I’m losing all kinds of content off the bottom of the screen. If I do a CTRL-SHIFT-I and then turn on the device toolbar, I see a full vertical representation of the browser and I can see the entire image. As I increase the zoom, it becomes apparent where the image is getting clipped vertically.

              Thoughts?

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

                @ember1205
                do a get pull…

                No
                “do a git pull”

                Do

                cd ~/MagicMirror/modules/MMM-ImagesPhotos
                git pull
                

                That copies the latest from a remote repo and updates the local copy and working directory.

                I don’t understand how electron thinks it should be in portrait mode. Never seen that

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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

                  @sdetweil yeh, you should NOT zoom in

                  I wonder if this has anything to do with the fake kms driver?

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • E Offline
                    ember1205
                    last edited by

                    @sdetweil

                    git pull says everything up to date and didn’t do anything. No image size info available.

                    I tried reverting TO the fake driver as I was not using it (real one instead) and that hasn’t made any difference. I also tried editing the startup file to remove the rotate setting, also didn’t help.

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

                      @ember1205 did u install.my MMM-ImagesPhotos or the original?

                      I JUST updated mine before telling u, and I just checked the new code is there.

                      In the MMM-ImagePhotos folder do
                      git remote -v
                      Should point to sdetweil

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      E 1 Reply Last reply Reply Quote 0
                      • E Offline
                        ember1205 @sdetweil
                        last edited by

                        @sdetweil

                        I followed the directions on the page for your module:

                        Clone this repository inside your MagicMirror's modules folder
                        
                        cd ~/MagicMirror/modules
                        
                        git clone https://github.com/roramirez/MMM-ImagesPhotos.git.
                        

                        I saw the reference to roramirez, but as I said - I don’t do a lot with git, so I have to go with what’s on the page. Did that install the original?

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

                          @ember1205 yes, u installed the original… when one develops enhancements of a git project, you make a connected copy (fork), anything u change can be sent back to the author with a ‘pull request’. I didn’t change any of his install instructions.

                          when u are on a git project, there is a button, clone or download(the fork, not the original), u press that, and then click the little clipboard icon to copy the url for the git clone command

                          at any time, you can see where your instance is sourced from by doing

                          git remote -v
                          

                          in the module folder

                          so, I would rename the current folder out of the way (the original doesn’t work at all for me)

                          cd ~/MagicMirror/modules
                          mv MMM-ImagesPhotos MMM-ImagesPhotos.orig
                          git clone https://github.com/sdetweil/MMM-ImagesPhotos
                          

                          and then restart the mirror

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          E 1 Reply Last reply Reply Quote 0
                          • E Offline
                            ember1205 @sdetweil
                            last edited by

                            @sdetweil

                            Sigh. Best laid plans… lol

                            At any rate - I actually rm’ed the original dir and re-did the clone using YOUR version. Came right up and started working properly right out of the gate.

                            Thanks for not only all of the help, but all of the patience. I do learn quickly, and this should now remain fairly firmly entrenched in my brain going forward.

                            Now I’m off to see how to modify the CSS of MM to change some of the font aspects for text!

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

                              @ember1205 cool. thanks for the feedback… come on back when u need help, there are amazing talented folks who can help with just about everything!

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              1 Reply Last reply Reply Quote 0
                              • E Offline
                                ember1205
                                last edited by

                                I know this is marked ‘solved’, but I wanted to mention that A ) the module does still crash with “out of memory” errors and B ) a little bit of investigative tinkering makes me think that this all ties back to a garbage collection issue with Java.

                                If I change the timing of how often the images change, I can effectively ‘force’ or almost eliminate a crash. The shorter the duration between photos, the more likely a crash will occur. I changed the timing to 45 seconds and saw the setup run reliably from power on at 7AM until power off at 11PM for multiple days in a row.

                                Shortening the window down to 5 seconds between images will cause the system to crash typically within about 10-15 minutes at a maximum.

                                At no time do I actively witness memory levels dropping down to zero, but that could just be “bad luck” in not seeing the issue arise when it errors out. Is there an easy way on the Pi to track a process and watch for a specific, correlating event when something crashes?

                                S 1 Reply Last reply Reply Quote 0
                                • E Offline
                                  ember1205
                                  last edited by

                                  Also - I caught this error with your debug output:

                                  Failed to load resource: the server responded with a status of 404 (Not Found) :8080/MMM-ImagesPhotos/photos:1 
                                  

                                  That’s at the beginning of the console output along with another error I have seen later in the console:

                                  MMM-ImagesPhotos Could not load photos
                                  photosrequest.onreadystatechange @ :8080/modules/MMM-ImagesPhotos/MMM-ImagesPhotos.js:65
                                  

                                  Any thoughts on those?

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

                                    @ember1205 i am not aware of any debugging tools or strategy that can get to the type of issue being encountered. I have been chasing these for the last 4 years…

                                    i also think the error reported is bogus, caused by the mishandling of some other error.

                                    the ‘problem’ is that the browser thinks IT is in control of the content update cycle, but with all these modules running separate timer event handlers, it is not.

                                    I have debugged a lot of ‘electron is single threaded’ problems down to , ‘you might THINK its single threaded, but it is NOT’… when the timer fires, SOMETHING is getting interrupted… in gosh knows what state…

                                    one way you might prove this, is to turn off every other module, so only ONE does any content updating (it is a web page after all)

                                    One of my modules has 2-10 images loaded over the top of the web page, on independent timing cycles. i traced failures to attempting to load an image, while an image load was already in progress. I added code to my module to prevent this behavior, and my failures went away.

                                    I added a background image thing, and they returned when my module is running…
                                    they are both loading images at the same time sometimes… and electron crashes… in various ways.

                                    I have been trying (last 6 months) to find a mechanism to serialize this across multiple modules, without changing the modules, but have failed so far.

                                    we are also running on an age old electron (3.x), which the most recent version that will run for MM is 6.x) (7.x will not run)

                                    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 @ember1205
                                      last edited by

                                      @ember1205 said in Third-Party Module - how to get help?:

                                      :8080/MMM-ImagesPhotos/photos:1

                                      yeh, the code attempts to load the folder… once… I haven’t debugged it cause it doesn’t matter

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

                                      E 1 Reply Last reply Reply Quote 0
                                      • E Offline
                                        ember1205 @sdetweil
                                        last edited by

                                        @sdetweil said in Third-Party Module - how to get help?:

                                        @ember1205 said in Third-Party Module - how to get help?:

                                        :8080/MMM-ImagesPhotos/photos:1

                                        yeh, the code attempts to load the folder… once… I haven’t debugged it cause it doesn’t matter

                                        Thanks.

                                        What about second error I mentioned? Or, is that essentially part of the overall error?

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

                                          @ember1205 part of the same… looking at it now

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

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

                                            @ember1205

                                            ok, fixed the error message… a startup timing error…

                                            module tried to get images from node_helper, before node_helper had established the linkage…
                                            (if u are using my repo)
                                            go to your MMM-ImagesPhotos folder and do

                                            git pull

                                            then restart mirror app

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 2 / 4
                                            • 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