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

Trouble with modules

Scheduled Pinned Locked Moved Troubleshooting
4 Posts 2 Posters 284 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.
  • N Offline
    nipper2000h
    last edited by Jun 15, 2020, 12:44 AM

    Hello,

    I am new to programming and having trouble installing new modules. I have only been able to get the doomsday countdown timer to work successfully. I am currently having trouble with NJ Transit Bus module. I have installed the module, changed directory to the module folder and installed the dependencies by following the readme file. The module seems to load into MM but never actually loads any data or seems to connect to any service. This module does not require an API. I have failed to get the MMM-NycTransit module or MMM-Traffic module to work correctly so I figured my problem was API related? I get the same result from both these modules as well, the module seems to work but doesn’t get any information. I figured this module without an API was a good place to start troubleshooting.

    I’ve checked for syntax errors. Here is my NJTransitBus config:

    /* 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: "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-NJTransit",
    			position: "lower_third",
    			header: "NJ Transit buses",
    			config: {
    				colored: true,
    				stops: [{
    					id: "11500",
    					label: "North st",
    					color: "yellow",
    					routes: ["40"]
    				},
    				{
    					id: "12060",
    					label: "George rd",
    					color: "green"
    				}
    				]
    			}
    		},
    		{
    			module: "alert",
    		},
    		{
    			module: "updatenotification",
    			position: "top_bar"
    		},
    		{
    			module: "clock",
    			position: "top_left"
    		},
    		{
    			module: "calendar",
    			header: "US Holidays",
    			position: "top_left",
    			config: {
    				calendars: [
    					{
    						symbol: "calendar-check",
    						url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"					}
    				]
    			}
    		},
    		{
    			module: "compliments",
    			position: "lower_third"
    		},
    		{
    			module: "currentweather",
    			position: "top_right",
    			config: {
    				location: "New York",
    				locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
    				appid: "myweatherAPI"
    			}
    		},
    		{
    			module: "weatherforecast",
    			position: "top_right",
    			header: "Weather Forecast",
    			config: {
    				location: "New York",
    				locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
    				appid: "myweatherAPI"
    			}
    		},
    		{
    			module: "newsfeed",
    			position: "bottom_bar",
    			config: {
    				feeds: [
    					{
    						title: "New York Times",
    						url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
    					}
    				],
    				showSourceTitle: true,
    				showPublishDate: true,
    				broadcastNewsFeeds: true,
    				broadcastNewsUpdates: true
    			}
    		},
    	]
    
    };
    
    /*************** DO NOT EDIT THE LINE BELOW ***************/
    if (typeof module !== "undefined") {module.exports = config;}
    
    

    This is a SS of the mirror.

    njtransitbus.PNG

    ====================================================================================================
    Here’s what I get when I start MM:

    pi@raspberrypi:~/MagicMirror $ npm start
    
    > magicmirror@2.11.0 start /home/pi/MagicMirror
    > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
    
    [2020-06-14 20:31:25.419] [LOG]    Starting MagicMirror: v2.11.0
    [2020-06-14 20:31:25.652] [LOG]    Loading config ...
    [2020-06-14 20:31:25.666] [LOG]    Loading module helpers ...
    [2020-06-14 20:31:27.145] [LOG]    Initializing new module helper ...
    [2020-06-14 20:31:27.148] [LOG]    Module helper loaded: MMM-NJTransit
    [2020-06-14 20:31:27.150] [LOG]    No helper found for module: alert.
    [2020-06-14 20:31:27.265] [LOG]    Initializing new module helper ...
    [2020-06-14 20:31:27.267] [LOG]    Module helper loaded: updatenotification
    [2020-06-14 20:31:27.270] [LOG]    No helper found for module: clock.
    [2020-06-14 20:31:29.311] [LOG]    Initializing new module helper ...
    [2020-06-14 20:31:29.316] [LOG]    Module helper loaded: calendar
    [2020-06-14 20:31:29.320] [LOG]    No helper found for module: compliments.
    [2020-06-14 20:31:29.322] [LOG]    No helper found for module: currentweather.
    [2020-06-14 20:31:29.325] [LOG]    No helper found for module: weatherforecast.
    [2020-06-14 20:31:29.485] [LOG]    Initializing new module helper ...
    [2020-06-14 20:31:29.488] [LOG]    Module helper loaded: newsfeed
    [2020-06-14 20:31:29.490] [LOG]    All module helpers loaded.
    [2020-06-14 20:31:30.145] [LOG]    Starting server on port 8080 ... 
    [2020-06-14 20:31:30.185] [LOG]    Server started ...
    [2020-06-14 20:31:30.187] [LOG]    Connecting socket for: MMM-NJTransit
    [2020-06-14 20:31:30.189] [LOG]    Starting node helper for: MMM-NJTransit
    [2020-06-14 20:31:30.190] [LOG]    Connecting socket for: updatenotification
    [2020-06-14 20:31:30.191] [LOG]    Connecting socket for: calendar
    [2020-06-14 20:31:30.193] [LOG]    Starting node helper for: calendar
    [2020-06-14 20:31:30.195] [LOG]    Connecting socket for: newsfeed
    [2020-06-14 20:31:30.198] [LOG]    Starting module: newsfeed
    [2020-06-14 20:31:30.202] [LOG]    Sockets connected & modules started ...
    [2020-06-14 20:31:30.618] [LOG]    Whoops! There was an uncaught exception...
    [2020-06-14 20:31:30.619] [ERROR]  Error: listen EADDRINUSE: address already in use 127.0.0.1:8080
        at Server.setupListenHandle [as _listen2] (net.js:1226:14)
        at listenInCluster (net.js:1274:12)
        at GetAddrInfoReqWrap.doListen [as callback] (net.js:1413:7)
        at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:65:10) {
      code: 'EADDRINUSE',
      errno: 'EADDRINUSE',
      syscall: 'listen',
      address: '127.0.0.1',
      port: 8080
    }
    [2020-06-14 20:31:30.648] [LOG]    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
    [2020-06-14 20:31:30.649] [LOG]    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
    [2020-06-14 20:31:30.656] [LOG]    Launching application.
    
    

    Any help would be greatly appreciated! Thank you.

    S 1 Reply Last reply Jun 15, 2020, 1:12 AM Reply Quote 0
    • S Offline
      sdetweil @nipper2000h
      last edited by Jun 15, 2020, 1:12 AM

      @nipper2000h the second means u already have mm running. did u select pm2 during the scripted install?
      do

      pm2 status
      pm2 stop 0
      

      then restart mm again

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      N 1 Reply Last reply Jun 15, 2020, 1:35 AM Reply Quote 0
      • N Offline
        nipper2000h @sdetweil
        last edited by Jun 15, 2020, 1:35 AM

        @sdetweil Yes, this worked. Thank you so much, it fixed my issue on all the modules I was having problems with. I didn’t realize anything was wrong because weather was working twice. MM was running from pm2 already when I used npm start. Restarts didn’t fix my issue but this worked for me. Thanks again!

        S 1 Reply Last reply Jun 15, 2020, 1:39 AM Reply Quote 0
        • S Offline
          sdetweil @nipper2000h
          last edited by Jun 15, 2020, 1:39 AM

          @nipper2000h awesome! glad u found it.

          thank you for good diagnostic info!!

          Sam

          How to add modules

          learning how to use browser developers window for css changes

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