MQTT RNV Publisher
A simple Rust application that publishes the RNV Live Station ticker into your MQTT Sever
Dependencies
- tokio (with full features)
- rumqttc
- serde
- serde_json
- clap
- chrono
- reqwest (with blocking)
Usage
cargo run -- --broker 192.168.1.100 --port 1883 --interval 60 --station Lettestr
Or run the binary directly:
./target/debug/mqtt-publisher --broker <address> --port <port> --interval <seconds> --station <name>
Arguments
--broker: MQTT broker address (default:localhost)--port: MQTT broker port (default:1883)--interval: Interval in seconds between departure data fetches (default:300)--station: Station name to look up (default:Lettestr)
MQTT Topics
The application publishes departure data to the following topics:
departure/station: Station namedeparture/outbound/station: Outbound destination stationdeparture/outbound/line: Outbound line number/namedeparture/outbound/diff: Seconds until outbound departuredeparture/inbound/station: Inbound destination stationdeparture/inbound/line: Inbound line number/namedeparture/inbound/diff: Seconds until inbound departuredeparture/failure: Error message if data fetch fails
Configuration
Edit src/main.rs to customize:
- Broker address (default:
localhost:1883) - MQTT topic (default:
test/topic) - Message payload
Description
Languages
Rust
100%