MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-UKLiveBusStopInfo - Arrivals & Departures from a UK Bus Stop

    Scheduled Pinned Locked Moved Transport
    uk transportbus
    11 Posts 4 Posters 7.1k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • nwoottonN Offline
      nwootton Module Developer @Davepre
      last edited by nwootton

      @Davepre

      The issue is with TransportAPI and I’ve contacted their support with the following info:

      Using ‘https://transportapi.com/v3/uk/bus/stop/490013443E/live.json?app_id=a111aa11&app_key=1a11111a1111aaa11a1a1111a11111a1&group=route&nextbuses=no’

      I get the following info (snippet):

      departures: 
      {
      44: 
      [
      {
      mode: "bus",
      line: "44",
      line_name: "44",
      direction: "Victoria",
      operator: "LONDONBUS",
      date: "2017-07-25",
      expected_departure_date: "2017-07-25",
      aimed_departure_time: "09:18",
      expected_departure_time: "09:18",
      best_departure_estimate: "09:18",
      source: "Countdown instant",
      dir: "inbound",
      id: "https://transportapi.com/v3/uk/bus/route/LONDONBUS/44/inbound/490013443E/2017-07-25/09:18/timetable.json?app_id=a111aa11&app_key=1a11111a1111aaa11a1a1111a11111a1",
      operator_name: "London Buses"
      },
      

      If I use ‘https://transportapi.com/v3/uk/bus/stop/490013443E/live.json?app_id=a111aa11&app_key=1a11111a1111aaa11a1a1111a11111a1&group=no&nextbuses=no’

      I get the following info (snippet):

      {
      mode: "bus",
      line: "44",
      line_name: "44",
      direction: "Victoria",
      operator: "TFL",
      date: "2017-07-25",
      expected_departure_date: "2017-07-25",
      aimed_departure_time: "00:45",
      expected_departure_time: "09:18",
      best_departure_estimate: "09:18",
      source: "Countdown instant",
      dir: null,
      id: null,
      operator_name: null
      },
      

      Same bus, same info except the aimed_departure_time that is now 00:45. This means that when I calculate the delay, I get hundreds of minutes and the bus never drops out of the results.

      So the issue appears to be with the ‘group=no’ URL variable.

      0_1500971582697_Screen Shot 2017-07-25 at 09.00.22.png

      Hopefully they will address this or at least get back to me. In the meantime I will see what I can do to remove these ghost buses.

      1 Reply Last reply Reply Quote 0
      • nwoottonN Offline
        nwootton Module Developer
        last edited by

        I’ve released an updated version that removes buses with a delay of more than 60 minutes from the results.

        This is a hack until TransportAPI address the issues on their side. There is a side effect in that if 2 buses are delayed excessively, the module will only show 3 buses instead of the default 5.

        Hopefully this will not make any difference to the majority of users.

        1 Reply Last reply Reply Quote 0
        • D Offline
          Davepre
          last edited by

          Thanks a lot Nick! This will surely solve the issue for me atleast!

          Really appreciate you taking the time!

          Rgds / Dave

          1 Reply Last reply Reply Quote 0
          • G Offline
            gdr2404
            last edited by

            Sorry to dig up this old topic.

            Got this excellent module up and running with my bus stop, but i’m having an issue with the bus icons not showing, just a white boarder / box. Being a little ocd with how things should be displayed, would love to fix this.

            Quite new to magic mirror but have worked with many pi projects previously. I thought i might be able to dig through the code to figure this issue out myself but i’m not having much luck. Anyone think they might know what the problem is?

            Thanks
            Gav

            N 1 Reply Last reply Reply Quote 0
            • N Offline
              nitram @gdr2404
              last edited by

              @gdr2404
              I’m having the exact same issue. I haven’t been able to find a solution either - did you get anywhere yourself?

              Also, does anyone know how to get this module to show more than one bus stop - I know that it should, but can’t seem to make anything work.

              Cheers

              1 Reply Last reply Reply Quote 0
              • 1
              • 2
              • 1 / 2
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy