Open roata opened 4 years ago
Can we get state.station
from MQTT ?
For station panels we can split frontend, and use webstomp.
Hmm, at the moment it is not available over MQTT. I will make it happen and write about it tonight.
Note, however, that this feature request is for milestone 3.0, so - in the future. At the moment our top priorities are route-multi-subscription and the performance issues #76. It is getting unusable on my phone, and sometimes even on my computer.
@iamandrewluca, I forgot about this, but stumbled upon it today. The ETAs are now exposed to the public via MQTT as well, here's how it works: mosquitto_sub -h opendata.dekart.com -p 1945 -t state/infopanel/+
Payload example:
{"route": 30, "station": "Aeroport - pornire", "time": "2"}
vehicles.csv
and routes.csv
) route
- human-readable route name (not route_upstream_id
! - this might have to be reconsidered), the ETA for which is sentstation
- human readable name of the station, might be removed in the future, once we have a dictionary of station IDs and namestime
- the time, in minutes, until the next vehicle of the given route will arrive to this station.The format is a draft and will be changed, based on feedback. The payloads may contain other elements - don't count on those.
This could be relevant, since the bus telemetry also uses MQTT: https://github.com/roataway/gtfs-data/issues/5
Currently we use an API that was not documented officially, the one that runs on top of WebSTOMP. The new API, documented in api-documentation is using MQTT and is more reliable (it runs on a separate server, and it works even when RabbitMQ is down).
The payload formats are the same, and the subscription logic is the same too.
What is different:
.
separators, MQTT uses slashes/
transport.telemetry.*
becomestransport/telemetry/*