dr4ke616 / MMM-Dublin-Bus

Magic Mirror Module - Dublin Bus
MIT License
1 stars 0 forks source link

Does this module still work? Payload is not defined error #3

Open rororomyboat opened 5 years ago

rororomyboat commented 5 years ago

Getting Error: Dublin Bus Times: Hmm... Bus times unavailable :(

magicmirror@2.5.0 start /home/pi/MagicMirror sh run-start.sh

Starting MagicMirror: v2.5.0
Loading config ...
Loading module helpers ...
Initializing new module helper ...
Module helper loaded: MMM-Dublin-Bus
Initializing new module helper ...
Module helper loaded: newsfeed
All module helpers loaded.
Starting server on port 8080 ...
Server started ...
Connecting socket for: MMM-Dublin-Bus
Starting module: MMM-Dublin-Bus
Connecting socket for: newsfeed
Starting module: newsfeed
Sockets connected & modules started ...
Launching application.
Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
Started dublinbus scheduler
Whoops! There was an uncaught exception...
ReferenceError: payload is not defined
    at ClientRequest.https.get (/home/pi/MagicMirror/modules/MMM-Dublin-Bus/node_helper.js:55:71)
    at Object.onceWrapper (events.js:315:30)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:551:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:117:23)
    at TLSSocket.socketOnData (_http_client.js:440:20)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
rororomyboat commented 5 years ago

Could be related to the web page listed in the node helper file.

I think the URL has changed from that to something else/service is down

MrCupola commented 5 years ago

The 3rd app access to API has been blocked for now, due to the high amount of access.

See below for further information:

Over the last 2-3 weeks the TFI Real Time App and the Open Source Real Time API have received a large increase in the number of real time requests. The additional requests have caused memory storage and CPU strain leading to the server crashing on a frequent basis. Working with the NTA BI team it has been confirmed that over 2.2 million search requests were made over a 24 hour period - over 1.7 million were made through the API. The daily average has frequently exceeded circa 1.5 million searches.

A number of steps are under way to address the issue of API fair usage in the medium term however a business decision has been made this morning to switch off the Open Source API as it is in danger of crashing the server over the weekend.

Over the last 3-4 days OpenSky have needed to manually restart the server during morning peak. This manual intervention has resulted in maintaining the real time data to the TFI Real Time APP & API.

The potential out of hours risk this weekend is that the server crashes - OpenSky do not offer out of hours support so there is no way to restart the server should it crash until Monday morning.

By switching off the API 3rd parties will be unable to access real time predictions.

Action – OpenSky have been requested to switch off the .9 & .70 servers which manage the API. The switch off will take place today - 16th Nov. 18.

It is hoped that this action will help keep the TFI Real Time App working over the weekend.

VIX have been requested to monitor storage & CPU resources to help support the business decision to add additional CPU resources to the server if required next week during office hours.

dr4ke616 commented 5 years ago

As @MrCupola correctly pointed out, the API has been blocked.

A way around this is addressed in #4

Alternatively wait and hope that the open source api comes back online.

MrCupola commented 5 years ago

Last update I have GTFS R

The current API environment is no longer able to cope with the sheer volume of requests over a 24 hour period and that is why the NTA is building a new GTFS R environment to be scalable to future proof the open source data set.

This new GTFS R project is currently being developed by the NTA and I would hope to be able to confirm a proposed go live date over the coming weeks.

Fair Usage Unfortunately due to excessive repeat Real Time searches the open source API will have limited access until the new scalable GTFS R environment has been deployed in early 2019. Regards,