MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. nwootton
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    Offline
    • Profile
    • Following 0
    • Followers 1
    • Topics 2
    • Posts 52
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: MMM-UKLiveBusStopInfo - Arrivals & Departures from a UK Bus Stop

      @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.

      posted in Transport
      nwoottonN
      nwootton
    • RE: MMM-UKLiveBusStopInfo - Arrivals & Departures from a UK Bus Stop

      @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.

      posted in Transport
      nwoottonN
      nwootton
    • RE: MMM-UKLiveBusStopInfo - Arrivals & Departures from a UK Bus Stop

      @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

      posted in Transport
      nwoottonN
      nwootton
    • MMM-UKLiveBusStopInfo - Arrivals & Departures from a UK Bus Stop

      Description :
      Retrieves information about bus services running through a specific UK bus stop. Built on the Transport API .
      See documentation in the README and on the TransportAPI developer portal.

      Screenshot:
      0_1497423114271_Current_version.png

      GitHub:
      https://github.com/nwootton/MMM-UKLiveBusStopInfo

      posted in Transport uk transport bus
      nwoottonN
      nwootton
    • RE: MMM-UKNationalRail - Rail departure info for specific UK Railway stations

      @randomnoise Thanks for that, glad you like it. There’s a bus version as well if you want it!

      Can you stick a link to the Reddit post up here if you get a chance, would be nice to see one in the wild so to speak!

      posted in Transport
      nwoottonN
      nwootton
    • RE: Testing MM modules

      @arjunrao87 I’m trying to figure this out myself - did you get anywhere?

      I can find lots of information about the MM Test Suite, but I just want to write tests against a specific module I’m developing. Normally I’d use Mocha, but that just throws error after error when I try to get it to do anything against my own module.

      posted in Development
      nwoottonN
      nwootton
    • RE: MMM-UKNationalRail - Rail departure info for specific UK Railway stations

      New version release - better layout, more display options and ability to run multiple station configs.

      Please provide feedback either here, or by opening an issue on GitHub here.

      Thanks.

      posted in Transport
      nwoottonN
      nwootton
    • RE: London Bus status

      @soqueen TBH I rolled the master branch back to an earlier version that worked and branched the version with the bus stop name as the header.

      Once I get the last couple of issues in that branch version sorted I’ll role it back into the master. If you want to try it and give me feedback, the branch is called HeadersIssue.

      posted in Requests
      nwoottonN
      nwootton
    • RE: London Bus status

      @soqueen I’ve just noticed some weird behaviour this end while trying to fix this. Did you update your Mirror to 2.1.1? If so did you then do a new npm install afterwards?

      I ask because on one box the departures now shows no header at all, while the other now shows both departures AND the bus stop name…

      0_1492251079990_Screen Shot 2017-04-15 at 11.09.44.png

      posted in Requests
      nwoottonN
      nwootton
    • RE: London Bus status

      @soqueen I’ve just hacked a fix together. Give it a try and let me know.

      posted in Requests
      nwoottonN
      nwootton
    • RE: London Bus status

      @soqueen mmm weird, didn’t do that for me in testing. I’ll have a look later when I get home.

      posted in Requests
      nwoottonN
      nwootton
    • RE: London Bus status

      @soqueen I’ve just pushed a new version that hopefully allows you to have multiple instances of the module running. It’s been working happily this afternoon running three different bus stops around the area with no complaints.

      You’ll need to do a git pull to update, then run the

      cd MMM-UKLiveBusStopInfo
      npm install 
      

      to install the new dependencies.

      Give it a try and let me know. If it goes pear-shaped I can always roll the old version back and look again later.

      posted in Requests
      nwoottonN
      nwootton
    • RE: London Bus status

      @strawberry-3.141 If I get the chance I’ll look at passing an identity to the helper so it knows where to route the response back to.

      posted in Requests
      nwoottonN
      nwootton
    • RE: London Bus status

      @soqueen I have to say I’ve never considered it. Both this and the rail version were something I built more as an experiment than anything else. I’m not even sure I’d know how to handle multiple instances of a module.

      I’ll have to have a think/read and see how it could be done. Perhaps other more experienced devs may be able to chip in here?

      I will say that running three of these could get expensive in terms of api calls per day… if you use the next bus capability that would be 30 points per call or a max of 33 calls per day (~ every 45 minutes), which might not be enough to make the module really useful. You could get three distinct API keys I guess, but I’m not sure how TransportAPI would view that!

      I did consider some form of time range, but again it wasn’t something I needed for the experiment. Perhaps I need to find some time to reconsider that as an option!

      posted in Requests
      nwoottonN
      nwootton
    • RE: London Bus status

      @strawberry-3.141 good catch!

      posted in Requests
      nwoottonN
      nwootton
    • RE: London Bus status

      @soqueen I’d normally copy and paste the code into either my config or into jsonlint.com to check it’s validity. But, as you’ve posted a picture not a snippet, I can’t do that, so if I type it, it will not be the same as yours!

      However, first glance you’ve got a ‘//’ on your header row (far left), nothing else stands out as being wrong.

      Try pasting the entire config.js into jsonlint.com. That will tell you if the file is properly formed and highlight any errors.

      If that comes back ok, try removing everything except the bus stop module and see if it still fails. If it does paste the reduced config and we’ll see what we can do next.

      posted in Requests
      nwoottonN
      nwootton
    • RE: MMM-UKNationalRail - Rail departure info for specific UK Railway stations

      @Mar Thanks, I’m glad you like it.

      posted in Transport
      nwoottonN
      nwootton
    • RE: MMM-UKNationalRail - Rail departure info for specific UK Railway stations

      Now includes the platform and a slightly better layout.

      posted in Transport
      nwoottonN
      nwootton
    • RE: Train status tracker

      Added platform as an option to the module.

      Defaults to showing the platform, but can be turned off via config if not needed. If no platform specified, it will just display a -

      posted in Requests
      nwoottonN
      nwootton
    • RE: Train status tracker

      @jamielola Nice. As our station only has an In and an out platform I never considered it!

      If you want I can try to add you code to the repo and make it an option to display the platform via the config.

      Something like:

      {
      showPlatform: true
      }
      

      If you want real time delay calculations have a look at my Bus Stop module here. That does deltas between time tabled and actual times.

      N

      posted in Requests
      nwoottonN
      nwootton
    • 1
    • 2
    • 3
    • 2 / 3