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.

    London DLR arrivals

    Scheduled Pinned Locked Moved Unsolved Requests
    8 Posts 3 Posters 2.3k Views 3 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.
    • lavolp3L Offline
      lavolp3 Module Developer @dragon8_uk
      last edited by lavolp3

      @dragon8_uk sounds good and not too difficult:

      I would structure it this way:

      Main.js:
      defaults:

      • station
      • arrivals / departures
      • API Key/

      functions:

      • start: sendSocketNoti (to node_helper.js) including config
      • socketNotiReceived: get json from node_helper and store it in an object. Then call getDom()
      • getDom: create dom and include object elements as table including line and ETA
      • setInterval() to create a loop calling the API with a certain interval.

      Node_helper

      • socketNotiReceived: get config from main.js, call API url, fetch data and send it back to main.js via sendSocketNoti.

      No claim for completeness.
      There is a vast amount of modules here working roughly like this. Take a look around on github for
      third party modules and check the MagicMirror Readme for creating modules.

      It’s really not difficult and much fun to develop!

      How to troubleshoot modules
      MMM-soccer v2, MMM-AVStock

      1 Reply Last reply Reply Quote 0
      • lavolp3L Offline
        lavolp3 Module Developer @dragon8_uk
        last edited by

        @dragon8_uk Have a look at this:

        https://github.com/ryck/MMM-TFL-Arrivals
        Should work for DLR as well!?

        Or this one:
        https://github.com/nwootton/MMM-UKLiveBusStopInfo

        How to troubleshoot modules
        MMM-soccer v2, MMM-AVStock

        1 Reply Last reply Reply Quote 0
        • P Offline
          pumpy266
          last edited by

          Has anyone got MMM-TFL-Arrivals running?
          Just shows a blank screen for me.

          The UKLiveBusStopInfo did work, but did some strange things to some buses. Also what is needed is for a ETA not if the bus is late.

          Just spent the evening trying to parse the JSON data using MMM-json-feed. That didn’t behave either, it either displays the whole feed or nothing at all.

          Is there anyone a bit more knowledgeable who can look into this, live bus and train departures for TfL would be awesome.

          lavolp3L 2 Replies Last reply Reply Quote 0
          • lavolp3L Offline
            lavolp3 Module Developer @pumpy266
            last edited by

            @pumpy266 im trying it out at the moment

            How to troubleshoot modules
            MMM-soccer v2, MMM-AVStock

            1 Reply Last reply Reply Quote 0
            • lavolp3L Offline
              lavolp3 Module Developer @pumpy266
              last edited by

              @pumpy266 tfl-arrivals works for me.
              Have you set

              debug: true
              

              in the config?
              Then you can check for debug messages in the developers console.
              Either by pressing f12 in your browser or by starting the mirror with npm start dev

              How to troubleshoot modules
              MMM-soccer v2, MMM-AVStock

              P 1 Reply Last reply Reply Quote 0
              • P Offline
                pumpy266 @lavolp3
                last edited by

                @lavolp3 Interesting, many thanks for looking at this.
                I am running it in MMM-Pages so Alexa can control it, I am new to all of this so just asking in case this has any bearing on things?

                Can’t look right now, but will in the morning.

                1 Reply Last reply Reply Quote 0
                • P Offline
                  pumpy266
                  last edited by

                  Slightly later than expected.
                  Many thanks for trying the module out and confirming it works.
                  OK, got the TFL-Arrivals working.
                  But not in MMM-Pages.

                  Any thoughts on how to troubleshoot this?

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