Python framework for easy control algorithms writing. It can be seen as a combination of Node-RED and PLC ladder programming.
Write algorithms in the declarative (telling systems what you want), instead of the imperative way (telling systems what to do).
It is based on Nodes connected to each other via Variables forming a Flow.
- Many ready to use blocks,
- Persistence support,
- Strong type checking both in runtime and with mypy checking,
- Nulls not allowed,
- Fully testable - no dependency on the environment (date/time).
- Controlling battery charging/discharging for solar installations,
- Battery maintenance state machine,
- Fault management,
- ... and much more!
See examples here.
- Flow - consists of Nodes that are executed in order,
- Node - performs some operations on its inputs, resulting in outputs, configured via parameters,
- Variable - holds data:
var
- temporary variable for passing data out of the flow and to use between flow nodesmemory
- variable that persists across flow executions, including passing data into the flow,
- Timers - performing time-related tasks:
- One shot - sets its output to True if time elapses, triggered with its
trigger
variable, or reset with itsreset
variable,- Repeating - sets its output to True every time it elapses
- One shot - sets its output to True if time elapses, triggered with its
- Changed - detects of variable change
- Compare - compares two variables
- EdgeFalling - detects condition change from True to False
- EdgeRising - detects condition change from False to True
- SchmittGate - gate with hysteresis
- PreviousStateCondition - base node for creating comparators
- DayCrosser - detects the day change (with optional specific time)
- TimeCheck - checks if current time is within range
- If - branches flow depending on the condition
- DFlipFlop - edge-triggered D gate - wiki
- DLatch - level-triggered D gate - wiki
- SRLatch - level-triggered SR gate - wiki
- And - logical AND on the inputs
- Or - logical OR on the inputs
- Invert - logical NOT on the input
- LogicOp - base node for creating logic operators
- TimerOnDelay - enables its output if the input is True for specific amount of time (like PLC ON Timer)
- TimerStop - stops running one-shot timer
- TimerTrigger - triggers (or re-triggers) one-shot timer
- ConditionMonitor - advanced condition monitor with an optional gap allowance
- Debounce - limit change rate of a variable
- Select - helper for selecting values based on input value
- Startup - outputs True only on the first Flow run
- Transform - transforms input values into output value using specified user function