-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stuck on loading trains message #1
Comments
Ok, I'll try and look at that today. |
Did you do the npm install in the module directory prior to running the Mirror? Using the following config:
I get it to connect and display without issues. |
What other modules are you running? Is this a fresh install or an old install? Have you done an update recently? |
alert |
Can you copy your complete config (minus API keys) - I've stripped my test config down to the items listed and it's still runs. |
|
I wondered about this, however the mirror isnt running all the time as i'm still setting up - i only installed on Monday. I turned it on around 10 am this morning and it never worked from that point. No usage warnings on transportAPI account either. I had to use nextBuses as without that the API doesnt return any data for my stop. In any case, the buses are loading, which i presume they wouldnt if i'd used my daily hits. |
Ok next step: If you run the mirror in server mode, you can use a browser to see the console messages. Instead of running it via 'npm start' run it using 'node serveronly'. Point a normal web browser at the ip address:8080 of the mirror and it should appear. Do you know how to inspect a web page via a browser? If so have a look at the console and see if there are any errors being output. |
I'm already running serveronly mode - no errors showing there. There are however errors in the browser console
|
Weird - that is an old error caused by the module NOT handling empty responses from the TransportAPI - generally due to train operators not providing information in a consistent manner. Let me go and check the various GIT branches..... How did you download the module BTW? |
Followed the steps on the Readme |
OK. Let me get back to you. |
I get the error you describe above :
by putting in the wrong app_id or app_key. Can you check these are correct and are properly quoted? |
yeah they look ok, they're exactly the same as the entries in Bus times. I tried generating a new API key in case that was it but got the same issue. All quotes look ok, same as the config above |
Ok I've released a version with better error handling and debug capabilities. Firstly you'll need to do a git pull && npm install to make sure you have the latest version. You'll also need to add
to your NationalRail config in the mirror config file. Hopefully we can then get a better idea of where the error is happening. Everything I do this end indicates that the request being made is wrong - either _key, or _id or even station code. BUT the config you gave me doesn't seem to support this. Let me know what the error is in the console. |
There is also a 'URL Request is: ' output in the console log. If you copy this link and paste it into a browser it should return the JSON for the station departures. |
Ok, i now get a 'no info about station returned' message. No messages to STDOUT or the browser console. I set the debug setting to true, still don't see anything on STDOUT but get these in the console
No sign of the URL Request is message though... |
Second pull and install picked up the change in your commit. I'm sorry to say this a big fat user error - in the application key being incorrect (1 and l look exactly the same in Putty). Thanks for the great support and sorry for the wasted time |
Ok. Bit worried that it took 2 pulls, but glad it's working. Have a good day and enjoy your mirror. |
Threw me a bit too:
|
Module is loading but never gets past Loading Trains message. Details have been put in through the transport API site and return the 200 response expected. Have stripped back to the mandatory config fields only but no change.
config entry:
{
module: "MMM-UKNationalRail",
position: "bottom_left",
config: {
stationCode: "HUD",
app_id: "myAppId",
app_key: "myAppKey"
}
}
The text was updated successfully, but these errors were encountered: