Read the statement by Michael Teeuw here.
UNSOLVED London DLR arrivals
Looking for a module that will pull in the arrival times of DLR trains customisable by station and destination.
next arrival @ (station) to (destination) in (time) (i.e.7mins)
The data can be pulled from the TFL api.
I am happy to try and write the module myself but have no experience scripting with node.js any assistance would be appreciated.
@dragon8_uk sounds good and not too difficult:
I would structure it this way:
- arrivals / departures
- API Key/
- start: sendSocketNoti (to node_helper.js) including config
- socketNotiReceived: get json from node_helper and store it in an object. Then call getDom()
- getDom: create dom and include object elements as table including line and ETA
- setInterval() to create a loop calling the API with a certain interval.
- socketNotiReceived: get config from main.js, call API url, fetch data and send it back to main.js via sendSocketNoti.
No claim for completeness.
There is a vast amount of modules here working roughly like this. Take a look around on github for
third party modules and check the MagicMirror Readme for creating modules.
It’s really not difficult and much fun to develop!
Has anyone got MMM-TFL-Arrivals running?
Just shows a blank screen for me.
The UKLiveBusStopInfo did work, but did some strange things to some buses. Also what is needed is for a ETA not if the bus is late.
Just spent the evening trying to parse the JSON data using MMM-json-feed. That didn’t behave either, it either displays the whole feed or nothing at all.
Is there anyone a bit more knowledgeable who can look into this, live bus and train departures for TfL would be awesome.
@pumpy266 im trying it out at the moment
@pumpy266 tfl-arrivals works for me.
Have you set
in the config?
Then you can check for debug messages in the developers console.
Either by pressing f12 in your browser or by starting the mirror with
npm start dev
@lavolp3 Interesting, many thanks for looking at this.
I am running it in MMM-Pages so Alexa can control it, I am new to all of this so just asking in case this has any bearing on things?
Can’t look right now, but will in the morning.
Slightly later than expected.
Many thanks for trying the module out and confirming it works.
OK, got the TFL-Arrivals working.
But not in MMM-Pages.
Any thoughts on how to troubleshoot this?