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 12.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.
    • I Offline
      infinitempg @j.e.f.f
      last edited by

      @j.e.f.f I guess the mirror is smarter than I am…

      Thanks! Works like a charm.

      1 Reply Last reply Reply Quote 0
      • SexyTroggS Offline
        SexyTrogg
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • K Offline
          kingveder
          last edited by

          Hey Jeff,
          The actual badge for the bus number is it possible to change this color?
          The color works for me but it just changes the color of the bus/streetcar icon.
          Thanks
          Ru

          Mykle1M 1 Reply Last reply Reply Quote 0
          • Mykle1M Offline
            Mykle1 Project Sponsor Module Developer @kingveder
            last edited by

            @kingveder

            This may help.

            From the readMe

            Finally, it you would like to colour code your entries, you can specify an optional parameter ‘color’ property that will give the icon whatever color you specify in hexadecimal format. e.g.:

            {
              routeNo : '501',
              stop : '6108',
              label : 'Queen Westbound',
              color : '#82BAE5' //colours the transit icon a light blue colour
            },
            

            Create a working config
            How to add modules

            T 1 Reply Last reply Reply Quote 0
            • T Offline
              TheGeekfather @Mykle1
              last edited by

              @Mykle1

              MyTTC stops at loading - does it require an API? - followed all steps for the ttc.

              Another GREAT MODULE !!!

              1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil
                last edited by

                @TheGeekfather said in MMM-MyTTC (Toronto Transit):

                MyTTC

                I installed the module and setup using the default config in the readme

                it failed with this message

                [22:04:25.291] [LOG]    raw ={"copyright":"All data copyright Toronto Transit Commission 2019.","Error":{"content":"For agency=ttc stop s=1148 is on none of the directions for r=143 so cannot determine which stop to provide data for.","shouldRetry":"false"}}
                

                i removed stop 1148 from the stop request and it all works…

                add this line to the node_helper.js and then look at the output on the terminal window or in the pm2 logs

                    var predictionsArray = new Array();
                		console.log("raw ="+JSON.stringify(rawJSON));   // add this line < - --
                    if (rawJSON.predictions.length) {
                
                the module is unable to tell u about error conditions like this

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                T 1 Reply Last reply Reply Quote 0
                • T Offline
                  TheGeekfather @sdetweil
                  last edited by

                  @sdetweil

                  AWESOME !!!

                  You are correct - removed the stop 1148 and it WORKS !! :)

                  Thank you - worked on this for hours!!

                  1 Reply Last reply Reply Quote 0
                  • L Offline
                    Lvl15_Gazebo
                    last edited by

                    Hello! I’m a newb to this community so I hope it’s ok if I resurrect this old thread. I just started trying to set up my Magic Mirror and got caught on the MyTTC Module not working properly. I managed to fix it and wanted to relay this to others so they could too. I’m not sure how to fork a module and upload it otherwise so hopefully someone whose been coding longer might be able to do it!

                    Anyway, Nextbus changed the URL for making XML requests so I had to change this line in the node_helper.js:
                    webServiceURL: “https://retro.umoiq.com/service/publicJSONFeed”,
                    To this line:
                    webServiceURL: “http://webservices.nextbus.com/service/publicJSONFeed”,

                    I’m also having some issues with getting the Line and Stop numbers from the TTC as what I put in doesn’t seem to line up with what Nextbus/Umoiq has, but I’m still working on that. I hope this helps someone who is running into the same issues.

                    S 1 Reply Last reply Reply Quote 1
                    • S Offline
                      sdetweil @Lvl15_Gazebo
                      last edited by

                      @Lvl15_Gazebo great work.

                      to fork on the module GitHub page push the fork button, top right.

                      now u have YOUR own copy

                      git clone that to magic mirror
                      (rename the old one first)

                      now u can copy in the files u changed from the old one to your copy

                      git status
                      will show the changed files

                      when u want to update your copy on GitHub

                      git add xxx
                      each of the files u changed (that’s xxx)

                      and then git commit -m" some message about why these changes"

                      then git push to upload the repo to github

                      if u want to contribute those back to the source module, you will see a contribute button to make a pull request

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      L 1 Reply Last reply Reply Quote 0
                      • L Offline
                        Lvl15_Gazebo @sdetweil
                        last edited by

                        @sdetweil Thanks! I’ll give that a shot.

                        I also determined last night that there is now a third variable for the transit request on UMOIQ for “direction” so I’ll try to figure that out before I submit anything. I’m not the best coder so that might take a bit, haha. Hopefully, I don’t need to change the XML parsing too!

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