MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. nwootton
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    Offline
    • Profile
    • Following 0
    • Followers 1
    • Topics 2
    • Posts 52
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Train status tracker

      @jamielola Just an update. I looked at the RealTimeTrains API and it gives the same information, but allows for less filtering of your request. For example you can’t filter to only show trains that have stopped at station X or are going through station Y. While this is something that might be of no use to the majority of users, there are bound to be some people who could make good use of this.

      It’s also much easier to sign up for an account at the TransportAPI.com that at RealTimeTrains (rtt.api.io).

      I’ll keep the module based on the TransportAPI unless we come up with a good reason to migrate.

      {
      locationDetail: {
      realtimeActivated: true,
      tiploc: "SURBITN",
      crs: "SUR",
      description: "Surbiton",
      gbttBookedArrival: "1526",
      gbttBookedDeparture: "1527",
      origin: [
      {
      tiploc: "WATRLMN",
      description: "London Waterloo",
      workingTime: "150300",
      publicTime: "1503"
      }
      ],
      destination: [
      {
      tiploc: "GUILDFD",
      description: "Guildford",
      workingTime: "160200",
      publicTime: "1604"
      }
      ],
      isCall: true,
      isPublicCall: true,
      realtimeArrival: "1526",
      realtimeArrivalActual: false,
      realtimeDeparture: "1527",
      realtimeDepartureActual: false,
      platform: "4",
      platformConfirmed: false,
      platformChanged: false,
      displayAs: "CALL"
      },
      serviceUid: "W36325",
      runDate: "2017-03-29",
      trainIdentity: "2G41",
      runningIdentity: "2G41",
      atocCode: "SW",
      atocName: "South West Trains",
      serviceType: "train",
      isPassenger: true
      },
      
      posted in Requests
      nwoottonN
      nwootton
    • RE: Train status tracker

      I’ve now added this to the Modules > Showcase >Transport section of the forum.

      posted in Requests
      nwoottonN
      nwootton
    • RE: MMM-UKNationalRail - Rail departure info for specific UK Railway stations

      @McSorley I considered making it flash and make noises if the train was on time, but it’s such an edge case that I didn’t think it was worth the effort! :)

      posted in Transport
      nwoottonN
      nwootton
    • RE: Train status tracker

      @yawns Thanks. Now to tidy the bus version.

      posted in Requests
      nwoottonN
      nwootton
    • MMM-UKNationalRail - Rail departure info for specific UK Railway stations

      Description:

      Retrieves information about rail services running through a specific UK rail station. Built on the Transport API.

      See documentation in the README and on the TransportAPI developer portal.

      Screenshot:

      0_1490612091128_MMM-UKNationalRail.jpg

      GitHub Repo: https://github.com/nwootton/MMM-UKNationalRail

      posted in Transport uk rail transport
      nwoottonN
      nwootton
    • RE: Train status tracker

      I’ve finally had a chance to go back and have a look at the API response and I’ve tweaked the code. The new layout shows the destination, planned departure, (estimated departure) and a colour coded late/early/on time status.

      0_1490608621631_Screen Shot 2017-03-27 at 10.54.12.png

      I’ve NOT gone and looked at the realtimetrains API - I got sidetracked by MQTT notifications in Magic Mirror instead.

      posted in Requests
      nwoottonN
      nwootton
    • RE: Train status tracker

      Glad you like it.

      I have to say that I built it more as a curiosity when bored during lunch, so I didn’t do any checking against the actual National Rail API/Website. I wanted to play with something (I was VERY bored) and MM has been on my todo list to look at for a while.

      I have noticed some weirdness over early/late/on-time but I assumed it was a GIGO scenario coming into the TransportAPI and being pushed down to the results. Typically this has been the delays changing between refreshes - says 5 minutes late, I refresh the page and it says ‘on time’. I haven’t gone back to National Rail to compare them.

      If you go to the TransportAPI document page here, you can put the query in and see the returned JSON.

      {
              "mode": "train",
              "service": "24673205",
              "train_uid": "W36644",
              "platform": null,
              "operator": "SW",
              "aimed_departure_time": "10:00",
              "aimed_arrival_time": "10:00",
              "aimed_pass_time": null,
              "origin_name": "London Waterloo",
              "source": "Network Rail",
              "destination_name": "Hampton Court",
              "status": "ON TIME",
              "expected_arrival_time": "10:00",
              "expected_departure_time": "10:00",
              "best_arrival_estimate_mins": 35,
              "best_departure_estimate_mins": 35
            }
      

      This contains 2 different times for departure and arrival as well as a countdown time, so I guess they could be updating each one in real time to “improve” accuracy.

      I might have a look at the National Rail API to see if it’s easy to use and integrate with.

      I also need to do some work to setup colours for Late/Early/On time/Cancelled and look at layouts, but if you want, feel free to change anything and ‘push request’ back at me :)

      UPDATE: Just looked at the National Rail APIs - SOAP XML/WSDL… I think I’ll pass #shudder. However there is http://www.realtimetrains.co.uk/ that I’ll look at later.

      posted in Requests
      nwoottonN
      nwootton
    • RE: London Bus status

      @Porkiddo

      Just Had a look at the Bus stop module again. When it’s used with certain other modules, it appears to error when trying to render the DOM.

      I managed to get it to fall over when used in conjunction with the commute module. I can see the data is coming in, I can see the params are correct, but an ‘appendChild’ error is being thrown when it tries to draw it on screen.

      I’ll investigate more tomorrow and see if I can figure it out.

      Nope I’m an idiot… the issue was a wrong location in my config “bottom_middle” instead of “bottom_center”

      N

      posted in Requests
      nwoottonN
      nwootton
    • RE: London Bus status

      @Porkiddo

      Do you have an account set up at Transportapi.com?
      Do you have an app_id and app_key set up?
      Do you know the ATCOCode for the bus stop?

      If you use the live api documentation here and put in the info you want to use does it respond without an error?

      Is the info in your config the same as that you’ve used successfully in the live api docs?

      Nick

      posted in Requests
      nwoottonN
      nwootton
    • RE: Train status tracker

      @yawns - Thanks! I couldn’t figure out how to do the wiki - I assumed it would be an approval process of some kind! Didn’t even consider the Module list.

      posted in Requests
      nwoottonN
      nwootton
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 5 / 6