Skip to content

Commit

Permalink
add MQTT message formats and defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
kx1t committed Dec 3, 2024
1 parent d7716c4 commit e47df61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <tbd> | `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:

Expand Down
2 changes: 1 addition & 1 deletion rootfs/etc/s6-overlay/scripts/aiscatcher
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit e47df61

Please sign in to comment.