It's not a good thing but Septa trains are known to be late. And,
when they are late, they are really late.
I'm no train engineer and I do understand things happen but what frustrates me the most is Septa's lack of a contingency plan.
When you are on the platform, communicating and keeping everyone informed is definitely not Septa's strongpoint. Yes, there is an app but lately, that has become useless.
And how awesome would it be, if there is an app/ a service out there, that notifies me if my trains are running, without me even checking?
So that's exactly what I did. With a little help from above-mentioned components, I made a simple checker that texts me if my trains are running late.
Quick run downA Page, hosted in Firebase
, is set to refresh every 5 mins. On re-load, it gets Septa train data from this API found here and my trains from AirTable
(Trains table).
Page then processes all that data.
Depending on the time of the day (morning or evening) it checks if my trains running late for any reason.
According to the set late threshold, if the trains are running late, it first writes that train late info into another table in AirTable
(LateTrains table) and makes an entry in FireBase
. Also, w/ the use of cloudBit
this triggers LittleBit
's Buzzer
to go off and LED light
to turn on.
Now comes Zapier
, which runs every 15 mins checks entries in the above mentioned, LateTrains table. If there are any entries in there, Zapier then sends out a text.
Note: To make sure data in LateTrains table is accurate and up-to-date at the time page refreshes it deletes entries in this table.
That's pretty much it.
Language used : Angularjs
w/ REST
api(s), json
Take look at the work-flow and then the code repository, inner working is easier to understand.
Comments