Read the statement by Michael Teeuw here.
MMM-WeatherOrNot
-
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;}
-
You may have to rename the 2nd and 3rd instances. I never tried more than one at the same time.
-
@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!
-
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!
-
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,
-
Well, there are no guarantees.
You’re using a separate
location
andlocationCode
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
-
@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!
-
I’m testing. I’ll let it run for a while.
-
@Mykle1 Thanks for all the help! I love the module… just wish I could figure out why the information goes stale.
-
@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 runningin my modules I use the module identifier as part of the item id to avoid this
this.identifer in the modulename.js