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-MyTTC (Toronto Transit)

    Scheduled Pinned Locked Moved Transport
    27 Posts 9 Posters 11.4k Views 9 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.
    • J Offline
      j.e.f.f Project Sponsor Module Developer
      last edited by j.e.f.f

      Hi Folks

      This is my first module from scratch, and I’m pretty proud of it! If shows you how long you’ll need to wait for the next bus or streetcar to arrive at a particular stop. It shows up to the next 3 vehicles.

      [card:jclarke0000/MMM-MyTTC]

      0_1495764655969_MMM-MyTTC.png

      It currently doesn’t provide subway times as they aren’t available in TTC’s public API. Also of note is that if a particular route that you’ve specified isn’t currently running (e.g.: Overnight route, downtown express route, etc.) it will be hidden from display.

      Routes are colour-coded based on their type, and should match what you see on TTC.ca (regular routes are red, express routes are green, overnight routes are blue and white, etc.).

      To all my fellow Torontonians, enjoy!
      -Jeff

      1 Reply Last reply Reply Quote 0
      • lucallmonL Offline
        lucallmon
        last edited by

        @j-e-f-f is there any plan to expand this to other major cities? Could this be used for DC metro times? Perhaps wmata.com has an api. I’m not sure. I just think this would be helpful. Thoughts?

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          j.e.f.f Project Sponsor Module Developer @lucallmon
          last edited by

          @lucallmon It uses the NextBus API. There are a bunch of transit systems across North America that use it. Here’s the list:

          http://webservices.nextbus.com/service/publicJSONFeed?command=agencyList

          I see DC Ciculator and DC Streetcar in the list… it would be fairly trivial to get this to work for them. That said, I’ve gone a bit further to tailor this for TTC. For example, I’ve added extra logic to color code the routes based on TTC’s naming scheme, and the streetcar icon is actually modeled after a Toronto streetcar :)

          I could probably make a generic version of the module to support any of the agencies in the list above.

          I 1 Reply Last reply Reply Quote 0
          • lucallmonL Offline
            lucallmon
            last edited by

            @j-e-f-f that would be sweet. I just found this page for DC Metro APIs: https://developer.wmata.com/

            maybe it will help.

            1 Reply Last reply Reply Quote 0
            • I Offline
              infinitempg @j.e.f.f
              last edited by

              @j.e.f.f any update on a generic version? I’d love to use this for the Rutgers University bus system!

              J 2 Replies Last reply Reply Quote 0
              • J Offline
                j.e.f.f Project Sponsor Module Developer @infinitempg
                last edited by

                @infinitempg My apologies on this! I’ve been pretty busy getting my own mirror up and running, so I’ve been focusing on other custom modules I’ve written to do very specific things. I promise I’ll get to this!

                1 Reply Last reply Reply Quote 1
                • J Offline
                  j.e.f.f Project Sponsor Module Developer @infinitempg
                  last edited by

                  @infinitempg I had a bit of time tonight to look at this. Try this:

                  [card:jclarke0000/MMM-MyNextBus]

                  Let me know if it’s working for you.

                  I 1 Reply Last reply Reply Quote 1
                  • I Offline
                    infinitempg @j.e.f.f
                    last edited by infinitempg

                    @j.e.f.f currently getting stuck on loading, even with the default configs. not sure if that’s because a lot of systems are closed right now or if I did something wrong.

                    I’ll check again in the morning.

                    (thanks for doing this btw!)

                    EDIT - aaaaaand suddenly it works. Just wanna say thanks!

                    J 2 Replies Last reply Reply Quote 0
                    • J Offline
                      j.e.f.f Project Sponsor Module Developer @infinitempg
                      last edited by

                      @infinitempg Wow! First try!! Keep an eye on it as I haven’t done any hardening on this. No idea if there are edge cases I hadn’t accounted for. If all goes well over the next few days, then I’ll announce the release in its own thread.

                      Glad you like it!
                      -Jeff

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        j.e.f.f Project Sponsor Module Developer @infinitempg
                        last edited by

                        @infinitempg Also, could you send me your config? I’ll monitor things on my end too, in case any errors get thrown.

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