Closed SemicolonStruggles closed 5 years ago
When did you pull? An issue with trips that only have a single track (no transfers) was introduced last week and fixed yesterday.
If you still have issues, please include logging details and the nstreinen configuration (remove your api key).
I believed I pulled https://github.com/qistoph/MMM-nstreinen/commit/305f4f02f4b2f06bee09864090b33ef71c5c3a74 and then it broke. I pulled the commits following that commit immediately as they became available.
Will try to post the logs tomorrow.
I attachted the part of the configuration file for the nstreinen module and the entry from the mm-error-0.log related to the nstreinen module. This error repeats itsself about 25 times, but since the errors are identical I only included it once.
Could you add the following two lines for additional logging to tripfetcher.js
and add the output of these lines here?
index f391615..83e9665 100644
--- a/tripfetcher.js
+++ b/tripfetcher.js
@@ -53,6 +53,7 @@ var TripFetcher = function(url, user, pass, station, destination, departureOffse
}
data.ReisMogelijkheden.ReisMogelijkheid.forEach(function(mogelijkheid) {
+ console.log(mogelijkheid);
var status = mogelijkheid.Status;
var meldingen = mogelijkheid.Melding;
var reisDeel = mogelijkheid.ReisDeel;
@@ -62,6 +63,7 @@ var TripFetcher = function(url, user, pass, station, destination, departureOffse
reisDeel = [reisDeel];
}
var spoorInfo = reisDeel[0].ReisStop[0]["Spoor"];
+ console.log(spoorInfo);
var vertrekSpoor = spoorInfo["_"];
var spoorWijziging = spoorInfo["$"]["wijziging"] === "true";
var vertraging = parseDelay(mogelijkheid.VertrekVertraging);
The output should look something like this:
{ AantalOverstappen: '2',
GeplandeReisTijd: '1:07',
ActueleReisTijd: '1:07',
Optimaal: 'false',
GeplandeVertrekTijd: '2019-04-02T15:54:00+0200',
ActueleVertrekTijd: '2019-04-02T15:54:00+0200',
GeplandeAankomstTijd: '2019-04-02T17:01:00+0200',
ActueleAankomstTijd: '2019-04-02T17:01:00+0200',
Status: 'VOLGENS-PLAN',
ReisDeel:
[ { '$': [Object],
Vervoerder: 'NS',
VervoerType: 'Sprinter',
RitNummer: '7759',
Status: 'VOLGENS-PLAN',
ReisStop: [Array] },
{ '$': [Object],
Vervoerder: 'NS',
VervoerType: 'Intercity',
RitNummer: '2859',
Status: 'VOLGENS-PLAN',
ReisStop: [Array] },
{ '$': [Object],
Vervoerder: 'NS',
VervoerType: 'Intercity',
RitNummer: '859',
Status: 'VOLGENS-PLAN',
ReisStop: [Array] } ] }
{ _: '1', '$': { wijziging: 'false' } }
I Included the entire startup log
Starting MagicMirror: v2.7.1
Loading config ...
Loading module helpers ...
Initializing new module helper ...
Module helper loaded: MMM-ModuleScheduler
No helper found for module: alert.
Initializing new module helper ...
Module helper loaded: updatenotification
No helper found for module: clock.
Initializing new module helper ...
Module helper loaded: calendar
No helper found for module: currentweather.
No helper found for module: weatherforecast.
Initializing new module helper ...
Module helper loaded: newsfeed
Initializing new module helper ...
Module helper loaded: nstreinen
All module helpers loaded.
Starting server on port 8080 ...
Server started ...
Connecting socket for: MMM-ModuleScheduler
Starting node helper for: MMM-ModuleScheduler
Connecting socket for: updatenotification
Connecting socket for: calendar
Starting node helper for: calendar
Connecting socket for: newsfeed
Starting module: newsfeed
Connecting socket for: nstreinen
Starting node helper for: nstreinen
Sockets connected & modules started ...
Launching application.
MMM-ModuleScheduler is removing all scheduled jobs
MMM-ModuleScheduler received CREATE_GLOBAL_SCHEDULE
MMM-ModuleScheduler is creating a global schedule for display_daytime modules using "0 6 * * *" and "0 22 * * *" with dim level undefined
MMM-ModuleScheduler has created the global schedule for display_daytime modules
MMM-ModuleScheduler will next show display_daytime modules at Wed Apr 03 2019 06:00:00 GMT+0200 (CEST)
MMM-ModuleScheduler will next hide display_daytime modules at Tue Apr 02 2019 22:00:00 GMT+0200 (CEST)
MMM-ModuleScheduler is creating a global schedule for display_nighttime modules using "0 22 * * *" and "0 6 * * *" with dim level undefined
MMM-ModuleScheduler is hiding display_nighttime modules
MMM-ModuleScheduler has created the global schedule for display_nighttime modules
MMM-ModuleScheduler will next show display_nighttime modules at Tue Apr 02 2019 22:00:00 GMT+0200 (CEST)
MMM-ModuleScheduler will next hide display_nighttime modules at Wed Apr 03 2019 06:00:00 GMT+0200 (CEST)
MMM-ModuleScheduler is creating a global schedule for valentine modules using "0 6 14 2 *" and "0 22 14 2 *" with dim level undefined
MMM-ModuleScheduler is hiding valentine modules
MMM-ModuleScheduler has created the global schedule for valentine modules
MMM-ModuleScheduler will next show valentine modules at Sat Mar 14 2020 06:00:00 GMT+0100 (CET)
MMM-ModuleScheduler will next hide valentine modules at Sat Mar 14 2020 22:00:00 GMT+0100 (CET)
Create new calendar fetcher for url: http://www.calendarlabs.com/templates/ical/US-Holidays.ics - Interval: 300000
Create new news fetcher for url: http://feeds.bbci.co.uk/news/world/rss.xml - Interval: 300000
Create new news fetcher for url: http://feeds.bbci.co.uk/news/technology/rss.xml - Interval: 300000
Create new news fetcher for url: http://feeds.bbci.co.uk/news/science_and_environment/rss.xml - Interval: 300000
Create new trip fetcher for trip: Nieuwerkerk a/d IJssel-Den Bosch, Interval: 60000
{ Melding: [ { Id: [Object], Ernstig: [Object], Text: [Object] } ],
AantalOverstappen: [ '2' ],
GeplandeReisTijd: [ '1:11' ],
ActueleReisTijd: [ '1:11' ],
Optimaal: [ 'false' ],
GeplandeVertrekTijd: [ '2019-04-02T19:41:00+0200' ],
ActueleVertrekTijd: [ '2019-04-02T19:41:00+0200' ],
GeplandeAankomstTijd: [ '2019-04-02T20:52:00+0200' ],
ActueleAankomstTijd: [ '2019-04-02T20:52:00+0200' ],
Status: [ 'GEWIJZIGD' ],
ReisDeel:
[ { '$': [Object],
Vervoerder: [Object],
VervoerType: [Object],
RitNummer: [Object],
Status: [Object],
ReisStop: [Object] },
{ '$': [Object],
Vervoerder: [Object],
VervoerType: [Object],
RitNummer: [Object],
Status: [Object],
ReisStop: [Object] },
{ '$': [Object],
Vervoerder: [Object],
VervoerType: [Object],
RitNummer: [Object],
Status: [Object],
ReisStop: [Object] } ] }
[ { _: '1', '$': { wijziging: 'false' } } ]
Whoops! There was an uncaught exception...
MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
{ Melding: [ { Id: [Object], Ernstig: [Object], Text: [Object] } ],
AantalOverstappen: [ '2' ],
GeplandeReisTijd: [ '1:11' ],
ActueleReisTijd: [ '1:11' ],
Optimaal: [ 'false' ],
GeplandeVertrekTijd: [ '2019-04-02T19:41:00+0200' ],
ActueleVertrekTijd: [ '2019-04-02T19:41:00+0200' ],
GeplandeAankomstTijd: [ '2019-04-02T20:52:00+0200' ],
ActueleAankomstTijd: [ '2019-04-02T20:52:00+0200' ],
Status: [ 'GEWIJZIGD' ],
ReisDeel:
[ { '$': [Object],
Vervoerder: [Object],
VervoerType: [Object],
RitNummer: [Object],
Status: [Object],
ReisStop: [Object] },
{ '$': [Object],
Vervoerder: [Object],
VervoerType: [Object],
RitNummer: [Object],
Status: [Object],
ReisStop: [Object] },
{ '$': [Object],
Vervoerder: [Object],
VervoerType: [Object],
RitNummer: [Object],
Status: [Object],
ReisStop: [Object] } ] }
[ { _: '1', '$': { wijziging: 'false' } } ]
Whoops! There was an uncaught exception...
MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
The node-rest-client's interface changed since the previous time I've updated the dependencies.
That required a code change to keep working. Did you also do npm install
to update the dependencies after the git pull
?
These are the versions installed on my system:
$ npm list --depth=0
nstreinen@0.0.1 /home/chris/projects/MagicMirror/modules/nstreinen
├── eslint@5.15.3
├── grunt@1.0.4
├── grunt-eslint@21.0.0
├── grunt-jsonlint@1.1.0
├── grunt-markdownlint@1.1.6
├── grunt-staged@0.1.0
├── grunt-stylelint@0.10.1
├── node-rest-client@3.1.0
├── pre-commit@1.2.2
├── stylelint@9.10.1
├── stylelint-config-standard@18.2.0
└── time-grunt@2.0.0
That totally fixed it. Apologies, I should've paid more attention to the updated readme. Thanks for the quick replies!
Everything worked fine on https://github.com/qistoph/MMM-nstreinen/commit/66f9f0fbc5de938d6b1f387caeb075cd5215bcfe but since I last pulled, the module doesn't load anymore and hangs on 'Loading..."