MagicMirror² v2.5.0 is available! For more information about this release, check out this topic.

MMM-EARTH - config options



  • Hi @Mykle1

    Would it be possible to elaborate a bit more on some options ?

    updateInterval: is this the interval after which the latest picture from DSCOVR is being fetched ?

    rotateInterval: it says “The time between each new image.”, but that does not match with updateInterval.
    I get 48 new pictures a day, but rotate every 15 seconds.
    In the pix directory there is currently 1 gif. Does it rotate through the pictures in this directory ?

    Natural, Enhanced, Lunar, naturalThumb, enhancedThumb.

    Is there a short explanation on those mode values ?

    Many thanks in advance and thanks for this great module.


  • Module Developer

    @evroom said in MMM-EARTH - config options:

    Would it be possible to elaborate a bit more on some options ?

    You mean other than what is described in the README?

    updateInterval is how often the module requests data from the API. See README

    rotateInterval is the length of time each of the retrieved images is displayed. See README

    You can change the rotateInterval but you can not raise the UpdateInterval. See README.

    The gif in the pix directory is only for use by the README.

    Natural, Enhanced, Lunar, naturalThumb, enhancedThumb are the style of the images you are requesting.



  • Yes, I mean the README; to be exact the README.md.

    updateInterval	30*60*1000	Every 30 minutes = 48. DO NOT exceed 50 per day.
    animationSpeed	3000	The speed at which each new image fades in and out.
    rotateInterval	15000	The time between each new image. (Rotation)
    

    With 15000 msec, 15 sec, I am rotating the same picture for 30 minutes, until a new picture is fetched through the api.
    And then I am rotating that picture again for 30 minutes.
    In that case it makes more sense to set the rotateInterval to 30 minutes too.
    Unless I am missing something.
    „each of the retrieved images“ would refer to rotate through all saved images, but if no images are being saved …
    Again, I am probably missing something and I am only asking because I really like the module.
    Perhaps the clue is, that the api delivers multiple pictures that are then being rotated, and that I am not aware of that.


  • Module Developer

    @evroom said in MMM-EARTH - config options:

    Perhaps the clue is, that the api delivers multiple pictures that are then being rotated, and that I am not aware of that.

    Bingo!

    Usually, there are 12 images retrieved but those 12 don’t change very often. The rotateInterval is a personal preference, displaying each of the 12 in sequence. You should see the earth rotating upon each rotateInterval time span. I have mine set to 1000ms with no animation and get a beautiful, flawless spinning earth that way.

    I am glad you like the module. It’s still one of my personal favorites. 🙂



  • @Mykle1

    Thanks for eyplaining, it is clear now.
    I only do not get it to work a flawless spinning with rotateInterval: 1000 and animationSpeed: 0.
    Rather jerky, but that maybe due to other factors.

        config: {
          mode: "Enhanced", // Natural, Enhanced, Lunar, naturalThumb, enhancedThumb.
          useHeader: false,
          header: "NASA DSCOVR Satellite",
          updateInterval: 30*60*1000,
          rotateInterval: 1000*1,
          animationSpeed: 0,
          MaxWidth: "60%",
          MaxHeight: "60%",
        }
    

    But I am okay with rotateInterval: 10000 and animationSpeed: 2000 and will play some more with the settings.


  • Module Developer

    @evroom

    Let me guess. You’re using a Pi. Those settings won’t work on a Pi. It simply cannot handle the animation. I don’t use Pi’s anymore, preferring laptop boards.



  • You are not allowed to guess anymore 🙂
    Yes, I use a PI, I think most people use a PI to start with and then things get out of control (MagicModuleVirus).
    What starts with 4 MM modules, ends up with juggling a whole bunch of modules on a ‘tiny’ monitor (for me a 900x1600 resolution).


  • Module Developer

    @evroom

    Exactly. However, in my case, with a laptop board i can have just about as many modules as I like loaded, using pages of modules to display via voice command. Those not displayed at the moment are suspended and I never run out of room. I just set up new pages.


  • Module Developer

    @mykle1

    I am needing some assistance with setting up pages… cant seem to figure out what I’m doing wrong, keeps showing all the modules on the main page and it doesn’t change when I change the pages… maybe you could point me in the right direction???


  • Module Developer

    @justjim1220

    Are you referring to Hello-Lucy pages? If so, then this comes directly from the Hello_Lucy README.

    How to add Pages of modules

    At about line 443 in the new node helper of MMM-voice you’ll see this:

    /////////  Pages commands @ Mykle ///////////////////////////		
    		else if (/(SHOW)/g.test(data) && /(PAGE)/g.test(data) && /(ONE)/g.test(data)) {
                this.sendSocketNotification('SHOW_PAGE_ONE');
            } else if (/(HIDE)/g.test(data) && /(PAGE)/g.test(data) && /(ONE)/g.test(data)) {
                this.sendSocketNotification('HIDE_PAGE_ONE');
            }
    

    You have to add one of these for every page your create. Change the page numbers!

    At about line 116 in the new MMM-voice.js file you’ll need to add your sentence. In this case:

    'HIDE PAGE ONE',
    'SHOW PAGE ONE',
    

    Still in the new MMM-voice.js file at about line 370 you’ll need to add your set of modules for the page you just created. In this case, it looks like this:

    		 else if (notification === 'SHOW_PAGE_ONE') {
    			 this.sendNotification('HIDE_LUCY');
    			 this.sendNotification('SHOW_LOTTERY');
    			 this.sendNotification('SHOW_CLOCK');
    			 this.sendNotification('SHOW_EARTH');
    			 this.sendNotification('SHOW_LICE');
    			 this.sendNotification('SHOW_COWBOY');
    			 this.sendNotification('SHOW_TIDES');
    			 this.sendNotification('SHOW_VOICE');
    			 
    		 } else if (notification === 'HIDE_PAGE_ONE') {
    			 this.sendNotification('HIDE_LOTTERY');
    			 this.sendNotification('HIDE_CLOCK');
    			 this.sendNotification('HIDE_EARTH');
    			 this.sendNotification('HIDE_LICE');
    			 this.sendNotification('HIDE_COWBOY');
    			 this.sendNotification('HIDE_TIDES');
    			 this.sendNotification('HIDE_VOICE');
    			 
    		 }