Documentation added. master
authorBenjamin Braatz <bb@bbraatz.eu>
Tue, 21 Feb 2023 22:35:21 +0000 (23:35 +0100)
committerBenjamin Braatz <bb@bbraatz.eu>
Tue, 21 Feb 2023 22:35:21 +0000 (23:35 +0100)
doc/DebugView1.png [new file with mode: 0644]
doc/DebugView2.png [new file with mode: 0644]
doc/index.md

diff --git a/doc/DebugView1.png b/doc/DebugView1.png
new file mode 100644 (file)
index 0000000..0ba10ad
Binary files /dev/null and b/doc/DebugView1.png differ
diff --git a/doc/DebugView2.png b/doc/DebugView2.png
new file mode 100644 (file)
index 0000000..0a4463f
Binary files /dev/null and b/doc/DebugView2.png differ
index 0a6170705f186fd7c4aa67bfeea308be50fcd607..ef2e97b37c42f11424fca2c8274fbdbcb9f9b780 100644 (file)
@@ -3,9 +3,6 @@ Dieses Paket enthält ein Plugin für das ControlPi-System, mit dem
 Neuron-Controller des Herstellers [UniPi](https://www.unipi.technology/)
 mit dem ControlPi-System betrieben werden können.
 
-## Benutzung
-Damit die q
-
 ## Installation
 Eine ausführliche Dokumentation ist in der Dokumentation der
 [ControlPi-Infrastruktur](https://docs.graph-it.com/graphit/controlpi) zu
@@ -13,7 +10,7 @@ finden.
 
 Der Code dieses Plugins kann mit git geclonet werden:
 ```sh
-$ git clone git://git.graph-it.com/graphit/controlpi-<plugin>.git
+$ git clone git://git.graph-it.com/graphit/controlpi-unipi.git
 ```
 (Falls Zugang zu diesem Server per SSH besteht und Änderungen gepusht
 werden sollen, sollte stattdessen die SSH-URL benutzt werden.)
@@ -26,5 +23,56 @@ Dann kann es editierbar in ein virtuelles Environment installiert werden:
 Auf dem Raspberry Pi (oder wenn keine Code-Änderungen gewünscht sind) kann
 es auch direkt, ohne einen git-Clone installiert werden:
 ```sh
-(venv)$ pip install git+git://git.graph-it.com/graphit/controlpi-<plugin>.git
+(venv)$ pip install git+git://git.graph-it.com/graphit/controlpi-unipi.git
+```
+
+## Benutzung
+Eine minimale ControlPi-Konfiguration, die dieses Plugin benutzt, ist im
+git-Repository enthalten:
+```json
+{
+    "Debug": {
+        "plugin": "WSServer",
+        "web": {
+            "/": {
+                "module": "controlpi_plugins.wsserver",
+                "location": "Debug"
+            }
+        }
+    },
+    "Log": {
+        "plugin": "Log",
+        "filter": [{}]
+    },
+    "UniPi": {
+        "plugin": "UniPi"
+    }
+}
 ```
+
+Das UniPi-Plugin benötigt keine weitere Konfiguration, wenn es auf einem
+UniPi ausgeführt wird.
+Es such selbständig alle digitalen Ein- und Ausgänge und Relais-Ausgänge im
+SysFS-Dateisystem, das unter
+[https://kb.unipi.technology/en:sw:02-apis:04-sysfs](https://kb.unipi.technology/en:sw:02-apis:04-sysfs)
+dokumentiert ist, und richtet diese als Clients am ControlPi-Bus ein.
+
+Die Beschaltung und die technischen Parameter sind dokumentiert unter:
+* Digitale Eingänge:
+  [https://kb.unipi.technology/en:hw:02-neuron:description-of-io:01-description-of-di](https://kb.unipi.technology/en:hw:02-neuron:description-of-io:01-description-of-di)
+* Digitale Ausgänge:
+  [https://kb.unipi.technology/en:hw:02-neuron:description-of-io:02-description-of-do](https://kb.unipi.technology/en:hw:02-neuron:description-of-io:02-description-of-do)
+* Relais-Ausgänge:
+  [https://kb.unipi.technology/en:hw:02-neuron:description-of-io:03-description-of-ro](https://kb.unipi.technology/en:hw:02-neuron:description-of-io:03-description-of-ro)
+
+Die Darstellung der drei Arten von Komponenten in der Debug-Oberfläche ist
+im Folgenden zu sehen:
+![Debug-Oberfläche Eingang](graphit/controlpi-unipi/DebugView1.png)
+![Debug-Oberfläche Ausgänge](graphit/controlpi-unipi/DebugView2.png)
+
+Zusätzlich zum üblichen Zustands-Interface haben die Eingänge einen Zähler,
+der mit dem Kommando `get counter` abgefragt und mit dem Kommando `reset
+counter` sowohl abgefragt als auch auf 0 gesetzt werden kann.
+
+Sowohl die digitalen als auch die Relais-Ausgänge implementieren das
+übliche Interface mit den Kommandos `get state` und `set state`.