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.

    Transit module stopped working

    Scheduled Pinned Locked Moved Troubleshooting
    29 Posts 5 Posters 6.0k 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.
    • S Offline
      sdetweil @Elaniobro
      last edited by

      @Elaniobro boooo. always something! let me know if I can help

      Sam

      How to add modules

      learning how to use browser developers window for css changes

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

        @Elaniobro probably another ‘this’ pointer issue

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        E 1 Reply Last reply Reply Quote 0
        • E Offline
          Elaniobro @sdetweil
          last edited by

          @sdetweil Welcome to assist, you can find the repo here: https://github.com/Elaniobro/MMM-nyc-transit

          I do have it cleaned up a bit locally, but I am thinking my API key is no longer valid and or something changed upstream that I am not aware of. The mirror is doing what it should and returning results array, but the array is empty.

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

            @Elaniobro using the default config, i also see the lack of info

                client.departures(stations)
                  .then((responses) => {
                    var upTown = []
                    var downTown = []
            
                    console.log("api results="+JSON.stringify(responses))
            

            actual data

             api results=[{"complexId":237,"name":"Carroll St","lines":[{"name":"6th Av - Culver","departures":{"S":[],"N":[]}}]},{"complexId":177,"name":"Clinton - Washington Avs","lines":[{"name":"8th Av - Fulton St","departures":{"S":[],"N":[]}}]}]
            

            config

                config: {
                  apiKey: '****',   // just granted
                  displayType: 'marquee',
                  mtaType: 'train',
                  stations: [
                    {
                      stationId: 237,
                      walkingTime: 5,
                      dir: {
                          upTown: false,
                          downTown: true
                      }
                    },
                    {
                      stationId: 177,
                      walkingTime: 5,
                      dir: {
                        upTown: true,
                        downTown: false
                      }
                    }
                  ],
            

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 1
            • E Offline
              Elaniobro
              last edited by

              We can close this issue, it was resolved on github. The module itself never broke, it was an upstream service that did. A module that I was using, was using deprecated endpoints. I spoke with the developer and the MTA and we were able to isolate and resolve it.

              In addition, not only did the endpoints change but any API keys generated on their old site, datamine.mta.info will no longer work.

              You will need to create a new one via api.mta.info moving forward.

              Thank you for your assist and feed back.

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

                @Elaniobro glad I found the cause. sure makes for a deep dive into the stuff we use when something changes…

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                N 1 Reply Last reply Reply Quote 0
                • N Offline
                  Nneuland @sdetweil
                  last edited by

                  I’m running into this exact issue today. New install has not resolved. Neither has requesting a new API key. Any suggestions?

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

                    @nneuland I would post an issue to the module github for the developer

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    N 1 Reply Last reply Reply Quote 0
                    • N Offline
                      Nneuland @sdetweil
                      last edited by

                      @sdetweil
                      Hi Sam. Yes, I did. Unfortunately because I am on a Pi4 they are unable to troubleshoot…

                      I reinstalled the module fresh and retrieved a new API from api.mta.info, not clear on the error

                      socketNotificationReceived: “TRAIN_TABLE”:
                      Array(2)
                      MMM-nyc-transit.js:332 Uncaught TypeError: Cannot read property ‘fadeSpeed’ of undefined
                      at Class.socketNotificationReceived (:8080/modules/MMM-ny…-nyc-transit.js:332)
                      at module.js:245
                      at Socket. (socketclient.js:38)
                      at Socket…/node_modules/component-emitter/index.js.Emitter.emit (socket.io.js:1915)
                      at Socket.emit (socket.io.js:1544)
                      at Socket.emitEvent (socket.io.js:1161)
                      at Socket.onevent (socket.io.js:1135)
                      at Socket.MMSocket.socket.onevent (socketclient.js:32)
                      at Socket.onpacket (socket.io.js:1089)
                      at Manager…/node_modules/component-emitter/index.js.Emitter.emit (socket.io.js:1915)

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