Read the statement by Michael Teeuw here.
Trouble with modules
-
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.
====================================================================================================
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.
-
@nipper2000h the second means u already have mm running. did u select pm2 during the scripted install?
dopm2 status pm2 stop 0
then restart mm again
-
@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!
-
@nipper2000h awesome! glad u found it.
thank you for good diagnostic info!!