2026-02-28 22:02:00 +01:00
2026-02-27 18:59:46 +01:00
2026-02-27 21:37:07 +01:00
2026-02-28 21:45:50 +01:00

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 name
  • departure/outbound/station: Outbound destination station
  • departure/outbound/line: Outbound line number/name
  • departure/outbound/diff: Seconds until outbound departure
  • departure/inbound/station: Inbound destination station
  • departure/inbound/line: Inbound line number/name
  • departure/inbound/diff: Seconds until inbound departure
  • departure/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
No description provided
Readme 72 KiB
Languages
Rust 100%