Read the statement by Michael Teeuw here.
-
@off112 I have just pushed an update that includes the departure track info. Try it out and let me know of any issues.
-
@Alvinger Västtrafik user here. I got the upgrade.
Either the line type icon or the track number is shown as “undefined”. Neither is actually visible. Screenshot below.
-
@Von-Sudden thanks, quick fixes aren’t always the best. I’ll have a look. Thanks for the info.
-
@Von-Sudden I just pushed a quick fix, please try it out.
-
@Alvinger From what I can see at ResRobot - Stolptidtabeller 2 ( https://www.trafiklab.se/node/14075/console ), it seems as if Västtrafik does not always post the fields rtTime, rtTrack and rtDate in the response from the API.
-
@Alvinger Almost there. The type symbols are gone, and some tracks are still undefined.
-
@Alvinger Thank you for your good work :)
-
@Alvinger I made a quick fix of line 120 in MMM-ResRobot.js
depLineCell.innerHTML = departure.track || " ";
That made the odd “undefined” tracks disappear from the track column if Västtrafik does not provide that field.
The FontAwesome symbol is still missing in the type column, though.
Thanks for the awesome work.
-
@Von-Sudden thank you for helping out. I will look into the font awedome issue.
-
Hej!
I’m trying to get the MMM-Resrobot to work but … no success. In my MM, it permanently says “Fetching Departures …”
I have an API-key which seems to work, I checked at https://api.resrobot.se/v2/departureBoard?key=WITH-MY-API-KEY-HERE&id=740015972.
My config.js looks like this:
{ module: "MMM-ResRobot", position: "top_right", header: "Departures", config: { routes: [ // stations from: {from: "740015972", to: ""}, ], apiKey: "WITH-MY-API-KEY-HERE" }, },
The MMM-ResRobot.js looks like this:
```
defaults: {
updateInterval: 5 * 60 * 1000,
animationSpeed: 2000,
fade: true,
fadePoint: 0.25, // Start on 1/4th of the list.
apiBase: “https://api.resrobot.se/v2/departureBoard?format=json&passlist=0”,
skipMinutes: 0, // Number of minutes to skip before showing departures
maximumEntries: 6, // Maximum Entries to show on screen
truncateAfter: 5, // A value > 0 will truncate direction name at … … …
iconTable: {
“B”: “fa fa-bus”,
“S”: “fa fa-subway”,
“J”: “fa fa-train”,
“U”: “fa fa-subway”,
“F”: “fa fa-ship”,
},
},Anyone who has an idea? Appreciated! Tack!