Operations
Health checks
bash
modbus-mqtt-bridge --healthcheck --config config/config.ymlContainer command:
bash
/modbus-mqtt-bridge --healthcheck --config /app/config/config.ymlThe healthcheck validates:
- config parsing/validation
- TCP reachability to the configured MQTT host and port
Logging
Enable JSON logs in config:
logging.json: trueOverride log level with environment:
bash
RUST_LOG=debug modbus-mqtt-bridge --config config/config.ymlUseful values: trace, debug, info, warn, error.
Safe config rollouts
- Validate edited config locally with
--healthcheck. - Restart bridge.
- Verify state publish topics and
/setwrite topics. - Watch logs for
timeout,decode, orpayloaderrors.
Runtime behavior notes
- Each source polls independently, so one slow endpoint should not block others.
- Read failures are logged and retried in subsequent poll cycles.
- MQTT reconnect behavior runs continuously in the event loop.