Skip to content

Commit

Permalink
Add documentation about MQTT chain
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Dec 13, 2024
1 parent 893c0d1 commit 01982b9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/vehicle-positions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### Vehicle positions

The vehicle positions are sent to Digitransit through a chain of services which are drawn in the following
diagram:

![vehicle positions diagram](vehicle-positions.md)

Originally, the data is provided by VVS and picked up by a GTFS-RT-to-MQTT bridge. This then
publishes the data onto a MQTT broker (Mosquitto) which makes them available through a series
of topics.

Digitransit can cannot to the MQTT broker via Websockets and subscribe to the data. Depending
on the exact poll frequency, it may take a few seconds until data really appears in the app.

If you want to look at the raw MQTT topic you can do the following:

```sh
npm install -g mqtt
mqtt subscribe -h vehiclepositions.stadtnavi.eu -p 443 -l wss -v -t "#" -i my-client
```
Binary file added docs/vehicle-positions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 01982b9

Please sign in to comment.