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

MMM-WeatherOrNot

Scheduled Pinned Locked Moved System
21 Posts 3 Posters 2.5k Views 3 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.
  • J Offline
    Jarhead96097
    last edited by Jun 17, 2020, 10:13 PM

    Hi all - I’ve updated my MM to use the responsive layout and animated icons available in MMM-WeatherOrNot. I love it and it looks great! However, as I’m displaying three locations, it seems as though only the last location (listed in config.js) is receiving updates throughout the day. I end up having to stop MM and restart it (pm2 restart MagicMirror --update-env) to get current information for the first two locations. Any ideas to help me troubleshoot?

    Thanks in advance!

    /* Magic Mirror Config Sample
     *
     * By Michael Teeuw http://michaelteeuw.nl
     * MIT Licensed.
     *
     * For more information on how you can configure this file
     * See https://github.com/MichMich/MagicMirror#configuration
     *
     */
    
    var config = {
    	address: "localhost", // Address to listen on, can be:
    	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
    	                      // - another specific IPv4/6 to listen on a specific interface
    	                      // - "0.0.0.0", "::" to listen on any interface
    	                      // Default, when address config is left out or empty, is "localhost"
    	port: 8080,
    	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
    	                                                       // or add a specific IPv4 of 192.168.1.5 :
    	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
    	                                                       // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
    	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
    
    	useHttps: false, 		// Support HTTPS or not, default "false" will use HTTP
    	httpsPrivateKey: "", 	// HTTPS private key path, only require when useHttps is true
    	httpsCertificate: "", 	// HTTPS Certificate path, only require when useHttps is true
    
    	language: "en",
    	timeFormat: 24,
    	units: "imperial",
    	// serverOnly:  true/false/"local" ,
    			     // local for armv6l processors, default
    			     // starts serveronly and then starts chrome browser
    			     // false, default for all  NON-armv6l devices
    			     // true, force serveronly mode, because you want to.. no UI on this device
    
    	modules: [
    		{
    			disabled: false,
    			module: "alert",
    		},
    		{
    			disabled: false,
    			module: "updatenotification",
    			position: "top_bar"
    		},
    		{
    			disabled: false,
    			module: "MMM-ModuleScheduler",
    			config: {
    				// Sets the schedule for the display
    				// Displays 100% bright between 0630 and 2100
    				// All "daytime_scheduler" modules go to 0% brightness between 2100 and 0630
    				global_schedule: [
    					{from: "00 6 * * *", to: "30 21 * * *", groupClass: "daytime_scheduler"},
    				]
    			}
    		},
    		{
    			disabled: false,
    			module: "MMM-Globe",
    			position: "top_bar",
    			classes: "daytime_scheduler",
    			config: {
    				style: "geoColor",	// options: "natColor", "geoColor", "airMass", "fullBand", "europeDiscNat", "europeDiscSnow", "centralAmericaDiscNat"
    				imageSize: "400",
    				updateInterval: 10 * 60 * 1000, // every ten minutes
    			}
    		},
    		{
    			disabled: false,
    			module: "clock",
    			position: "top_left",
    			classes: "scheduler",
    			config: {
    				lat: "XX.xxxxxxx",
    				long: "-XXX.xxxxxxxx",
    				clockBold: false,
    				dateFormat: "dddd, MMM D, YYYY",
    				showWeek: true,
    				showSunTimes: true,
    				showMoonTimes: true,
    				timezone: "America/Los_Angeles",
    				module_schedule: {from: "30 21 * * *", to: "30 6 * * *", dimLevel: "100"}
    			}
    		},
    		{
    			disabled: true,
    			module: "MMM-NHL",
    			position: "top_left",
    			classes: "daytime_scheduler",
    			config: {
    				colored: "true",
    				focus_on: ["BOS", "MTL", "CHI", "TOR"],
    				matches: "6",
    			}
    		},
    		{
    			disabled: false,
    			module: "MMM-Pollen",
    			position: "top_left",
    			classes: "daytime_scheduler",
    			header: "Pollen Forecast for XXXXX",
    			config: {
    				updateInterval: 6 * 60 * 60 * 1000, // every six hours
    				zip_code: "XXXXX",
    			}
    		},
    		{
    			disabled: false,
    			module: "calendar",
    			header: "Holidays",
    			position: "top_right",
    			classes: "daytime_scheduler",
    			config: {
    				maximumEntries: "1",
    				colored: true,
    				fade: false,
    				calendars: [
    					{color: "#FF0033", symbol: "calendar-check", url: "https://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"},
    				]
    			}
    		},				
    		{
    			disabled: false,
    			module: "calendar",
    			header: "xxxxx",
    			position: "top_right",
    			classes: "daytime_scheduler",
    			config: {
    				maximumEntries: "20",
    				colored: true,
    				fade: false,
    				calendars: [
    					{color: "#6666FF", symbol: "calendar-check", url: "https://xxxx.xxx/xxxxxxx/calendar.ics"},
    				]
    			}
    		},
    		{
    			disabled: false,
    			module: "calendar",
    			header: "xxxxx",
    			position: "top_right",
    			classes: "daytime_scheduler",
    			config: {
    				maximumEntries: "17",
    				colored: true,
    				fade: false,
    				calendars: [
    					{color: "#FF00FF", symbol: "calendar-check", url: "https://xxxxx.xxx/xxxxxxxxx/basic.ics"},
    				]
    			}
    		},
    		{
    			disabled: false,
    			module: "MMM-WeatherOrNot",
    			classes: "daytime_scheduler",
    			position: "top_left",
    				config: {
    				location: "xxxxx",     		        // See instructions
    				locationCode: "xxxxxxxxxx",             // See instructions
    				languages: "en",                          // See Languages list
    				tempUnits: "F",                           // F or C
    				font: "Tahoma",                           // See Font list
    				textColor: "#ffffff",                     // Hex color codes.
    				htColor: "#ffffff",                       // high temp color. Hex color codes.
    				ltColor: "#00dfff",                       // low temp color. Hex color codes.
    				sunColor: "#febc2f",                      // Hex color codes.
    				moonColor: "#dfdede",                     // Hex color codes.
    				cloudColor: "#dfdede",                    // Hex color codes.
    				cloudFill: "#1f567c",                     // Hex color codes.
    				rainColor: "#93bffe",                     // Hex color codes.
    				snowColor: "#dfdede",                     // Hex color codes.
    				height: "230px",                          // module is responsive to changes
    				width: "400px",                          // module is responsive to changes
    				label: "xxxxx",		                 // Location seems logical . .
    				days: "7",                                // 3, 5 or 7
    				theme: "dark",                            // See Themes list *** theme overrides bgColor. ***
    				bgColor: "#000000",                       // theme overrides bgColor.
    				icons: "Climacons Animated",              // Iconvault, Climacons or Climacons Animated
    				animationSpeed: 3000,
    				updateInterval: 10 * 60 * 1000,
    			}
    		},
    		{
    			disabled: false,
    			module: "MMM-WeatherOrNot",
    			classes: "daytime_scheduler",
    			position: "top_left",
    				config: {
    				location: "xxxx", 		        // See instructions
    				locationCode: "xxxxxxxxxxxx",           // See instructions
    				languages: "en",                          // See Languages list
    				tempUnits: "F",                           // F or C
    				font: "Tahoma",                           // See Font list
    				textColor: "#ffffff",                     // Hex color codes.
    				htColor: "#ffffff",                       // high temp color. Hex color codes.
    				ltColor: "#00dfff",                       // low temp color. Hex color codes.
    				sunColor: "#febc2f",                      // Hex color codes.
    				moonColor: "#dfdede",                     // Hex color codes.
    				cloudColor: "#dfdede",                    // Hex color codes.
    				cloudFill: "#1f567c",                     // Hex color codes.
    				rainColor: "#93bffe",                     // Hex color codes.
    				snowColor: "#dfdede",                     // Hex color codes.
    				height: "230px",                          // module is responsive to changes
    				width: "400px",                          // module is responsive to changes
    				label: "xxxxxxxx",	                 // Location seems logical . .
    				days: "7",                                // 3, 5 or 7
    				theme: "dark",                            // See Themes list *** theme overrides bgColor. ***
    				bgColor: "#000000",                       // theme overrides bgColor.
    				icons: "Climacons Animated",              // Iconvault, Climacons or Climacons Animated
    				animationSpeed: 3000,
    				updateInterval: 10 * 60 * 1000,
    			}
    		},
    		{
    			disabled: false,
    			module: "MMM-WeatherOrNot",
    			classes: "daytime_scheduler",
    			position: "top_left",
    				config: {
    				location: "xxx", 		        // See instructions
    				locationCode: "xxxxxxxxxxxx",           // See instructions
    				languages: "en",                          // See Languages list
    				tempUnits: "F",                           // F or C
    				font: "Tahoma",                           // See Font list
    				textColor: "#ffffff",                     // Hex color codes.
    				htColor: "#ffffff",                       // high temp color. Hex color codes.
    				ltColor: "#00dfff",                       // low temp color. Hex color codes.
    				sunColor: "#febc2f",                      // Hex color codes.
    				moonColor: "#dfdede",                     // Hex color codes.
    				cloudColor: "#dfdede",                    // Hex color codes.
    				cloudFill: "#1f567c",                     // Hex color codes.
    				rainColor: "#93bffe",                     // Hex color codes.
    				snowColor: "#dfdede",                     // Hex color codes.
    				height: "220px",                          // module is responsive to changes
    				width: "400px",                          // module is responsive to changes
    				label: "xxxx",		                 // Location seems logical . .
    				days: "7",                                // 3, 5 or 7
    				theme: "dark",                            // See Themes list *** theme overrides bgColor. ***
    				bgColor: "#000000",                       // theme overrides bgColor.
    				icons: "Climacons Animated",              // Iconvault, Climacons or Climacons Animated
    				animationSpeed: 3000,
    				updateInterval: 10 * 60 * 1000,
    			}
    		},
    		{
    			disabled: false,
    			module: "newsfeed",
    			position: "bottom_bar",
    			classes: "daytime_scheduler",
    			config: {
    				feeds: [
    					{
    						title: "Fox News",
    						url: "http://feeds.foxnews.com/foxnews/latest"
    					}
    				],
    				showSourceTitle: true,
    				showPublishDate: true,
    				broadcastNewsFeeds: true,
    				broadcastNewsUpdates: true
    			}
    		},
    	]
    
    };
    
    
    /*************** DO NOT EDIT THE LINE BELOW ***************/
    if (typeof module !== "undefined") {module.exports = config;}
    
    

    Jarhead96097

    M 1 Reply Last reply Jun 18, 2020, 1:26 AM Reply Quote 0
    • M Offline
      Mykle1 Project Sponsor Module Developer @Jarhead96097
      last edited by Jun 18, 2020, 1:26 AM

      @Jarhead96097

      You may have to rename the 2nd and 3rd instances. I never tried more than one at the same time.

      Create a working config
      How to add modules

      J 1 Reply Last reply Jun 18, 2020, 3:17 PM Reply Quote 1
      • J Offline
        Jarhead96097 @Mykle1
        last edited by Jun 18, 2020, 3:17 PM

        @Mykle1 Interesting idea… but being the relative noob that I am, would I simply copy and rename the folders and make appropriate config changes, or are there more steps? Do I need to do an npm install --productive in each renamed folder?

        Thanks for your help!

        Jarhead96097

        J 1 Reply Last reply Jun 18, 2020, 7:51 PM Reply Quote 0
        • J Offline
          Jarhead96097 @Jarhead96097
          last edited by Jun 18, 2020, 7:51 PM

          @Mykle1

          I found another post that describes using multiple instances of a module. I’ve copied and renamed the second and third instance, and updated the *.js, *.css and config.js files. Everything seems to be updating and working correctly now. I’ll check again in another hour to make sure.

          Thanks for the idea!

          Jarhead96097

          J 1 Reply Last reply Jun 18, 2020, 11:35 PM Reply Quote 0
          • J Offline
            Jarhead96097 @Jarhead96097
            last edited by Jun 18, 2020, 11:35 PM

            @Mykle1

            Well, I spoke too quickly. It seems that renaming the three instances helped but didn’t eliminate the problem. The data still grows stale after some period of time.

            Any other ideas? Other than copying/pasting/renaming, editing the .js and .css files and doing the npm install, is there anything else I should be doing to ensure the three modules work independently and continue to retrieve weather data?

            Thanks,

            Jarhead96097

            M 1 Reply Last reply Jun 19, 2020, 12:33 AM Reply Quote 0
            • M Offline
              Mykle1 Project Sponsor Module Developer @Jarhead96097
              last edited by Mykle1 Jun 19, 2020, 12:35 AM Jun 19, 2020, 12:33 AM

              @Jarhead96097

              Well, there are no guarantees.

              You’re using a separate location and locationCode for each instance? (by following the readme instructions)

              You could try staggering the updateInterval on each instance as well (so they’re not updating at the same time)

              I’ve never used more than one instance

              Create a working config
              How to add modules

              J 1 Reply Last reply Jun 19, 2020, 12:36 AM Reply Quote 0
              • J Offline
                Jarhead96097 @Mykle1
                last edited by Jun 19, 2020, 12:36 AM

                @Mykle1 Sure… my mileage may vary… completely understood.

                Yes, I’ve configured them with three different sets of location and locationCode information.

                I wondered about staggering the updateInterval, so I’ll try that next.

                Thanks!

                Jarhead96097

                M 1 Reply Last reply Jun 19, 2020, 12:45 AM Reply Quote 0
                • M Offline
                  Mykle1 Project Sponsor Module Developer @Jarhead96097
                  last edited by Mykle1 Jun 19, 2020, 12:46 AM Jun 19, 2020, 12:45 AM

                  @Jarhead96097

                  I’m testing. I’ll let it run for a while.

                  Screenshot from 2020-06-18 20-45-02.png

                  Create a working config
                  How to add modules

                  J S 2 Replies Last reply Jun 19, 2020, 12:47 AM Reply Quote 1
                  • J Offline
                    Jarhead96097 @Mykle1
                    last edited by Jun 19, 2020, 12:47 AM

                    @Mykle1 Thanks for all the help! I love the module… just wish I could figure out why the information goes stale.

                    Jarhead96097

                    M 1 Reply Last reply Jun 19, 2020, 1:41 AM Reply Quote 0
                    • S Away
                      sdetweil @Mykle1
                      last edited by Jun 19, 2020, 12:50 AM

                      @Mykle1 does the module rebuild the display or does it locate the dom elements and update those?
                      document.getElementbyId() … if so, you probably have duplicate IDs w 2 versions running

                      in my modules I use the module identifier as part of the item id to avoid this

                      this.identifer in the modulename.js

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      M 1 Reply Last reply Jun 19, 2020, 12:53 AM Reply Quote 2
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      1 / 3
                      • First post
                        10/21
                        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