Publish icon

Machine Stop Event Simulator

Publish long-stop and micro-stop JSON events over MQTT to test the manufacturing downtime triage flow without a PLC.

Categories
Infrastructure

Publish a long stop and a micro-stop to the MQTT topic consumed by the downtime-root-cause-triage flow. This companion flow lets teams test both conditional paths without a PLC or production equipment.

How it works

  1. long_stop publishes a JSON event to plant/filler1/stops with a 7-minute duration. The triage flow should run AI analysis and send a Slack alert.
  2. micro_stop publishes a JSON event to the same topic with a 1-minute duration. The triage flow should log the event without running AI or sending an alert.
  3. Both tasks use QoS 1 so the broker acknowledges delivery.

What you get

  • Two representative MQTT payloads covering the long-stop and micro-stop branches.
  • A repeatable test path for the companion triage flow without a machine connection.
  • Separate client IDs and acknowledged MQTT publishes for the two events.

Who it's for

  • Teams setting up or reviewing the downtime-root-cause-triage blueprint.
  • Reliability engineers who want to verify MQTT integration before connecting production equipment.

Why orchestrate this with Kestra

The simulator uses the same Kestra MQTT task as the production flow's event-driven architecture, so operators can inspect each publish in execution history and reproduce test events without a separate script or PLC.

Prerequisites

  • A running MQTT broker reachable from the Kestra worker at tcp://host.docker.internal:1883, or update both task server values.
  • The downtime-root-cause-triage flow saved and listening on plant/+/stops.

Secrets

This simulator requires no secrets when used with the included local Mosquitto broker. Configure broker credentials in each MQTT task if your broker requires authentication.

Quick start

  1. Start the local broker with docker compose up -d from the kestra-dev directory.
  2. Save the triage flow in the company.team namespace and confirm its MQTT trigger is active.
  3. Execute this simulator flow.
  4. Confirm two triage executions arrive, the 7-minute event runs AI and sends one Slack alert, and the 1-minute event takes the logging branch.
  5. Check the downtime_log table for both events.

How to extend

  • Change the machine, line, reason code, or duration in either from map to match your event schema.
  • Add more publish tasks to exercise additional duration thresholds or machine topics.
  • Update the server and topic when using a different broker or triage-flow subscription.

Links

Tasks
Share this Blueprint
See How

New to Kestra?

Use blueprints to kickstart your first workflows.