Add example configuration.
authorBenjamin Braatz <benjamin.braatz@graph-it.com>
Wed, 27 Jul 2022 09:48:46 +0000 (11:48 +0200)
committerBenjamin Braatz <benjamin.braatz@graph-it.com>
Wed, 27 Jul 2022 09:48:46 +0000 (11:48 +0200)
conf-unipi.json [new file with mode: 0644]

diff --git a/conf-unipi.json b/conf-unipi.json
new file mode 100644 (file)
index 0000000..3376d50
--- /dev/null
@@ -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" }
+                ]
+            }
+        }
+    }
+}