My wife wrote a book - The Mystery of the Cursed Elves (The Magic Cube Book 1) -


Short version – Wrote 2 Powershell commands for finding LUAS times; They can be found on GITHUB. They use 2 web sources., One scrapes and the other makes REST calls to

More words version with pictures

When we first moved Dublin and started relying on the LUAS for transportation we started checking the times when trains were leaving our stop to work out when to leave the house. Opening a webpage, and clicking on things is like oh my gosh way too much work. I wanted to write a script to run in loop and display times on the Kitchen computer. First time I wrote this I used Fiddler to workout how the page was calling the times and wrote a one liner. The oneline is below broken at the semicolons

write-host -ForegroundColor yellow "Last run" (get-date -Format HH:mm:ss);
$I =Invoke-WebRequest -uri "";
($i.ParsedHtml.childNodes | select innerText).innertext;
write-host -ForegroundColor red "Next run" (get-date (get-date).AddSeconds(30) -Format HH:mm:ss);
start-sleep -seconds 30}while ($a=1)


A month or two later I finally found a REST endpoint for BUS and LUAS train data. I used the REST source to write a powershell command around calling The powershell command made the oneliner to loop a bit shorter

write-host -ForegroundColor yellow "Last run" (get-date -Format HH:mm:ss);
Get-LuasTimes -StopID LUAS38 |  ? {$_.origin -like "*brid*"} | fl destination,duetime;
start-sleep -seconds 30}while ($a=1)

When the new stops opened up on the green line in December of 2017 sadly the stops did not show up at my REST data source –

Today is a slow day around the house; I figured I’d add another powershell command to extract the stop information from LUAS.IE in addion to dublinked.  The php webpage at requires case sensitive properly spaced stop name. I scraped all of the stop names from the website vis fiddler and built a JSON blob The Blog has short names and long names in it. The command takes short names and converts them to the properly formated long name in the URL request.


I checked both commands into GITHUB feel free to use them.

Leave a Reply

One thought on “LUAS REST Access”

%d bloggers like this: