pvbrowser manual
Zurück Inhalt Vor

EIB Bus

EIB Ascii Terminal
EIB Ascii Terminal

Für den Europäischen Installations Bus (EIB) existiert ein Daemon, der das EIB Ascii Terminal von Schlaps und Partner verwendet.

Die Eingangssignale werden von dem Daemon automatisch in eine MySQL Datenbank geschrieben. Andere Anwendungen (wie z.B. unsere Visualisierung) können diese Datenbank auslesen. Ebenso existiert ein Kommandozeilenbefehl, um zum EIB Bus senden zu können.

Test Shell Script sendet zum EIB-Bus

#!/bin/bash
cnt=0
while [ $cnt -lt 20 ]; do
  buscommand -eib W10/0/002=1
  sleep 1
  buscommand -eib W10/0/003=1
  sleep 1
  buscommand -eib W10/0/002=0
  sleep 1
  buscommand -eib W10/0/003=0
  sleep 1
  let cnt=cnt+1
done

Die EIB Signale werden in einer MySQL Datenbank erfasst.

lehrig@nb3lehrig:~> mysql -u busclient -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 17 to server version: 4.0.15

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use automation;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select * from bus;
+----------+----------+-----------+
| name     | datatype | datavalue |
+----------+----------+-----------+
| 10/0/002 | S1       | 1         |
| 10/0/003 | S1       | 1         |
| 10/0/001 | S1       | 0         |
| 10/0/000 | S1       | 1         |
+----------+----------+-----------+
4 rows in set (0.00 sec)

mysql> select * from bus;
+----------+----------+-----------+
| name     | datatype | datavalue |
+----------+----------+-----------+
| 10/0/002 | S1       | 1         |
| 10/0/003 | S1       | 1         |
| 10/0/001 | S1       | 0         |
| 10/0/000 | S1       | 0         |
+----------+----------+-----------+
4 rows in set (0.00 sec)

mysql>

Zurück Inhalt Vor