• 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-Weather-Now is borking my MagicMirror after v2.13.0 update

Scheduled Pinned Locked Moved Troubleshooting
8 Posts 2 Posters 356 Views 2 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
    schrutesbeets Project Sponsor
    last edited by schrutesbeets Oct 4, 2020, 2:22 PM Oct 4, 2020, 2:19 PM

    Context: I am a noob but seriously addicted to the Raspberry Pi platform. I am learning about Git, javascript, and CSS little by little and am by no means expert with any of those languages so apologies for any basic questions.

    Here are the steps I performed that created a blank (black) screen after MagicMirror v2.13.0 update.

    • I first backed up previous version of MagicMirror build

    • Tried to perform update via the MMM-Remote-Control module - update failed

    • Tried to perform update via RPi terminal command git pull - received the “Your local changes to the following files would be overwritten by merge” and didn’t know how to stash and pop so I didn’t know how to get past this error

    • Removed all 3rd party modules and tried git pull again - received the “Your local changes to the following files would be overwritten by merge” because I must have changed some details in the js of a few of the default modules, oops, I thought that is how to customize colors and padding when tinkering.

    • Deleted current build of MagicMirror (since I already had a backup) and started fresh by following the basic installation instructions and then added config file and all 3rd party modules form backup - resulted in blank (black) screen when I execute npm start

    • After fresh install of MagicMirror, I then tried adding back all of the 3rd party modules and executed npm install on each module to make sure they were updated - resulted in blank (black) screen when I execute npm start

    • I then removed all 3rd party modules (again) and added them back one-by-one figuring it would help identify the issue since I never received errors upon starting MagicMirror during any of these steps so my config file syntax must be fine. I found that the MMM-Weather-Now module is causing the blank (black) screen somehow, otherwise without that module the MagicMirror starts up fine.

    Any thoughts how I can troubleshoot the MMM-Weather-Now module to fix the issue?

    My config file for reference (private info obfuscated) sorry for the messy code:

     *
     * By Michael Teeuw https://michaelteeuw.nl
     * MIT Licensed.
     *
     * For more information on how you can configure this file
     * See https://github.com/MichMich/MagicMirror#configuration
     *
     */
    
    var config = {
    	address: "0.0.0.0",
    		// 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,
    	basePath: "/", 		
    		// The URL path where MagicMirror is hosted. If you are using a Reverse proxy
    		// you must set the sub path here. basePath must end with a /
    	ipWhitelist: [],
    		// 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.218"],
    		// 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",
    	logLevel: ["INFO", "LOG", "WARN", "ERROR"],
    	timeFormat: 24,
    	units: "metric",	// 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: [		
    		{
    			module: "MMM-MyCalendar",
    			position: "top_left",	// This can be any of the regions. Best results in left or right regions.
    			config: {
    				colored: false,
    				fade: true,
    				maximumEntries: 25,
    				fadePoint: 0.75,
    				useRelativeDates: false,
    				urgency: 30,
    				maxTitleLength: 50,
    				calendars: [
    			{
    				url: 'obfuscated-info',
    			symbol: 'calendar',
    				auth: {
    			    		user: 'obfuscated-info',
    			    		pass: 'obfuscated-info',
    			    		method: 'basic'
    					}
    			},
    		],
    		}
    		},
    		{
    			module: "alert",
    		},
    		{
    			module: "updatenotification",
    			position: "top_bar"
    		},
    		{
    			module: "clock",
    			position: "top_right"
    		},
    		{
    	    		module:     'MMM-3Day-Forecast',
    			header: "3-day Forecast",
    	    		position:   'top_right',
    			config: {
    				api_key:    'obfuscated-info',
    				lat:        obfuscated-info,
    				lon:        obfuscated-info,
    				units:      'I',
    				lang:       'en',
    				horizontalView: true,
    				interval:   900000
    				}
    		},
    		{
    			module: "newsfeed",
    			position: "bottom_bar",
    			config: {
    				feeds: [
    					{
    						title: "New York Times",
    						url: "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"
    					}
    				],
    				showSourceTitle: true,
    				showPublishDate: true,
    				broadcastNewsFeeds: true,
    				broadcastNewsUpdates: true
    			}
    		},
    		{
    			module: "MMM-MyStandings",
    			header: "Standings",
    			position: "top_right",
    			config: {
    				updateInterval: 60 * 60 * 1000, // every 60 minutes
    				rotateInterval: .5 * 60 * 1000, // every 30 sec
    				sports: [
    					{ league: "NBA", groups: ["Atlantic"] },
    					{ league: "MLB", groups: ["American League East"] },
    					{ league: "NFL", groups: ["AFC East"] },
    					{ league: "NHL", groups: ["Atlantic Division"] },
    					{ league: "MLS", groups: ["Eastern Conference"] },
    					],
    				nameStyle: "short",
    				showLogos: true,
    				useLocalLogos: true,
    				showByDivision: true,
    				fadeSpeed: 1000,
    				}
    		},
    		{
    		    module: 'MMM-Remote-Control',
    		    	// uncomment the following line to show the URL of the remote control on the mirror
    		    	// position: "bottom_left",
    		    	// you can hide this module afterwards from the remote control itself
    		    config: {
    			customCommand: {},  // Optional, See "Using Custom Commands" below
    			customMenu: "custom_menu.json", // Optional, See "Custom Menu Items" below
    			showModuleApiMenu: true, // Optional, Enable the Module Controls menu
    			apiKey: "",         // Optional, See API/README.md for details
    		    		}
    		},
    		{
    			module: 'MMM-PIR-Sensor',
    			position: "top_center", // Remove this line to avoid having an visible indicator		
    			config: {
    				sensorPin: 22,
    				powerSavingDelay: 60, // Turn HDMI OFF after 60 seconds of no motion, until motion is detected again
    				preventHDMITimeout: 10, // Turn HDMI ON and OFF again every 10 minutes when power saving, to avoid LCD/TV timeout
    				supportCEC: true, 
    				presenceIndicator: "fa-eye", // Customizing the indicator
    				presenceOffIndicator: "fa-eye", // Customizing the indicator
    				presenceIndicatorColor: "#2AE9F9", // Customizing the indicator
    				presenceOffIndicatorColor: "#2b271c" // Customizing the indicator
    		}
    		
    	},
    
    		
    	]
    };
    
    S 1 Reply Last reply Oct 4, 2020, 2:29 PM Reply Quote 0
    • S Away
      sdetweil @schrutesbeets
      last edited by Oct 4, 2020, 2:29 PM

      @schrutesbeets show the messages from the place where u start MM

      npm start
      or
      pm2

      if pm2, then pm2 logs --lines=???
      where ??? is a number, default is 15

      also, open the developers window, ctrl-shift-i on the mm keyboard, select the tab labeled ‘console’ and scroll up to see that errors

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S 1 Reply Last reply Oct 4, 2020, 2:32 PM Reply Quote 0
      • S Away
        sdetweil @sdetweil
        last edited by sdetweil Oct 4, 2020, 2:37 PM Oct 4, 2020, 2:32 PM

        @schrutesbeets

        looks like its the translation file
        translations/da.json

        which has a comment in it… not allowed in json

        
        {
            /* NOW key can be translated to "Lige nu", please provide footage or description of where and how it's used */
            "NOW":          "Nu",
            "FEELS_LIKE":   "Føles som"
        }
        

        remove that line.

        I opened issue https://github.com/nigel-daniels/MMM-Weather-Now/issues/6

        but its been 2 years since update, so unlikely

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        S 2 Replies Last reply Oct 4, 2020, 2:51 PM Reply Quote 0
        • S Offline
          schrutesbeets Project Sponsor @sdetweil
          last edited by Oct 4, 2020, 2:51 PM

          @sdetweil thanks for looking into this for me… I owe you a coffee or beer.

          This is the log from npm start

          > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
          
          [2020-10-04 10:44:51.126] [LOG]    Starting MagicMirror: v2.13.0
          [2020-10-04 10:44:51.133] [LOG]    Loading config ...
          [2020-10-04 10:44:51.138] [LOG]    Loading module helpers ...
          [2020-10-04 10:44:51.506] [LOG]    Initializing new module helper ...
          [2020-10-04 10:44:51.506] [LOG]    Module helper loaded: MMM-MyCalendar
          [2020-10-04 10:44:51.508] [LOG]    No helper found for module: alert.
          [2020-10-04 10:44:51.544] [LOG]    Initializing new module helper ...
          [2020-10-04 10:44:51.544] [LOG]    Module helper loaded: updatenotification
          [2020-10-04 10:44:51.545] [LOG]    No helper found for module: clock.
          [2020-10-04 10:44:51.849] [LOG]    Initializing new module helper ...
          [2020-10-04 10:44:51.850] [LOG]    Module helper loaded: MMM-Weather-Now
          [2020-10-04 10:44:51.852] [LOG]    Initializing new module helper ...
          [2020-10-04 10:44:51.852] [LOG]    Module helper loaded: MMM-3Day-Forecast
          [2020-10-04 10:44:51.874] [LOG]    Initializing new module helper ...
          [2020-10-04 10:44:51.874] [LOG]    Module helper loaded: newsfeed
          [2020-10-04 10:44:51.876] [LOG]    Initializing new module helper ...
          [2020-10-04 10:44:51.877] [LOG]    Module helper loaded: MMM-MyStandings
          [2020-10-04 10:44:51.994] [LOG]    Initializing new module helper ...
          [2020-10-04 10:44:51.994] [LOG]    Module helper loaded: MMM-Remote-Control
          [2020-10-04 10:44:52.024] [LOG]    Initializing new module helper ...
          [2020-10-04 10:44:52.024] [LOG]    Module helper loaded: MMM-PIR-Sensor
          [2020-10-04 10:44:52.025] [LOG]    All module helpers loaded.
          [2020-10-04 10:44:52.149] [LOG]    Starting server on port 8080 ... 
          [2020-10-04 10:44:52.154] [INFO]   You're using a full whitelist configuration to allow for all IPs
          [2020-10-04 10:44:52.159] [LOG]    Server started ...
          [2020-10-04 10:44:52.160] [LOG]    Connecting socket for: MMM-MyCalendar
          [2020-10-04 10:44:52.161] [LOG]    Starting node helper for: MMM-MyCalendar
          [2020-10-04 10:44:52.162] [LOG]    Connecting socket for: updatenotification
          [2020-10-04 10:44:52.163] [LOG]    Connecting socket for: MMM-Weather-Now
          [2020-10-04 10:44:52.164] [LOG]    MMM-Weather-Now helper, started...
          [2020-10-04 10:44:52.165] [LOG]    Connecting socket for: MMM-3Day-Forecast
          [2020-10-04 10:44:52.166] [LOG]    MMM-3Day-Forecast helper, started...
          [2020-10-04 10:44:52.167] [LOG]    Connecting socket for: newsfeed
          [2020-10-04 10:44:52.168] [LOG]    Starting node helper for: newsfeed
          [2020-10-04 10:44:52.169] [LOG]    Connecting socket for: MMM-MyStandings
          [2020-10-04 10:44:52.169] [LOG]    MMM-MyStandings helper started ...
          [2020-10-04 10:44:52.170] [LOG]    Connecting socket for: MMM-Remote-Control
          [2020-10-04 10:44:52.171] [LOG]    Starting node helper for: MMM-Remote-Control
          [2020-10-04 10:44:52.179] [LOG]    Connecting socket for: MMM-PIR-Sensor
          [2020-10-04 10:44:52.180] [LOG]    Sockets connected & modules started ...
          [2020-10-04 10:44:52.298] [LOG]    Launching application.
          [2020-10-04 10:45:01.780] [LOG]    Shutting down server...
          [2020-10-04 10:45:01.781] [LOG]    Stopping module helper: MMM-MyCalendar
          [2020-10-04 10:45:01.782] [LOG]    Stopping module helper: updatenotification
          [2020-10-04 10:45:01.782] [LOG]    Stopping module helper: MMM-Weather-Now
          [2020-10-04 10:45:01.782] [LOG]    Stopping module helper: MMM-3Day-Forecast
          [2020-10-04 10:45:01.783] [LOG]    Stopping module helper: newsfeed
          [2020-10-04 10:45:01.783] [LOG]    Stopping module helper: MMM-MyStandings
          [2020-10-04 10:45:01.784] [LOG]    Stopping module helper: MMM-PIR-Sensor
          

          This is the log from npm start dev

          loader.js:195 Load stylesheet: vendor/css/font-awesome.css
          loader.js:155 Styles loaded for: MMM-MyCalendar
          loader.js:157 Translations loaded for: MMM-MyCalendar
          loader.js:176 Load script: modules/default/alert//alert.js
          module.js:513 Module registered: alert
          loader.js:148 Bootstrapping module: alert
          loader.js:176 Load script: modules/default/alert/notificationFx.js
          loader.js:153 Scripts loaded for: alert
          loader.js:195 Load stylesheet: modules/default/alert/notificationFx.css
          loader.js:236 File already loaded: font-awesome.css
          loader.js:155 Styles loaded for: alert
          translator.js:102 alert - Load translation fallback: translations/en.json
          /home/pi/Desktop/MM …rity-warnings.js:95 Electron Security Warning (Insecure Resources) This renderer process loads resources using insecure
            protocols.This exposes users of this app to unnecessary security risks.
            Consider loading the following resources over HTTPS or FTPS. 
           - http://0.0.0.0:8080/css/main.css
          - http://0.0.0.0:8080/fonts/roboto.css
          - http://0.0.0.0:8080/socket.io/socket.io.js
          - http://0.0.0.0:8080/vendor/node_modules/nunjucks/browser/nunjucks.min.js
          - http://0.0.0.0:8080/js/defaults.js
          - http://0.0.0.0:8080/config/config.js
          - http://0.0.0.0:8080/vendor/vendor.js
          - http://0.0.0.0:8080/modules/default/defaultmodules.js
          - http://0.0.0.0:8080/js/logger.js
          - http://0.0.0.0:8080/translations/translations.js
          - http://0.0.0.0:8080/js/translator.js
          - http://0.0.0.0:8080/js/class.js
          - http://0.0.0.0:8080/js/module.js
          - http://0.0.0.0:8080/js/loader.js
          - http://0.0.0.0:8080/js/socketclient.js
          - http://0.0.0.0:8080/js/main.js
          - http://0.0.0.0:8080/fonts/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.woff2
          - http://0.0.0.0:8080/translations/en.json
          - http://0.0.0.0:8080/translations/en.json
          - http://0.0.0.0:8080/modules/MMM-MyCalendar//MMM-MyCalendar.js
          - http://0.0.0.0:8080/vendor/node_modules/moment/min/moment-with-locales.js
          - http://0.0.0.0:8080/modules/MMM-MyCalendar/MMM-MyCalendar.css
          - http://0.0.0.0:8080/vendor/css/font-awesome.css
          - http://0.0.0.0:8080/vendor/node_modules/@fortawesome/fontawesome-free/css/all.min.css
          - http://0.0.0.0:8080/vendor/node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css
          - http://0.0.0.0:8080/modules/default/alert//alert.js
          - http://0.0.0.0:8080/modules/default/alert/notificationFx.js
          - http://0.0.0.0:8080/modules/default/alert/notificationFx.css
            
           
          For more information and help, consult
          https://electronjs.org/docs/tutorial/security.
           This warning will not show up
          once the app is packaged.
          /home/pi/Desktop/MM …ity-warnings.js:145 Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security
              Policy set or a policy with "unsafe-eval" enabled. This exposes users of
              this app to unnecessary security risks.
           
          For more information and help, consult
          https://electronjs.org/docs/tutorial/security.
           This warning will not show up
          once the app is packaged.
          loader.js:157 Translations loaded for: alert
          loader.js:176 Load script: modules/default/updatenotification//updatenotification.js
          module.js:513 Module registered: updatenotification
          loader.js:148 Bootstrapping module: updatenotification
          loader.js:153 Scripts loaded for: updatenotification
          loader.js:155 Styles loaded for: updatenotification
          loader.js:157 Translations loaded for: updatenotification
          loader.js:176 Load script: modules/default/clock//clock.js
          module.js:513 Module registered: clock
          loader.js:148 Bootstrapping module: clock
          loader.js:236 File already loaded: moment.js
          loader.js:176 Load script: vendor/node_modules/moment-timezone/builds/moment-timezone-with-data.js
          loader.js:176 Load script: vendor/node_modules/suncalc/suncalc.js
          loader.js:153 Scripts loaded for: clock
          loader.js:195 Load stylesheet: modules/default/clock/clock_styles.css
          loader.js:155 Styles loaded for: clock
          loader.js:157 Translations loaded for: clock
          loader.js:176 Load script: modules/MMM-Weather-Now//MMM-Weather-Now.js
          module.js:513 Module registered: MMM-Weather-Now
          loader.js:148 Bootstrapping module: MMM-Weather-Now
          loader.js:153 Scripts loaded for: MMM-Weather-Now
          loader.js:195 Load stylesheet: modules/MMM-Weather-Now/weather-now.css
          loader.js:236 File already loaded: font-awesome.css
          loader.js:155 Styles loaded for: MMM-Weather-Now
          translator.js:100 MMM-Weather-Now - Load translation: translations/en.json
          translator.js:102 MMM-Weather-Now - Load translation fallback: translations/da.json
          VM143:2 Uncaught SyntaxError: Unexpected token / in JSON at position 6
              at JSON.parse (<anonymous>)
              at XMLHttpRequest.xhr.onreadystatechange (translator.js:22)
          
          1 Reply Last reply Reply Quote 0
          • S Offline
            schrutesbeets Project Sponsor @sdetweil
            last edited by Oct 4, 2020, 3:02 PM

            @sdetweil that worked… I removed the comment line in the da.json file and it runs like normal now. Much appreciated.

            S 1 Reply Last reply Oct 4, 2020, 3:06 PM Reply Quote 0
            • S Away
              sdetweil @schrutesbeets
              last edited by Oct 4, 2020, 3:06 PM

              @schrutesbeets glad it worked… don’t see the change that caused that yet…

              it would always fail with that comment, so it wasn’t parsed for some reason, and now is…

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • S Away
                sdetweil
                last edited by sdetweil Oct 4, 2020, 7:52 PM Oct 4, 2020, 7:51 PM

                see the sticky topic at the top of the troubleshooting section
                https://forum.magicmirror.builders/topic/13774/2-13-back-screen

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                S 1 Reply Last reply Oct 4, 2020, 8:05 PM Reply Quote 0
                • S Offline
                  schrutesbeets Project Sponsor @sdetweil
                  last edited by Oct 4, 2020, 8:05 PM

                  @sdetweil nice thanks

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  1 / 1
                  • First post
                    3/8
                    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