NEWS
[New Adapter] statechart - build state machines graphically
-
Hi everyone,
I'd like to introduce my adapter ioBroker.statechart and I'm looking for testers before it goes into the beta repository.
Many automations are really state machines: the light is on or off, the heating is in comfort, eco or window open mode, the washing machine is running or done. In scripts or Blockly this quickly spreads over many triggers, helper variables and timers. With this adapter you draw such logic as a statechart directly in the admin: states as boxes, transitions as arrows with conditions. The adapter executes the chart exactly as it is drawn.

Example alarm system (available as a template when you create a chart): In Disarmed, the chart waits to be armed, or arms itself at 11 pm if no window is open. An open window is reported. Armed contains the substates Exit delay (30 s), Monitoring, Entry delay (20 s) and Alarm. Door, window or motion for at least 2 s trigger it, motion not during night mode. In the alarm, two parallel regions run: the Siren goes silent after 3 minutes, the Notification sends a reminder every 10 minutes. Pressing the panic button three times triggers the alarm immediately. Disarming ends everything, whatever substate the chart is in.
Highlights
- Nested and parallel states,
entry/during/exitactions, transitions asevent[condition]{action} - Temporal logic like
after(5, min),every, counting button presses,at("22:30")orat("sunset", -30) - Inputs and outputs are any ioBroker states, your own JavaScript functions in function blocks
- Live view with active states and values, history, and a simulation with fast-forward, breakpoints and single steps, without switching anything
- Checks while editing, templates for new charts, restore former versions, import/export


Installation
Until the adapter is in the beta repository, install the released version from npm: Admin → Adapters → Install from custom URL → tab Custom →
iobroker.statechart(or on the console:iobroker url iobroker.statechart). Then add an instance of State Machine.Requirements: Node.js 22, js-controller ≥ 6.0.11, admin ≥ 7.6.20
Docs: Getting started · Reference
Feedback
I'm especially interested in whether you can get started without prior knowledge, and which of your automations fit well or badly into a chart. Please report bugs as an issue on GitHub, questions and ideas here in the thread.
This is an early version, the format of the charts may still change until 1.0. Please don't rely on it blindly for critical things like an alarm system or heating in winter yet.
Looking forward to your feedback!
- Nested and parallel states,
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden