https://github.com/albrechtl/hass-padersprinter
A Padersprinter Home Assistant custom component
https://github.com/albrechtl/hass-padersprinter
custom-component home-assistant integration paderborn
Last synced: about 2 months ago
JSON representation
A Padersprinter Home Assistant custom component
- Host: GitHub
- URL: https://github.com/albrechtl/hass-padersprinter
- Owner: AlbrechtL
- License: mit
- Created: 2024-12-19T08:53:25.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-08-12T14:30:18.000Z (10 months ago)
- Last Synced: 2025-08-12T16:27:10.559Z (10 months ago)
- Topics: custom-component, home-assistant, integration, paderborn
- Language: Python
- Homepage:
- Size: 253 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Padersprinter Home Assistant sensor
This sensor uses official API provided by Padersprinter in Paderborn, Germany.

Thanks to [Piotr Machowski](https://github.com/PiotrMachowski) who implemented the [MPK Kraków sensor](https://github.com/PiotrMachowski/Home-Assistant-custom-components-MPK-KR). Obviously, Kraków, Poland is using the same information system as Paderborn.
## Example usage
```
sensor:
- platform: padersprinter
stops:
- id: 1000 # Hauptbahnhof
lines:
- "1"
- id: 1001 # Westerntor
mode: arrival
directions:
- "Gesseln"
```
Value for `id` can be retrieved from [*stations.md*](https://github.com/AlbrechtL/hass-padersprinter/blob/master/stations.md).
#### Configuration options
| Key | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | `string` | `False` | `Padersprinter` | Name of sensor |
| `stops` | `list` | `True` | - | List of stop configurations |
#### Stop configuration
| Key | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `id` | `positive integer` | `True` | - | ID of a stop. See [*stations.md*](https://github.com/AlbrechtL/hass-padersprinter/blob/master/stations.md) |
| `mode` | `string` | `False` | `departure` | One of `departure` or `arrival` |
| `name` | `string` | `False` | id | Name of a stop |
| `lines` | `list` | `False` | all available | List of monitored lines. |
| `directions` | `list` | `False` | all available | List of monitored directions. |
## Dashboard
These sensors provides attributes which can be used in [*HTML card*](https://github.com/PiotrMachowski/Home-Assistant-Lovelace-HTML-card) (recommend install via HACS): `html_timetable`, `html_departures`
* HTML card:
```yaml
type: custom:html-card
title: Bus Hauptbahnhof
content: |
Abfahrt lt. Fahrplan
[[ sensor.padersprinter_1000_departure.attributes.html_timetable ]]
Echtzeit Abfahrten
[[ sensor.padersprinter_1000_departure.attributes.html_departures ]]
```
## Installation
You can install manually or by using [HACS](https://hacs.xyz/) (the easier way).
#### HACS
1. Go to `HACS`
2. Search for `Padersprinter`
#### Manual
To install this integration manually you have to download [*padersprinter.zip*](https://github.com/AlbrechtL/hass-padersprinter/releases/latest/download/padersprinter.zip) and extract its contents to `config/custom_components/padersprinter` directory:
```bash
mkdir -p custom_components/padersprinter
cd custom_components/padersprinter
wget https://github.com/AlbrechtL/hass-padersprinter/releases/latest/download/padersprinter.zip
unzip padersprinter.zip
rm padersprinter.zip
```
## Padersprinter API
* Get current bus information per station in JSON format
```
curl 'https://www.padersprinter.de/internetservice/services/passageInfo/stopPassages/stop' -X POST --data-raw 'stop=1000'
```
* Get all Padersprinter stations in JSON format
```
curl 'https://www.padersprinter.de/internetservice/geoserviceDispatcher/services/stopinfo/stops' -X POST --data-raw 'left=-648000000&bottom=-324000000&right=648000000&top=324000000'
```
* Get current bus locations
```
curl 'https://www.padersprinter.de/internetservice/geoserviceDispatcher/services/vehicleinfo/vehicles' -X POST
```
## Acknowledgement
I would like to thanks to following projects. Without these great work this Padersprinter Home Assistant component would not be possible.
* [MPK Kraków sensor](https://github.com/PiotrMachowski/Home-Assistant-custom-components-MPK-KR)
* [Kraków TTSS-documentation](https://github.com/Delay-Team/Cracow-Public-Transport-Dashboard/wiki/TTSS-documentation)
* https://aczepielik.github.io/post/kraktram/