Skip to content
A MagicMirror module that displays San Francisco MUNI Rail and Bus times for the given stops
JavaScript CSS
Branch: master
Clone or download
Latest commit e902184 Feb 7, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Feb 6, 2019
LICENSE Initial commit Feb 6, 2019
MMM-SFMuniBusTimes.css First commit Feb 7, 2019
MMM-SFMuniBusTimes.js First commit Feb 7, 2019 Add badges Feb 8, 2019
node_helper.js Enable auto updating of schedule Feb 7, 2019
package-lock.json First commit Feb 7, 2019
package.json First commit Feb 7, 2019
screenshot.png Add screenshot Feb 7, 2019

dependencies Status Module Version Project Status GNU GPLv3 License Known Vulnerabilities


This module gets the schedule of San Francisco's MUNI Bus / Rail for any given stop. It displays how long the next 3 busses or trains will take to arrive (in minutes), with the closest one showing the seconds until it's arrival as well.

Table Of Contents


Screenshot of the module


  1. Navigate to the modules directory within your MagicMirror installation and run the following command to clone the repository: git clone
  2. Inside the MMM-SFMuniBusTimes directory, run the following command to install all dependencies: npm install
  3. Edit your MagicMirror config file located at [MagicMirror]/config/config.js and add the following piece of code inside the modules array to enable the module. Check out the Configuration section for more information on how to properly configure the module.
 module: "MMM-SFMuniBusTimes",
 position: "top_right",
 config: {
   stops: {
     6994: ["J", "KT", "L", "M", "N"],
     3328: ["33"],
   updateInterval: 1000,


Config Description
position The location of the module in which the module will be loaded. Possible values are top_bar, top_left, top_center, top_right, upper_third, middle_center, lower_third, bottom_left, bottom_center, bottom_right, bottom_bar, fullscreen_above, and fullscreen_below.
config>stops This is an object that contains the stop IDs as key and an array of route IDs as the value. See below for instructions on how to find your stop and route IDs.
updateInterval This is the amount of time in ms that the module will wait before calling the API and updating the schedule.

For a list of routes, go to the following URL

You will see each route is displayed in the following format: <route tag="F" title="F-Market & Wharves"/>. The title contains the actual route name, and the tag denotes the route ID.

For a list of stops on a route, go to the following URL<ROUTE_ID> (Replace <ROUTE_ID> with the appropriate route ID found in the URL mentioned earlier).

You will see each stop displayed in the following format <stop tag="6293" title="Sacramento St & Cherry St" lat="37.7869099" lon="-122.45656" stopId="16293"/>. Just like the route information seen earlier, the title denotes the actual stop name and the tag denotes the stop ID. Although there is a separate stopId property as seen above, we actually want what's inside the tag property.

Make sure you have the correct stop, as some stations have different IDs for Inbound and Outbound directions. For example:

<stop tag="5731" title="Montgomery Station Inbound" lat="37.7886999" lon="-122.40192" stopId="15731"/>
<stop tag="6994" title="Montgomery Station Outbound" lat="37.78879" lon="-122.4021299" stopId="16994"/>

The NextBus API that is being used here is free and open to the public, and does not require that you obtain an access key. If you are interested in learning more about the API, have a look at its documentation here:


Would you like to contribute to this module? Well you are more than welcome to! Clone this repo and make your changes, and submit your pull request.

Have any feature suggestions or bug reports? Submit them here and I will check them out!

You can’t perform that action at this time.