Simulates sensor readings (temperature and pH) from 3 fermentors and publishes them as MQTT messages every 3 seconds. The container runs a Mosquitto broker and the simulator together.
docker build -t fermentation-simulator .docker run -d --name fermentation-sim -p 1883:1883 fermentation-simulatordocker rm -f fermentation-simThe container exposes the Mosquitto MQTT broker on port 1883 (no authentication required).
| Setting | Value |
|---|---|
| Host | localhost |
| Port | 1883 |
| Protocol | MQTT v3.1.1 |
Subscribe to all fermentor topics with any MQTT client, for example using mosquitto_sub:
mosquitto_sub -h localhost -p 1883 -t "fermentors/#" -vOr subscribe to a specific metric:
mosquitto_sub -h localhost -p 1883 -t "fermentors/fermentor-1/temperature" -vfermentors/{fermentor_id}/temperature
fermentors/{fermentor_id}/ph
Payload:
{
"fermentor_id": "fermentor-1",
"metric": "temperature",
"value": 36.87,
"timestamp": "2026-03-03T10:00:02Z"
}