From: Benjamin Braatz Date: Wed, 27 Jul 2022 09:48:46 +0000 (+0200) Subject: Add example configuration. X-Git-Url: http://git.graph-it.com/?a=commitdiff_plain;h=bd505dccc0803564f5dab591f177359c3c0d4176;p=graphit%2Fcontrolpi-unipi.git Add example configuration. --- diff --git a/conf-unipi.json b/conf-unipi.json new file mode 100644 index 0000000..3376d50 --- /dev/null +++ b/conf-unipi.json @@ -0,0 +1,101 @@ +{ + "Debug": { + "plugin": "WSServer", + "web": { + "/": { + "module": "controlpi_plugins.wsserver", + "location": "Debug" + } + } + }, + "MaschinenplatzPi": { + "plugin": "WSClient", + "url": "ws://graph-hsv-hsrobotics-com.castle:8081", + "interface": "eth0", + "client": "zufuehrpi", + "up filter": [], + "down filter": [ + { + "target": { + "const": "Zufuehrung" + } + } + ] + }, + "UniPi": { + "plugin": "UniPi" + }, + "StauTimer": { + "plugin": "Timer", + "seconds": 0.2 + }, + "LaufTimer": { + "plugin": "Timer", + "seconds": 5 + }, + "Zufuehrung": { + "plugin": "StateMachine", + "init": "aus", + "states": { + "aus": { + "commands": [ + { "target": "do_1_01", "command": "set state", "new state": false } + ], + "transitions": [ + { "trigger": { "target": { "const": "Zufuehrung" }, "command": { "const": "start" } }, + "to": "an" } + ] + }, + "an": { + "commands": [ + { "target": "StauTimer", "command": "cancel" }, + { "target": "do_1_01", "command": "set state", "new state": true } + ], + "transitions": [ + { "trigger": { "target": { "const": "Zufuehrung" }, "command": { "const": "stop" } }, + "to": "aus" }, + { "trigger": { "sender": { "const": "di_1_01" }, "state": { "const": true } }, + "to": "staucheck" } + ] + }, + "staucheck": { + "commands": [ + { "target": "StauTimer", "command": "start" } + ], + "transitions": [ + { "trigger": { "target": { "const": "Zufuehrung" }, "command": { "const": "stop" } }, + "to": "aus" }, + { "trigger": { "sender": { "const": "di_1_01" }, "state": { "const": false } }, + "to": "an" }, + { "trigger": { "sender": { "const": "StauTimer" }, "event": { "const": "finished" } }, + "to": "stau" } + ] + }, + "stau": { + "commands": [ + { "target": "LaufTimer", "command": "cancel" }, + { "target": "do_1_01", "command": "set state", "new state": false } + ], + "transitions": [ + { "trigger": { "target": { "const": "Zufuehrung" }, "command": { "const": "stop" } }, + "to": "aus" }, + { "trigger": { "sender": { "const": "di_1_01" }, "state": { "const": false } }, + "to": "laufcheck" } + ] + }, + "laufcheck": { + "commands": [ + { "target": "LaufTimer", "command": "start" } + ], + "transitions": [ + { "trigger": { "target": { "const": "Zufuehrung" }, "command": { "const": "stop" } }, + "to": "aus" }, + { "trigger": { "sender": { "const": "di_1_01" }, "state": { "const": true } }, + "to": "stau" }, + { "trigger": { "sender": { "const": "LaufTimer" }, "event": { "const": "finished" } }, + "to": "an" } + ] + } + } + } +}