• 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.

Third-Party Module - how to get help?

Scheduled Pinned Locked Moved Solved Troubleshooting
64 Posts 3 Posters 24.5k 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.
  • E Offline
    ember1205
    last edited by Dec 11, 2019, 11:26 PM

    I’ve been working on setting up the MMM-BackgroundSlideshow module up and running, but am having issues.

    I have about a dozen photos that I shot with a 24MP DSLR, edited, and exported as JPG. They are anywhere from about 4MB to about 9MB in size. I’ve copied these into a folder on the Pi and was able to get the module to begin showing them. Then, it would randomly die with an “out of memory” error (from the error log) and the whole screen would go black. Restarting MM would fix it temporarily.

    I commented that section of the config out to make some updates to the calendar section. Once done tinkering there, I tried re-enabling the background image stuff and I get zip. No errors, no pictures, nothing.

    So, my question is how to go about getting help from the author of the third-party module? How do I determine any details about where the module is dying out and not even loading?

    S 2 Replies Last reply Dec 12, 2019, 12:31 AM Reply Quote 0
    • S Offline
      sdetweil @ember1205
      last edited by Dec 13, 2019, 3:18 AM

      @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 Dec 13, 2019, 12:51 PM Reply Quote 0
      • S Offline
        sdetweil @ember1205
        last edited by Dec 12, 2019, 12:31 AM

        @ember1205 open the developers window on the pi, using ctrl-shift-i on the keyboard.
        select the tab labeled console, and scroll up to see any errors, usually read text…

        you can also filter messages by module with some part of the name in the filter field.
        like ‘back’ (no quotes)…

        let us know what you find.

        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 Dec 12, 2019, 12:33 AM

          @ember1205 as for getting support for any module, you can open an issue on its github repository.
          there is NO commitment from any author to respond or fix any issue reported…

          the base also includes this statement,

          this is an opensource project, all volunteer. many times if u want a fix, you may have to develop it yourself and submit it back to the module author, and hope they take it,

          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 Dec 12, 2019, 3:24 AM

            This line just keeps repeating:

            MMM-BackgroundSlideshow received a system notification: CLOCK_SECOND
            

            The only red text is for an error with the weather module then it states that it’s changing to a different forecast.

            1 Reply Last reply Reply Quote 0
            • E Offline
              ember1205
              last edited by Dec 12, 2019, 2:16 PM

              I thought I would follow this up as I have found and solved this specific issue.

              Long story short, this particular module has a pre-defined list of file extensions that it will recognize as images. For some reason, I pulled a copy of image files from two different locations and the extension changed from JPG to JPEG. The former is default, the latter is not. I updated the module configuration and it started working again.

              I also discovered that the module is running out of memory while running. The error seems to be very consistent although the image in place when it crashes is not. I’ve posted an issue to the module owner’s repository to see what help that might bring.

              S 1 Reply Last reply Dec 12, 2019, 3:01 PM Reply Quote 0
              • S Offline
                sdetweil @ember1205
                last edited by Dec 12, 2019, 3:01 PM

                @ember1205 you could try to force electron not to cache images

                edit the js/electron.js file and add this line

                	app.commandLine.appendSwitch('disable-http-cache');
                
                function createWindow() {
                	app.commandLine.appendSwitch("autoplay-policy", "no-user-gesture-required");
                ----> here 
                

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                E 1 Reply Last reply Dec 12, 2019, 3:45 PM Reply Quote 0
                • E Offline
                  ember1205 @sdetweil
                  last edited by Dec 12, 2019, 3:45 PM

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

                  app.commandLine.appendSwitch(‘disable-http-cache’);

                  Thanks. I have made the change and restarted the mirror.

                  I’m running with only this module and the clock enabled and am finding that having the image caching disabled (so far) is significantly slowing down the rendering of the images on screen.

                  Is there a way to set the node.js maximum memory or set a limit on cache size? I have found some commentary that seems to say that node.js will use up to 1.7G of RAM by default and have no idea if there is anything in any of these configuration files that would lower that limit using the settings:

                  --max-old-space-size={limit in KB} --optimize-for-size --max-executable-size={limit in KB}
                  

                  Given that my system is 1GB of RAM, and the default for node.js is to use up to 1.7GB, I could see where it could conceivably be trying to use memory beyond the bounds of the system, especially if there were some sort of issue with the underlying OS and its interaction with node.js to control the memory usage.

                  S 1 Reply Last reply Dec 12, 2019, 3:54 PM Reply Quote 0
                  • S Offline
                    sdetweil @ember1205
                    last edited by sdetweil Dec 12, 2019, 3:58 PM Dec 12, 2019, 3:54 PM

                    @ember1205 you should increase the swap space .

                    https://wpitchoune.net/tricks/raspberry_pi3_increase_swap_size.html

                    yes, lack of cache will slow down rendering.
                    I added javascript code to the other module to wait til the image was loaded before showing,
                    made a huge improvement, no lag rendering

                    you could try it
                    https://github.com/sdetweil/MMM-ImagesPhotos
                    git clone that and then use this in config

                    		{
                    			module: "MMM-ImagesPhotos",
                    			position: "fullscreen",
                    			config: {
                    				opacity: 0.9, 
                    				animationSpeed: 0,
                    				updateInterval: 30000,  // how often to change pic
                    				backgroundColor: "#808080", // color around pic (if u want something other than black)
                    			},
                    		},		
                    

                    u have to put images in the uploads folder,
                    or make a link (ln command) for the uploads folder where the pics are (I use my linux server, external usb drive)

                    cd ~/MagicMirror/modules/MMM-ImagesPhotos
                    ls -laF
                    lrwxrwxrwx   1 sam sam    45 Dec 12 08:53 uploads -> /media/buildserver/media/Photos/selectedpics//
                    

                    add

                    disabled: true, 
                    

                    the the existing module definition (after the name)
                    to turn it off, without changing anything

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    E 1 Reply Last reply Dec 12, 2019, 4:22 PM Reply Quote 0
                    • S Offline
                      sdetweil
                      last edited by Dec 12, 2019, 4:02 PM

                      the command

                      free -m
                      

                      will show u memory usage

                      nano 
                      sam@nano:~/MagicMirror$ free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:           3956        2097         359         559        1499        1149
                      Swap:          1978         460        1517
                      
                      pi4 -4gig, default swap space
                      free -m
                                    total        used        free      shared  buff/cache   available
                      Mem:           3906         650        2053         447        1201        2656
                      Swap:            99           3          96
                      

                      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 @sdetweil
                        last edited by Dec 12, 2019, 4:22 PM

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

                        https://wpitchoune.net/tricks/raspberry_pi3_increase_swap_size.html

                        I will give this a shot. Given that each time the slideshow has died, it has indicated that it ran out of memory at roughly 100Mb (and the default swap is 100Mb), this could definitely be related. I’ll try doubling it to see what happens with this module.

                        I was going to try tackling the transitioning to prevent changing to the new image until it was rendered (to prevent the “painting”), but need the memory issue fixed first. :)

                        Does your image module contain the JS code you were referring to that hides the image until it’s rendered?

                        S 1 Reply Last reply Dec 12, 2019, 4:29 PM Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 6
                        • 7
                        • 1 / 7
                        1 / 7
                        • First post
                          1/64
                          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