GithubHelp home page GithubHelp logo

nwootton / mmm-uklivebusstopinfo Goto Github PK

View Code? Open in Web Editor NEW
17.0 8.0 12.0 281 KB

Magic Mirror Module for UK bus information. Returns real-time info about a SPECIFIC bus stop

License: MIT License

JavaScript 97.18% CSS 2.82%
magicmirror bus transport-api uk-bus-information

mmm-uklivebusstopinfo's Issues

Nextbuses

Hi, I have set the nextBuses option to no, but the TranspotAPI still call nextBuses sometimes . Not as much if I set it to yes. Is there any way to stop that?
Many thanks, Bali

transpotapi

Bus stop module suddenly stopped declaring departures

Having successfully got the bus stop and train modules working a week or so ago, I've noticed that the Bus modules now shows that there are "No departures scheduled". I've queried the TransportAPI and think it is giving the required info.
I had a notification that the module was two commits behind and so I ran a git pull and installed, but to no avail.

I haven't really tinkered with the settings within the module and so it is running all the standard settings...

{
module: 'MMM-UKLiveBusStopInfo',
position: 'bottom_left',
header: 'Departures'
config: {
atcocode: '490005445C',
app_id: '.....',
app_key: '.....',
limit: 5,
nextBuses: 'no'
showRealTime: false,
showDelay: false,
}

As I say, my AppId and AppKey are working fine on the train module, so I know that's not a factor.
I am a complete RaspPi, Linux and MM noob, so apologies if I've made a simple goof. I am also aware that you are no longer working on this module, but if anyone else has any ideas, it'd be much appreciated. My son likes to see when his next buses are due!

NextBuses toggle schedule

In order to get more use of the NextBuses API, would it be possible to implement start/stop time ranges to set nextBuses=yes on a schedule? I expect most people have a regular commute where they'd like more accurate bus times for a short period of each day ...

e.g.

nextBusesStart:    07.45
nextBusesStop:     08.15

If that could be combined with a general start/stop time for all updates then you could stop polling the API completely overnight (our buses don't run overnight anyway).

e.g.

start:    07.30
stop:     19.30

Based on those examples I think you could have it updating every 1 minute and still keep under the 1000 requests per day ...

Atcocode

Hi,

This is possibly me being a complete newbie at this. I can see the module works (I've tried using another atcocode)

I'm trying to use the Atco code for my stop, which I believe is 73723972 but this doesn't load.

I'm posting here in the hope someone can help and tell me what I'm doing wrong.

If this isn't the best place to post... Then please accept my apologies.

Delay time is excessive and never clears from results

Report from user via forum:

"I use it for two bus routes (44 and 344) and what I noticed during the weekend is that very early buses (like 01:00 in the morning or so) got delayed. BUT they got delayed more and more according to the module which causes the timing to be off. Eventually the timer showed something like “1756 Minutes late”. These late runners did not disappear but would always stay on top of the list.

I understand that this might be a bug on TFL’s side but is there a way to have buses that are, lets say more than 60 minutes delayed, shown as cancelled or have them faded out? For routes that are running like every 5-10 minutes usually this might make sense I think."

updateDOM errors

Throws an error about updating the DOM when used with certain other modules.

Uncaught TypeError: Cannot read property 'getElementsByClassName' of null
    at moduleNeedsUpdate (main.js:134)
    at updateDom (main.js:104)
    at Object.updateDom (main.js:472)
    at Class.updateDom (module.js:296)
    at Class.processBuses (MMM-UKLiveBusStopInfo.js:220)
    at XMLHttpRequest.busInfoRequest.onreadystatechange (MMM-UKLiveBusStopInfo.js:151)

Docs TransportAPI app id / key

I noticed you're including the app id & key from our docs in the README here. Just to let you know this one will be stopping working quite soon.

I don't think it really matters actually. Your README does a good a job of linking where folks need to go to register their own app id & key ( https://developer.transportapi.com ) . But just to note that soon they will need to do that, because that sample key won't work.

....
This looks neat by the way! So d'you have a mirror which tells you when the bus is coming? I want to see it!

Module stops working after a while

Hi,

My Pi is constantly on and I noticed that the module stops loading the bus times between midnight-1am and it won't refresh it until a restart the mirror.

Can you fix this issue or is it because of my particular bus?

API call costs

I have noticed that the bus info from transportapi costs 10 requests. Wondering if its worth noting that here anywhere?

Stuck on loading-Error "Cannot read property 'length' of undefined

Hi,

I did the step by step and everything seemed to install fine, but I'm stuck on loading and the console is telling me there is an error on line 206 of the .js file? I got this module working a few days ago but since updating it's stopped working and given me that error, any help is greatly appreciated

-Dave

Console error using nextbus

Hi, I closed my other ticket (#9) as it had gone way off the original topic and I have better debug info now. I've removed MMM-Schedule from the equation entirely and the issue still occurs so it's nothing to do with that.

To recap, I'm having trouble getting the nextbus times to work reliably. Running MM in dev mode I can see console errors along these lines (sorry as MM is running on another machine via ssh I can't screengrab or copy and paste the errors):

Uncaught TypeError: Cannot read property 'split' of null

Expanding the object above that error in the console, I can see that expected_departure_date and expected_departure_time are both null.

There are values for aimed_departure_time , best_departure_estimate, and date

Here's my config.js:

                {
                        module:         'MMM-UKLiveBusStopInfo',        //Accurate times to Leeds
                        position:       'bottom_left',
                        header:         'To Leeds (realtime)',                  //Optional - delete this line to turn OFF the header completely
                        config: {
                                atcocode:               '3200YNA00515',                 // ATCO code for specific bus stop
                                app_id:                 '###',                             // TransportAPI App ID
                                app_key:                '###',                 // TransportAPI App Key
                                limit:                  5,                                      // Optional - Maximum results to display.
                                nextBuses:              'yes',
                                updateInterval:         60000,
                                showRealTime:           true,           // Optional - show realtime departure info
                                showDelay:              true,                   // Optional - show delay in minutes based on Real Time info vs Time table
                                showBearing:            true,
                                debug:                  true
                        }
                },

... let me know if there's anything I should look for in the console output that might help here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.