OneBusAway Binding

OneBusAway is an open source, real-time, transit-information service. This binding allows you to get events based on transit arrival and departures, so you can create rules to do something based on that data.


You'll need to obtain an API key from the transit provider you want to load data from. Different providers of the service have different policies, so you'll have to figure this part out for each deployment.

Supported Things

This binding supports route arrival and departure times for all stops provided from a OneBusAway deployment.

Binding Configuration

The following configuration options are available for the API binding:

apiKeyAPI KeyThe API key given to you by a transit provider for their deployment.yes
apiServerAPI ServerThe domain name of the deployment to talk to, e.g.

The following configuration options are available for the Stop binding (which requires an API binding):

stopIdStop IDThe OneBusAway ID of the stop to obtain data for, e.g. 1_26860.yes
intervalUpdate IntervalThe number of seconds between

Thing Configuration

The following configuration options are available for a Route (which requires a Stop binding):

routeIdRoute IDThe OneBusAway ID of the route to obtain data for, e.g. 1_102574.yes


The Route Thing supports the following state channels:

Channel Type IDChannel KindItem TypeDescription
arrivalstateDateTimeThe arrival time of a Route at a Stop.
departurestateDateTimeThe departure time of a Route at a Stop.
updatestateDateTimeThe last time this data was updated (per the data provider, not the last time OpenHAB updated the data).
arrivalDeparturetriggerDateTimeTriggered when a Route arrives or departs a Stop.

Channel Configurations

The arrival, departure, and arrivalDeparture channels can be configured with an offset specifying the number of seconds to move an event back in time.

Full Example

Here's an example of a configuration for a bus stop in Seattle, WA, USA that has three routes configured.


Bridge onebusaway:api:pugentsound [apiKey="your-api-key", apiServer=""] {
  Bridge onebusaway:stop:1_26860 [stopId="1_26860"] {
    Thing onebusaway:route:1_100193 [routeId="1_100193"]
    Thing onebusaway:route:1_102574 [routeId="1_102574"]
    Thing onebusaway:route:1_100252 [routeId="1_100252"]


// Route 1_100193 (#32)
DateTime Fremont_32_Arrival "32 - University District" { channel="onebusaway:route:1_100193:arrival" }
DateTime Fremont_32_Departure "32 - University District" { channel="onebusaway:route:1_100193:departure" }

// Route 1_102574 (#40)
DateTime Fremont_40_Arrival "40 - Ballard" { channel="onebusaway:route:1_102574:arrival" }
DateTime Fremont_40_Departure "40 - Ballard" { channel="onebusaway:route:1_102574:departure" }

// Route 1_100252 (#62)
DateTime Fremont_62_Arrival "62 - Sand Point East Green Lake" { channel="onebusaway:route:1_100252:arrival" }
DateTime Fremont_62_Departure "62 - Sand Point East Green Lake" { channel="onebusaway:route:1_100252:departure" }