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.
    • D Offline
      Davepre
      last edited by

      Hi nwootton,
      thanks for the great module. I am using it for my mirror project and encountered a weird issue:

      I use it for two bus routes (44 and 344) and what I noticed during the weekend is that very early buses (like 01:00 in the morning or so) got delayed. BUT they got delayed more and more according to the module which causes the timing to be off. Eventually the timer showed something like “1756 Minutes late”. These late runners did not disappear but would always stay on top of the list.

      I understand that this might be a bug on TFL’s side but is there a way to have buses that are, lets say more than 60 minutes delayed, shown as cancelled or have them faded out? For routes that are running like every 5-10 minutes usually this might make sense I think.

      Thanks in advance
      Dave

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

        @Davepre I’ll have a look and see what I can do. Can you tell me all the bus stop codes you are using?

        It’s possible that TfL (or whoever) is not passing the info across to Transport API or that Transport API are not passing it down to the module correctly.

        The more common error is that the bus operators don’t actually send anything and this was breaking the module.

        Nick

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

          Hi Nick,
          thank you very much for your reply.

          I am currently only using one bus stop. “The Latchmere” stop LS which has the AtcoCode “490013443E”.

          Thanks again for looking into this!
          Dave

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

            @Davepre said in MMM-UKLiveBusStopInfo - Arrivals & Departures from a UK Bus Stop:

            490013443E

            Can you send me the config you are using - I can see weird things happening with the feed - e.g. 08:45 seems to become 00:45 for some reason, but I’d like to make sure that I’m setup the same way as you.

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

              Thanks for looking into this. I am at work at the moment and dont have access to the mirror here, but will send you the config files as soon as I am home!

              thanks and best regards
              Dave

              nwoottonN 1 Reply Last reply Reply Quote 0
              • 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
                        • 2 / 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