Der DALI2-Treiber erlaubt die Steuerung von DALI2-Geräten. Es werden bis zu 4 DALI-Kanäle unterstützt.
Der Name des DALI Treibers lautet: dali2
Die Routing-Adresse des ersten DALI Treibers ist: 1540
Die Datenpunktdatei für den ersten DALI Treiber heißt: dali21.txt
Die Konfigurationsdatei für globale Einstellungen des ersten DALI Treibers heißt: dali21.cfg
Bei dem DALI Treiber sowie allen weiteren Gateway-Treibern gilt für die Definiton von Datenpunkten in der Datenpunktdatei:
Typ: | Bedeutung |
---|---|
M | Ganzzahliger Wert (Binäre Datenpunkte,Zählwerte) der vom Gateway nur gelesen werden kann/soll. |
S | Ganzzahliger Wert der vom Gateway gelesen sowie geschrieben werden kann/soll. |
X | Analogwert (mit Nachkommastellen) der vom Gateway nur gelesen werden kann/soll. |
Y | Analogwert (mit Nachkommastellen) der vom Gateway gelesen sowie geschrieben werden kann/soll. |
Konfiguration
driver
Property | Typ | Beschreibung |
---|---|---|
timer_interval_ms | Positive Ganzzahl | Interval in Millisekunden, in denen die Hauptschleife aufgerufen wird. |
device
Property | Typ | Beschreibung |
---|---|---|
timeout_ms | Positive Ganzzahl | Dauer in Millisekunden, nach dem die Verbindung zum DALI Aufsteckplatine in einen Timeout läuft. |
channel_X
X muss durch eine Zahl aus 1-4 ersetzt werden.
Property | Typ | Beschreibung |
---|---|---|
enable_bus_power | Bool | Bus power für den Channel ist aktiv oder nicht. Je nach Hardware werden nicht alle Kanäle unterstützt. |
Devices
Der Treiber selbst ist ein DALI Application-Controller. Der Application-Controller kann je Channel mit der Datei “devices.json“ in “/uxx/config/” konfiguriert werden. Falls kein Application-Controller konfiguriert wird, wird einer bei Bedarf automatisch angelegt.
Die Datei ist ein JSON-Objekt. Das JSON-Objekt muss den Key “version” enthalten, welches die Version der Konfigurationsdatei entspricht. Die Version besteht aus einer Major- und einer Minor-Version-Nummer. Inkompatible Versionen der Konfiguration unterscheiden sich in ihrer Major-Version.
Für jeden Channel gibt es einen Key mit der Channelnummer 1-4 als als Namen. Die Channel-Konfiguration ist ebenfalls ein JSON-Objekt, welches aktuell nur den Key “app-controller” enthalten kann.
Die App-Controller-Konfiguration ist ein JSON-Objekt. Aktuell wird nur der Key “default_adr” unterstützt, mit dem die initiale DALI-Adresse des Application-Controllers festgelegt werden kann.
Beispiel
Folgende Konfigurationsdatei erstellt einen Application-Controller für Channel 3 mit der Adresse 42.
{
"version": "1.0",
"3": {
"app_controller": {
"default_adr": 42
}
}
}
Datenpunkte
Failure
Der Failure-Datenpunkt hat die Adresse “failure“. Er wird auf 1 gesetzt, falls keine Verbindung zur DALI-Aufsteckplatine möglich ist.
Channel-Failure
Jeder Channel hat einen eigenen Failure-Datenpunkt. Die Adresse ist “failure X”, wobei X durch die Channelnummer 1-4 ersetzt werden muss.
Der Wert des Datenpunktes ist 0, wenn DALI-Bus mit Strom versorgt ist, 1 bei einer Unterbrechung und 2 wenn über einen längeren Zeitraum keine Busversorgung mehr vorliegt.
Application Controller
Datenpunkte, die der Application Controller verwaltet, haben das Format “application_controller channel data-typ dali-Adresse”. Der Channel muss wieder durch eine Channelnummer 1-4 ersetzt werden. Der Treiber unterstützt folgende DALI-Adressen
· Short_X: Eine Short-Adresse mit der Nummer X
· Group_X: Eine Gruppen-Adresse mit der Nummer X
· Broadcast
Folgende Datentypen werden unterstützt:
Typ | Beschreibung | Datentyp | Lesend | Schreibend |
---|---|---|---|---|
GearPresent | Das Gear ist vorhanden | Bool | x | |
Level | Der Licht-Level eines Controlgears | Float (0-100%) | x | x |
Off | Controlgear ist ausgeschaltet | Bool | x | x |
RecallMaxLevel | Lichtlevel auf Maximum setzen | Bool | x | |
RecallMinLevel | Lichtlevel auf Minimum setzen | Bool | x | |
MaxLevel | Maximales Level | Float (0-100%) | x | x |
MinLevel | Minimales Level | Float (0-100%) | x | x |
SystemFailureLevel | System Failure Level | Float (0-100%) | x | x |
PowerOnLevel | Level beim Start | Float (0-100%) | x | x |
SceneLevel_X | Level der Scene X | Float (0-100%) | x | x |
GoToScene | Zur Szene wechseln | Integer (Szenennummer) | x | |
QueryStatus-GearFailure | Gearfailure Status bit | Bool | x | |
QueryStatus-LampFailure | LampFailure Status bit | Bool | x | |
QueryStatus-LampOn | LampOn Status bit | Bool | x | |
QueryStatus-LimitError | LimitError Status bit | Bool | x | |
QueryStatus-FadeRunning | FadeRunning Status bit | Bool | x | |
QueryStatus-ResetState | ResetState Status bit | Bool | x | |
QueryStatus-PowerCycleSeen | PowerCycleSeen Status bit | Bool | x | |
FadeTime | Fadetime | 8 bit vorzeichenlose Ganzzahl | x | x |
FadeRate | Faderate | 8 bit vorzeichenlose Ganzzahl | x | x |
FadeTimeExtended | Erweiterte Fadetime | 8 bit vorzeichenlose Ganzzahl | x | x |
Format-String
Über den Format-String kann über T: X das Pollinterval in X Millisekunden für den Datenpunkt angegeben werden.
Beispiele
# This failure datapoint is set if there is no communication to the DALI board
[M failure]
name = communication failure
# This failure datapoint is set if the DALI channel 1 has no power
#
# A value of 1 means that the channel has lost it's power shortly
# A value of 2 means a system failure.
[M failure 1]
name = channel failure 1
# Set the level of the gear with the adress 4 on channel 2 to off
# The actual status is polled every second
[S application_controller 2 Off Short_4]
name = 4_2 Off
format = T:1000
# Set the level off all gears on channel 1 to the given value
# Polling is disabled because this is a broadcast
[Y application_controller 1 Level Broadcast]
name = Level of channel 1
format = T:0
# Go to the provided scene for group 2 on channel 2
[S application_controller 2 GoToScene Group_2]
name = Scene 2_2
# Check every 5 seconds the lamp failure status bit of the short adress 0 on channel 2
# This datapoint is not writeable
[M application_controller 2 QueryStatus_LampFailure Short_0]
name = Lamp failure 2_0
format = T:5000