A Home Assistant custom integration that connects to MyBusStop to track your bus and display real-time location data across all your routes.
- Automatic Route Discovery: Automatically discovers all available bus routes from your MyBusStop account
- Single Bus View: One unified bus sensor and tracker that intelligently shows the active route
- Route Status Sensor: Overview sensor showing all routes and their current status
- On-Demand Updates: Manual polling via service call - you control when to fetch bus location
- Daily Route Discovery: Configurable scheduled check for new routes (e.g., Friday-only routes)
- Multi-Route Support: Polls all routes but displays the most recently active one
- Home Assistant with HACS installed
- MyBusStop account credentials (username/email and password)
-
Add Custom Repository to HACS:
- Open Home Assistant and go to Settings → Devices & Services → HACS
- Click the three-dot menu (⋮) in the top right and select Custom repositories
- Paste the repository URL:
https://github.com/briodan/mybusstop - Select Category:
Integration - Click Create
-
Install the Integration:
- In HACS, search for "MyBusStop"
- Click on the integration and select Install
- Restart Home Assistant
-
Add the Integration to Home Assistant:
- Go to Settings → Devices & Services → Integrations
- Click Add Integration (or the + button)
- Search for "MyBusStop"
- Enter your MyBusStop credentials:
- Username/Email: Your MyBusStop login email
- Password: Your MyBusStop password
- Click Submit
- The integration will automatically discover all routes available in your account
-
Verify Setup:
- Home Assistant will discover all available routes from your account
- You should see the following entities:
sensor.mybusstop_bus- Current bus informationsensor.mybusstop_routes- All routes statusdevice_tracker.mybusstop_bus- GPS location tracker
- Check Developer Tools → States to view these entities
-
sensor.mybusstop_bus— Displays the current bus number from the most recently active route- State: Bus number (e.g., "Bus 42")
- Attributes:
current_route_id- The route ID currently being displayedcurrent_route_name- Name of the current routelatitude- GPS latitudelongitude- GPS longitudecheckin_time- Last check-in timelast_seen- Last seen timestamptimezone_offset- Timezone offset
-
sensor.mybusstop_routes— Overview of all discovered routes- State: Count of routes (e.g., "2 routes")
- Attributes:
routes- Dictionary containing all routes with their status, name, last_seen, and bus_number
device_tracker.mybusstop_bus— Tracks the real-time GPS location of the active bus- Location: GPS coordinates from the most recent route
- Attributes:
current_route_id- The route ID currently being trackedcurrent_route_name- Name of the current routebus_number- Bus identifiercheckin_time- Last check-in timelast_seen- Last seen timestamptimezone_offset- Timezone offset
Manually poll the MyBusStop API to update bus location and status. Since automatic polling is disabled, use this service to fetch fresh data.
Parameters:
route_id(optional): Specific route ID to update. If not provided, all routes will be updated.
Examples:
# Update all routes
service: mybusstop.update_bus_location
# Update specific route
service: mybusstop.update_bus_location
data:
route_id: "103427"Automation Example:
automation:
- alias: "Update bus location before pickup"
trigger:
- platform: time
at: "08:00:00"
action:
- service: mybusstop.update_bus_locationAfter initial setup, you can configure when the integration checks for new routes:
- Go to Settings → Devices & Services → Integrations
- Find MyBusStop and click Configure
- Set Daily route discovery time (HH:MM format, 24-hour)
- Default:
02:00(2:00 AM)
- Default:
The integration will check for new routes at this time every day and automatically add any newly discovered routes (e.g., Friday-only routes).
- Login: Uses your MyBusStop credentials to authenticate
- Route Discovery: Automatically parses the account to extract all available bus routes
- On-Demand Polling: No automatic polling - you control updates via service calls
- Intelligent Aggregation: When multiple routes exist:
- All routes are polled when the service is called
- The sensor and tracker show data from the route with the most recent
last_seentimestamp - This ensures you always see the currently active bus, even if it switches routes
- Daily Route Check: Runs once daily at your configured time to discover new routes
This usually means one of the following:
- Invalid credentials: Double-check your MyBusStop username/password
- No routes found: Ensure your account has at least one active route
- Network issue: Check your internet connection and MyBusStop website availability
- Check Home Assistant logs for errors: Settings → System → Logs (filter for
custom_components.mybusstop) - Verify your account has at least one active route
- Ensure the integration is fully loaded (check Settings → Devices & Services → Integrations)
The entities start with no data until the first service call is made:
- Call
mybusstop.update_bus_locationservice manually - Or set up an automation to call it periodically
- The integration fetches initial data on setup, but may need a manual refresh
If latitude/longitude are empty (None), the bus may not have checked in yet or the tracker may be offline. The device tracker will be unavailable until valid coordinates are received.
If you'd like to contribute or modify this integration:
- Clone the repository
- Copy
custom_components/mybusstopto your Home Assistantconfig/custom_components/directory - Restart Home Assistant to load the integration
- Make your changes and test in a development Home Assistant instance
This integration is provided as-is for personal use with MyBusStop. Use at your own risk.
For issues, feature requests, or bug reports, please visit the GitHub Issues page.