index.adoc 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. [#human-in-the-control-loop]
  2. = Human in the Control Loop
  3. This solution shows a simple control-panel pattern where a human operator sees live status on a dashboard and decides when to run an action.
  4. A hidden background action keeps the displayed status up to date, while the dashboard only shows the operator control you want them to use.
  5. image::solutions/human-in-the-control-loop/preview.png[]
  6. == How it works
  7. * **Pump ON - 5m** is the only visible action on the dashboard. The operator starts the pump when they choose.
  8. * **Update Water Level** is a xref:action_execution/triggers.adoc[hidden] action that runs on startup and on a schedule. It prints dummy output (`Water level 47%`) that OliveTin keeps in the action logs.
  9. * A xref:dashboards/5-output-views.adoc[most recent execution] dashboard component shows the latest output from **Update Water Level**, so the operator always sees the current reading without clicking a refresh button.
  10. When the pump action finishes, it xref:action_execution/triggers.adoc[triggers] **Update Water Level** so the displayed value can be refreshed after manual control.
  11. == Configuration
  12. [source,yaml]
  13. .`config.yaml`
  14. ----
  15. include::example$solutions/human-in-the-control-loop/config.yaml[]
  16. ----
  17. == Customising this pattern
  18. * Replace the dummy `echo` commands with scripts that read real sensors or call your APIs.
  19. * Change the cron schedule on **Update Water Level** to match how often the status should refresh.
  20. * Add ACLs if only certain users should see the dashboard or run the pump action.
  21. == See also
  22. * xref:dashboards/5-output-views.adoc[Most recent action output]
  23. * xref:action_execution/oncron.adoc[Execute on schedule (cron)]
  24. * xref:action_execution/onstartup.adoc[Execute on startup]
  25. * xref:action_execution/triggers.adoc[Triggers]