MQTT Integration¶
AIS-catcher
-Q
url
[setting value]
...
AIS-catcher can push AIS messages via the MQTT protocol (3.1.1) to a broker with the -Q
switch. An example with all settings:
AIS-catcher -Q mqtt://username:password@127.0.0.1:1883 CLIENT_ID aiscatcher QOS 0 TOPIC data/ais MSGFORMAT JSON_NMEA
More examples: ```bash # Basic MQTT connection AIS-catcher -Q mqtt://127.0.0.1:1883
# WebSocket MQTT connection AIS-catcher -Q wsmqtt://127.0.0.1:1883
# With message format and topic AIS-catcher -Q mqtt://127.0.0.1:1883 admin MSGFORMAT JSON_FULL TOPIC data/ais
# With authentication and client ID AIS-catcher -Q mqtt://username:password@127.0.0.1:1883 admin CLIENT aiscatcher ```
Summary Settings¶
Key | Type | Default | Description |
---|---|---|---|
URL | string | - | MQTT broker URL (mqtt[s]://[user:pass@]host[:port]) |
HOST | string | - | MQTT broker hostname |
PORT | string | - | MQTT broker port |
USERNAME | string | - | MQTT username |
PASSWORD | string | - | MQTT password |
TOPIC | string | ais/data | MQTT topic |
CLIENT_ID | string | - | MQTT client identifier |
QOS | integer | 0 | MQTT QoS level (0-2) |
MSGFORMAT | string | NMEA | Output format (NMEA/JSON_NMEA/JSON_FULL) |
PROTOCOL | string | MQTT | Protocol (MQTT/WS/WSMQTT) |
WebSocket Options | |||
PROTOCOLS | string | mqtt | WebSocket sub-protocols |
BINARY | boolean | on | Enable binary WebSocket mode |