Features

This shortcut lets you get bus arrival times at a bus stop, and it finds bus stops near you based on your location.

User Friendly and informative: The shortcut tells you exactly what you need, that is, when the bus will come, and whether you should take that, or wait for the next one, as it warns you if the bus is crowded or wheelchair-inaccessible. And getting to this information is easier than ever, with good Siri support. It even has a mode where the result is displayed in a large font so it is easy to read even when there is a lot of buses.

Easy set up: The shortcut is preset to work beautifully even without setting up anything. Unlike other shortcuts, Bus arrivals dosen't need you to preset a few bus stops that it is able to get arrival information for. Instead, it allows you to both preset, as well as search for bus stops near you, so you can get bus arrival information whereever you are. And you can still customise how the shortcut runs, giving you greater control on the shortcut and making it work for you.

Powerful: Choose between a basic or detailed mode, and how to search for a bus stop: preset bus stop codes, entering a bus stop code every time or by location. And the shortcut integrates with Apple Maps too: share to the shortcut a location in Singapore and it searches the area for bus stops, whuch you can then get bus arrival information for.

Some features require an LTA API key, which you can get very easily at mytransport.sg

This shortcut requires an internet connection, and iOS 14 or later.

How to install on iOS 14

If you have never downloaded shortcuts from the internet before, follow these steps:

  1. Open the shortcuts app
    Open Shortcuts for me...Opens in Shortcuts. Works only on iOS and iPadOSOpens in Shortcuts. Works only on iOS and iPadOS
  2. Run any shortcut you have. If you don't have any, you can get them from the Gallery. Pick any shortcut and run it.
  3. After it is run, go to Settings > Shortcuts and turn on Allow Untrusted Shortcuts. You will need to enter your passcode.

When Allow Untrusted Shortcuts is turned on, you can now download shortcuts from the internet. Next, you need to install and set up the shortcut.

  1. Click the download button above on your iPhone or iPad, and it should import the shortcut into the Shortcuts app. If you land at an iCloud webpage, click "Get Shortcut".
  2. Scroll to the bottom of the shortcut preview and continue by clicking Add Untrusted Shortcut.
  3. You will then be prompted to configure your shortcut. See Setting Up Your Shortcut below.

The shortcut is now set up.

Documentation below as of Release 12

Setting up Bus Arrivals

When you first run the shortcut, you will be taken through the set up process. First you will be asked whether you have an LTA API key. This key is needed to connect to LTA's APIs to get information from LTA. This unlocks features like train service disruption warnings and greater bus route details. If you don't have an API key, the shortcut will use alternative methods to get information. You don't lose too much detail without the API key, but whether you want to go get a free API key is up to you.

Then, you will be asked about saving bus stops. You can preset these bus stops to always appear on the bus stop selection menu. This allows you to quickly access frequently used bus stops even when you're not near it.

How to use this shortcut

This shortcut first gathers bus stops you would probably be searching for (by using your location, or from preset bus stops, Maps input or Shortcut input) and presents them in a menu. Then you can select a bus stop, or manually enter a bus stop code, and get bus arrival times for routes at that bus stop. Easy.

By default, the shortcut will automatically search for nearby bus stops when you run it. You can also preset bus stops to always appear on the bus stop selection menu in the Shortcut Details, under Import Questions. This allows you to quickly access frequently used bus stops even when you're not near it. As a backup, you can also manually enter a bus stop code using the Enter a Bus Stop Code option in the bus stop selection menu.

Quick tip: You can preset bus stops for Apple Watch while setting up, and have your iPhone ignore the preset bus stop codes with the &L setting (see Settings below).

After selecting or entering a bus stop, the shortcut will get the bus arrival information over the internet. If you have an API key, the shortcut will get data from LTA at datamall2.mytransport.sg. Otherwise, it will get data from the ArriveLah API at arrivelah2.busrouter.sg. The LTA data is more detailed than ArriveLah, but you'll need an API key from LTA.

In the results, you may see the following symbols:

  • 👤(“Silhouette of person”) means that the bus is slightly crowded with standing room only.
  • đź‘Ą (“Silhouette of two people”)means the bus is very crowded with limited space available.
  • (♿︎!) (“wheelchair symbol”) means the bus is not wheelchair accessible.
  • (Stop #2) means the bus is stopping here for the second time on its route. See the route information board at the bus stop for details.
  • (Last Stop: ) means this bus terminates before the terminus of the route it is on. See the route information board at the bus stop for details.

Note that only routes in operation are shown.

Features and tips

With an API key, the shortcut can check for train service disruptions, and an option to learn more about any current disruptions will appear in the bus stop menu if regular service is being disrupted.

You can add a Shortcuts widget in Today View to quickly run the shortcut from the lock screen, even when your iPhone is locked. Or, you could make Siri run the shortcut and read the results back, which can be useful with AirPods for example, where you can say "Hey Siri, run Bus arrivals" and Siri reads back the bus arrivals at your stop without you taking out your phone.

The shortcut accepts locations and text as input. You can pass a location or a string text containing setting codes or bus stop codes (separated by spaces) to the shortcut and the shortcut will search for bus stops near the location or add the bus stops to the bus stops menu or apply the settings passed depending on what the input was. Because the shortcut accepts locations as input, you can share a location from the Maps app, for example, and the shortcut will find nearby bus stops around that location. This way, you can get bus arrival information from anywhere.

Files and data usage

The shortcut requires access to iCloud to store files needed for te shortcut to run. (All Shortcuts are only allowed to store files in iCloud or Dropbox). The files take up less than 1 KB of space. Because the shortcut requires iCloud access, you need to ensure you are signed in to iCloud and the iCloud setting for Shortcuts is turned on.

If there is an issue with shortcut updates or settings, you can delete the files in iCloud > Shortcuts > Bus arrivals, and the shortcut will regenerate them when you run the shortcut again. There is also the Reset Shortcut Files option in the Shortcut Options menu that deletes all the shortcut's files, including unnecessary ones from previous versions.

If you have issues with iCloud, for example if you disallow iCloud to download files while on mobile data, the shortcut will run on default settings and disable API key features. In such an event, you might see the shortcut get stuck at about a third of the way; you should stop the shortcut and re-run.

All other required files are requested over the internet. These files include bus stop information files which are updated periodically.

Shortcut Settings

You can customise hoe the shortcut runs and display results by applying settings. To do so, you can set the settings from the Shortcut Options menu, or pass them in a text string as shortcut input. Settings set from the Shortcut Options menu are saved and will be applied every time the shortcut is run on iPhone or iPad.

The settings avaliable are:

  1. &A causes the shortcut to show the results in an easy to read format with big fonts. Will require you to unlock your phone when run. Breaks interactions with Siri. (Only in Release 10 and newer)
  2. &B <XXXX> causes the shortcut to only return the arrival information for the specified bus service. When applying it through a text string, it is applied like so: &B <XXXX>, where XXXX is the bus service number, which must be enclosed in "< >" and put behind the &B after a space. Only works with an LTA API key.
  3. &d causes the shortcut to never show the destination of the buses. By default the destination of the next bus is shown.
  4. &L causes the shortcut to ignore preset bus stops on iPhone and iPad.
  5. &m causes the shortcut to not check for train service disruptions. This setting only works when the shortcut is running with an API key.
  6. &P causes the shortcut to not use the nearby bus stop finder and ask for a bus stop code instead. If you want to use the nearby bus stop finder or access the Shortcut Options menu when &P is enabled, you can enter "0" as the bus stop code. If you want to permanently disable this setting, you need to delete the Settings file or overwrite it in the SHortcut Options.
  7. &Q <X> changes the search radius of the nearby bus stop finder. Each 1 unit represents 0.001 longitude and 0.001 latitude, and the default is 1, which causes the shortcut to search a 0.003 by 0.003 square centred on you. When applying it through a text string, it is applied like so: &Q <X>, where X is the search radius, which must be enclosed in "< >" and put behind the &B after a space.
  8. &S causes the shortcut to return the regular, less detailed bus arrival information you get when there is no API key.
  9. &T causes the shortcut to show the type of each bus (single decker, double decker or beding bus).
  10. &u causes the shortcut to not check for updates.

When you run the shortcut from the Shortcuts app, the Shortcuts widget, a Shortcuts bookmark or from Siri, the shortcut will run based on the settings and preset bus stops you have set. However, you can ask the shortcut to run with another set of settings or preset bus stops, by provide the settings or preset bus stops as a text input. In the available settings described earlier, each setting has it’s own code (e.g. &A). You can input these codes to enable the corresponding settings. There are also special codes for inputs you can use:

  1. &0 causes the shortcut to ignore all settings saved. If you do not add this, the shortcut will combine the input settings with the settings already set.
  2. &X <1> causes the shortcut to only run the nearby bus stop finder and return the bus stop codes of nearby bus stops in an array. Useful for integrating with other shortcuts.
  3. &X <2> causes the shortcut to not display the bus arrival times and pass it as shortcut output instead. The output may be text or rich text depending o whether &A is enabled. USeful for integrating with other shortcuts.

Example:

&S &Q <2> &m

This causes the shortcut to return less detailed bus arrival information (&S), change the nearby bus stop finder search radius to a 0.004 by 0.004 square (&Q <2>), and not get train disruption information (&m).

About this shortcut and your privacy

Hydralynx takes your privacy very seriously. Below is an explanation of the permissions the shortcut will ask for:

  • The shortcut will ask for iCloud Drive access to write files to the iCloud Drive > Shortcuts folder. It will create a folder called Bus arrivals and save all the necessary files there. It does not access other folders.
  • The shortcut will ask for access to your location to be able to find nearby bus stops. The location information is not sent by the shortcut off your device, and is only processed by the shortcut. Because iOS and iPadOS manages permissions by the app, and Shortcut also manages permissions per shortcut, you need to enable location services for the Shortcuts app and then allow Bus Arrivals to access your location as well.
    Also, a note on location: because the bus stop code of the bus stop you are getting bus arrival information for is sent to LTA or ArriveLah to retreive bus arrival information, LTA or ArriveLah may be able to use the bus stop code as a proxy to your location.
  • The shortcut will ask to access electhrinodocs.netlify.app. That is Hydralynx's website. The shortcut need to access the website to download bus stop information like its name and the locations of bus stops, which are necessary for the shortcut to run.
  • The shortcut will ask to access routinehub.co. That is RoutineHub's website. The shortcut need to access the website to check whether updates are avaliable, and information about new versions when it is.
  • The shortcut may ask to access arrivelah2.busrouter.sg. That is ArriveLah's website. The shortcut need to access the website to get bus arrival information if you don't have an LTA API key, or if &S is applied.
  • The shortcut may ask to access datamall2.mytransport.sg. That is LTA's website. The shortcut need to access the website to get bus arrival information and train disruption information if you have an LTA API key.
  • The shortcut will ask to access other shortcuts. This is to allow the shortcut to trigger itself again for a smoother user experience for you. It does not run any other shortcuts.

Connections to websites may expose your IP address to the servers handling your request.

Acknowledgements

The shortcut is hosted on routinehub.co, which is run by Harley Hicks. Updates are checked for using RoutineHub's API

Data sourced from the ArriveLah API, which is hosted on GitHub by cheeaun. See License.

Data sourced from the Land Transport Data Mall APIs, which is managed by the Land Transport Authority, Government of Singapore. Data is protected by copyright by the Government of Singapore.