diff --git a/README.md b/README.md index 41ff8fd..28c4ba2 100644 --- a/README.md +++ b/README.md @@ -394,7 +394,7 @@ Shipfeeder supports sending AIS data to a MQTT broker. This is done by setting t | `AISCATCHER_MQTT_CLIENT_ID` | (Optional) `CLIENT_ID` value that is passed to the MQTT Broker. For example, `aiscatcher`. | Empty | | `AISCATCHER_MQTT_QOS` | (Optional) QOS (Quality of Service) value that is passed to the MQTT Broker. For example, `0`. | Empty | | `AISCATCHER_MQTT_TOPIC` | (Optional) MQTT Topic that is passed to the MQTT Broker. For example, `data/ais`. | Empty | -| `AISCATCHER_MQTT_MSGFORMAT` | (Optional) Message Format indicator for the messages passed to the MQTT Broker. The following values are supported: | `JSON_NMEA` | +| `AISCATCHER_MQTT_MSGFORMAT` | (Optional) Message Format indicator for the messages passed to the MQTT Broker. The following values are supported: `NMEA`, `NMEA_TAG`, `FULL`, `JSON_NMEA`, `JSON_SPARSE` `JSON_FULL` | `JSON_FULL` | Note - if you want to configure ShipFeeder to *receive* AIS data from a MQTT broker, you can do this by adding (for example) the following to the `AISCATCHER_EXTRA_OPTIONS` parameter: diff --git a/rootfs/etc/s6-overlay/scripts/aiscatcher b/rootfs/etc/s6-overlay/scripts/aiscatcher index 3ed580a..d33e3fe 100755 --- a/rootfs/etc/s6-overlay/scripts/aiscatcher +++ b/rootfs/etc/s6-overlay/scripts/aiscatcher @@ -329,7 +329,7 @@ if [[ -n "${AISCATCHER_MQTT_URL}" ]]; then if [[ -n "${AISCATCHER_MQTT_CLIENT_ID}" ]]; then aiscatcher_command+=("CLIENT_ID ${AISCATCHER_MQTT_CLIENT_ID}"); fi if [[ -n "${AISCATCHER_MQTT_QOS}" ]]; then aiscatcher_command+=("QOS ${AISCATCHER_MQTT_QOS}"); fi if [[ -n "${AISCATCHER_MQTT_TOPIC}" ]]; then aiscatcher_command+=("TOPIC ${AISCATCHER_MQTT_TOPIC}"); fi - if [[ -n "${AISCATCHER_MQTT_MSGFORMAT}" ]]; then aiscatcher_command+=("MSGFORMAT ${AISCATCHER_MQTT_MSGFORMAT}"); fi + aiscatcher_command+=("MSGFORMAT ${AISCATCHER_MQTT_MSGFORMAT:-JSON_FULL}") fi aiscatcher_command+=("$AISCATCHER_EXTRA_OPTIONS")