pyhausbus 1.0.5__py2.py3-none-any.whl → 1.0.6__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyhausbus/de/hausbus/homeassistant/proxy/AnalogEingang.py +18 -19
- pyhausbus/de/hausbus/homeassistant/proxy/Controller.py +104 -105
- pyhausbus/de/hausbus/homeassistant/proxy/Counter.py +16 -17
- pyhausbus/de/hausbus/homeassistant/proxy/CurrentReader.py +36 -37
- pyhausbus/de/hausbus/homeassistant/proxy/DaliLine.py +16 -17
- pyhausbus/de/hausbus/homeassistant/proxy/DigitalPort.py +8 -9
- pyhausbus/de/hausbus/homeassistant/proxy/Dimmer.py +24 -25
- pyhausbus/de/hausbus/homeassistant/proxy/Drucksensor.py +18 -19
- pyhausbus/de/hausbus/homeassistant/proxy/Ethernet.py +14 -15
- pyhausbus/de/hausbus/homeassistant/proxy/Feuchtesensor.py +20 -21
- pyhausbus/de/hausbus/homeassistant/proxy/Gateway.py +22 -23
- pyhausbus/de/hausbus/homeassistant/proxy/Helligkeitssensor.py +20 -21
- pyhausbus/de/hausbus/homeassistant/proxy/IRSensor.py +14 -15
- pyhausbus/de/hausbus/homeassistant/proxy/Led.py +32 -33
- pyhausbus/de/hausbus/homeassistant/proxy/LogicalButton.py +32 -33
- pyhausbus/de/hausbus/homeassistant/proxy/ModBusMaster.py +6 -7
- pyhausbus/de/hausbus/homeassistant/proxy/ModbusSlave.py +0 -1
- pyhausbus/de/hausbus/homeassistant/proxy/PCA9555.py +2 -3
- pyhausbus/de/hausbus/homeassistant/proxy/PCServer.py +18 -19
- pyhausbus/de/hausbus/homeassistant/proxy/PIDController.py +16 -17
- pyhausbus/de/hausbus/homeassistant/proxy/PT1000.py +20 -21
- pyhausbus/de/hausbus/homeassistant/proxy/PowerMeter.py +20 -21
- pyhausbus/de/hausbus/homeassistant/proxy/RFIDReader.py +20 -21
- pyhausbus/de/hausbus/homeassistant/proxy/RGBDimmer.py +16 -17
- pyhausbus/de/hausbus/homeassistant/proxy/Rollladen.py +30 -31
- pyhausbus/de/hausbus/homeassistant/proxy/Schalter.py +30 -31
- pyhausbus/de/hausbus/homeassistant/proxy/SnmpAgent.py +0 -1
- pyhausbus/de/hausbus/homeassistant/proxy/SystemTime.py +8 -9
- pyhausbus/de/hausbus/homeassistant/proxy/Taster.py +34 -35
- pyhausbus/de/hausbus/homeassistant/proxy/Taupunkt.py +20 -21
- pyhausbus/de/hausbus/homeassistant/proxy/TcpClient.py +8 -9
- pyhausbus/de/hausbus/homeassistant/proxy/Temperatursensor.py +20 -21
- pyhausbus/de/hausbus/homeassistant/proxy/Wetter.py +4 -5
- pyhausbus/de/hausbus/homeassistant/proxy/WiFi.py +14 -15
- {pyhausbus-1.0.5.dist-info → pyhausbus-1.0.6.dist-info}/METADATA +1 -1
- {pyhausbus-1.0.5.dist-info → pyhausbus-1.0.6.dist-info}/RECORD +38 -38
- {pyhausbus-1.0.5.dist-info → pyhausbus-1.0.6.dist-info}/LICENSE +0 -0
- {pyhausbus-1.0.5.dist-info → pyhausbus-1.0.6.dist-info}/WHEEL +0 -0
@@ -1,4 +1,3 @@
|
|
1
|
-
import logging
|
2
1
|
from pyhausbus.HausBusCommand import HausBusCommand
|
3
2
|
from pyhausbus.ABusFeature import *
|
4
3
|
from pyhausbus.ResultWorker import ResultWorker
|
@@ -21,11 +20,11 @@ class Counter(ABusFeature):
|
|
21
20
|
"""
|
22
21
|
"""
|
23
22
|
def getConfiguration(self):
|
24
|
-
|
23
|
+
LOGGER.debug("getConfiguration")
|
25
24
|
hbCommand = HausBusCommand(self.objectId, 0, "getConfiguration")
|
26
25
|
ResultWorker()._setResultInfo(Configuration,self.getObjectId())
|
27
26
|
hbCommand.send()
|
28
|
-
|
27
|
+
LOGGER.debug("returns")
|
29
28
|
|
30
29
|
"""
|
31
30
|
@param mode increment: 1 = Zaehler inkrementieren.
|
@@ -34,7 +33,7 @@ class Counter(ABusFeature):
|
|
34
33
|
@param scaleFaktor Anzahl Impulse pro Einheit z.B. pro kWh.
|
35
34
|
"""
|
36
35
|
def setConfiguration(self, mode:MMode, debounceTime:int, reportTime:int, scaleFaktor:int):
|
37
|
-
|
36
|
+
LOGGER.debug("setConfiguration"+" mode = "+str(mode)+" debounceTime = "+str(debounceTime)+" reportTime = "+str(reportTime)+" scaleFaktor = "+str(scaleFaktor))
|
38
37
|
hbCommand = HausBusCommand(self.objectId, 1, "setConfiguration")
|
39
38
|
hbCommand.addByte(mode.getValue())
|
40
39
|
hbCommand.addByte(debounceTime)
|
@@ -42,29 +41,29 @@ class Counter(ABusFeature):
|
|
42
41
|
hbCommand.addWord(scaleFaktor)
|
43
42
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
44
43
|
hbCommand.send()
|
45
|
-
|
44
|
+
LOGGER.debug("returns")
|
46
45
|
|
47
46
|
"""
|
48
47
|
"""
|
49
48
|
def getStatus(self):
|
50
|
-
|
49
|
+
LOGGER.debug("getStatus")
|
51
50
|
hbCommand = HausBusCommand(self.objectId, 2, "getStatus")
|
52
51
|
ResultWorker()._setResultInfo(Status,self.getObjectId())
|
53
52
|
hbCommand.send()
|
54
|
-
|
53
|
+
LOGGER.debug("returns")
|
55
54
|
|
56
55
|
"""
|
57
56
|
@param counter Zaehler ganze Einheiten.
|
58
57
|
@param fraction Bruchteil 0-scaleFactor.
|
59
58
|
"""
|
60
59
|
def setCount(self, counter:int, fraction:int):
|
61
|
-
|
60
|
+
LOGGER.debug("setCount"+" counter = "+str(counter)+" fraction = "+str(fraction))
|
62
61
|
hbCommand = HausBusCommand(self.objectId, 3, "setCount")
|
63
62
|
hbCommand.addDWord(counter)
|
64
63
|
hbCommand.addWord(fraction)
|
65
64
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
66
65
|
hbCommand.send()
|
67
|
-
|
66
|
+
LOGGER.debug("returns")
|
68
67
|
|
69
68
|
"""
|
70
69
|
@param mode increment: 1 = Zaehler inkrementieren.
|
@@ -73,7 +72,7 @@ class Counter(ABusFeature):
|
|
73
72
|
@param scaleFaktor Anzahl Impulse pro Einheit z.B. pro kWh.
|
74
73
|
"""
|
75
74
|
def Configuration(self, mode:MMode, debounceTime:int, reportTime:int, scaleFaktor:int):
|
76
|
-
|
75
|
+
LOGGER.debug("Configuration"+" mode = "+str(mode)+" debounceTime = "+str(debounceTime)+" reportTime = "+str(reportTime)+" scaleFaktor = "+str(scaleFaktor))
|
77
76
|
hbCommand = HausBusCommand(self.objectId, 128, "Configuration")
|
78
77
|
hbCommand.addByte(mode.getValue())
|
79
78
|
hbCommand.addByte(debounceTime)
|
@@ -81,43 +80,43 @@ class Counter(ABusFeature):
|
|
81
80
|
hbCommand.addWord(scaleFaktor)
|
82
81
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
83
82
|
hbCommand.send()
|
84
|
-
|
83
|
+
LOGGER.debug("returns")
|
85
84
|
|
86
85
|
"""
|
87
86
|
@param errorCode .
|
88
87
|
"""
|
89
88
|
def evError(self, errorCode:EErrorCode):
|
90
|
-
|
89
|
+
LOGGER.debug("evError"+" errorCode = "+str(errorCode))
|
91
90
|
hbCommand = HausBusCommand(self.objectId, 255, "evError")
|
92
91
|
hbCommand.addByte(errorCode.value)
|
93
92
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
94
93
|
hbCommand.send()
|
95
|
-
|
94
|
+
LOGGER.debug("returns")
|
96
95
|
|
97
96
|
"""
|
98
97
|
@param counter Zaehler ganze Einheiten.
|
99
98
|
@param fraction Bruchteil 0-scaleFactor.
|
100
99
|
"""
|
101
100
|
def Status(self, counter:int, fraction:int):
|
102
|
-
|
101
|
+
LOGGER.debug("Status"+" counter = "+str(counter)+" fraction = "+str(fraction))
|
103
102
|
hbCommand = HausBusCommand(self.objectId, 129, "Status")
|
104
103
|
hbCommand.addDWord(counter)
|
105
104
|
hbCommand.addWord(fraction)
|
106
105
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
107
106
|
hbCommand.send()
|
108
|
-
|
107
|
+
LOGGER.debug("returns")
|
109
108
|
|
110
109
|
"""
|
111
110
|
@param counter Zaehler ganze Einheiten.
|
112
111
|
@param fraction Bruchteil 0-scaleFactor.
|
113
112
|
"""
|
114
113
|
def evStatus(self, counter:int, fraction:int):
|
115
|
-
|
114
|
+
LOGGER.debug("evStatus"+" counter = "+str(counter)+" fraction = "+str(fraction))
|
116
115
|
hbCommand = HausBusCommand(self.objectId, 200, "evStatus")
|
117
116
|
hbCommand.addDWord(counter)
|
118
117
|
hbCommand.addWord(fraction)
|
119
118
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
120
119
|
hbCommand.send()
|
121
|
-
|
120
|
+
LOGGER.debug("returns")
|
122
121
|
|
123
122
|
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import logging
|
2
1
|
from pyhausbus.HausBusCommand import HausBusCommand
|
3
2
|
from pyhausbus.ABusFeature import *
|
4
3
|
from pyhausbus.ResultWorker import ResultWorker
|
@@ -27,7 +26,7 @@ class CurrentReader(ABusFeature):
|
|
27
26
|
@param currentReportInterval Interval in Sekunden nach dem immer der aktuelle Gesamtstromverbrauch gemeldet wird.
|
28
27
|
"""
|
29
28
|
def setConfiguration(self, config:MConfig, impPerKwh:int, startCurrent:int, currentReportInterval:int):
|
30
|
-
|
29
|
+
LOGGER.debug("setConfiguration"+" config = "+str(config)+" impPerKwh = "+str(impPerKwh)+" startCurrent = "+str(startCurrent)+" currentReportInterval = "+str(currentReportInterval))
|
31
30
|
hbCommand = HausBusCommand(self.objectId, 3, "setConfiguration")
|
32
31
|
hbCommand.addByte(config.getValue())
|
33
32
|
hbCommand.addWord(impPerKwh)
|
@@ -35,16 +34,16 @@ class CurrentReader(ABusFeature):
|
|
35
34
|
hbCommand.addWord(currentReportInterval)
|
36
35
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
37
36
|
hbCommand.send()
|
38
|
-
|
37
|
+
LOGGER.debug("returns")
|
39
38
|
|
40
39
|
"""
|
41
40
|
"""
|
42
41
|
def getConfiguration(self):
|
43
|
-
|
42
|
+
LOGGER.debug("getConfiguration")
|
44
43
|
hbCommand = HausBusCommand(self.objectId, 4, "getConfiguration")
|
45
44
|
ResultWorker()._setResultInfo(Configuration,self.getObjectId())
|
46
45
|
hbCommand.send()
|
47
|
-
|
46
|
+
LOGGER.debug("returns")
|
48
47
|
|
49
48
|
"""
|
50
49
|
@param config .
|
@@ -53,7 +52,7 @@ class CurrentReader(ABusFeature):
|
|
53
52
|
@param currentReportInterval Interval in Sekunden nach dem immer der aktuelle Gesamtstromverbrauch gemeldet wird.
|
54
53
|
"""
|
55
54
|
def Configuration(self, config:MConfig, impPerKwh:int, startCurrent:int, currentReportInterval:int):
|
56
|
-
|
55
|
+
LOGGER.debug("Configuration"+" config = "+str(config)+" impPerKwh = "+str(impPerKwh)+" startCurrent = "+str(startCurrent)+" currentReportInterval = "+str(currentReportInterval))
|
57
56
|
hbCommand = HausBusCommand(self.objectId, 129, "Configuration")
|
58
57
|
hbCommand.addByte(config.getValue())
|
59
58
|
hbCommand.addWord(impPerKwh)
|
@@ -61,7 +60,7 @@ class CurrentReader(ABusFeature):
|
|
61
60
|
hbCommand.addWord(currentReportInterval)
|
62
61
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
63
62
|
hbCommand.send()
|
64
|
-
|
63
|
+
LOGGER.debug("returns")
|
65
64
|
|
66
65
|
"""
|
67
66
|
@param time Systemzeit des ESP zu Debugzwecken.
|
@@ -70,7 +69,7 @@ class CurrentReader(ABusFeature):
|
|
70
69
|
@param signalDuration Dauer des gemessenen S0 Signals in ms.
|
71
70
|
"""
|
72
71
|
def evSignal(self, time:int, signalCount:int, power:int, signalDuration:int):
|
73
|
-
|
72
|
+
LOGGER.debug("evSignal"+" time = "+str(time)+" signalCount = "+str(signalCount)+" power = "+str(power)+" signalDuration = "+str(signalDuration))
|
74
73
|
hbCommand = HausBusCommand(self.objectId, 200, "evSignal")
|
75
74
|
hbCommand.addDWord(time)
|
76
75
|
hbCommand.addDWord(signalCount)
|
@@ -78,152 +77,152 @@ class CurrentReader(ABusFeature):
|
|
78
77
|
hbCommand.addDWord(signalDuration)
|
79
78
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
80
79
|
hbCommand.send()
|
81
|
-
|
80
|
+
LOGGER.debug("returns")
|
82
81
|
|
83
82
|
"""
|
84
83
|
"""
|
85
84
|
def getCurrent(self):
|
86
|
-
|
85
|
+
LOGGER.debug("getCurrent")
|
87
86
|
hbCommand = HausBusCommand(self.objectId, 1, "getCurrent")
|
88
87
|
ResultWorker()._setResultInfo(Current,self.getObjectId())
|
89
88
|
hbCommand.send()
|
90
|
-
|
89
|
+
LOGGER.debug("returns")
|
91
90
|
|
92
91
|
"""
|
93
92
|
@param current Verbrauchter Strom in Wattstunden.
|
94
93
|
"""
|
95
94
|
def evCurrent(self, current:int):
|
96
|
-
|
95
|
+
LOGGER.debug("evCurrent"+" current = "+str(current))
|
97
96
|
hbCommand = HausBusCommand(self.objectId, 201, "evCurrent")
|
98
97
|
hbCommand.addDWord(current)
|
99
98
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
100
99
|
hbCommand.send()
|
101
|
-
|
100
|
+
LOGGER.debug("returns")
|
102
101
|
|
103
102
|
"""
|
104
103
|
@param power Aktuelle Leistung in Watt.
|
105
104
|
"""
|
106
105
|
def Power(self, power:int):
|
107
|
-
|
106
|
+
LOGGER.debug("Power"+" power = "+str(power))
|
108
107
|
hbCommand = HausBusCommand(self.objectId, 130, "Power")
|
109
108
|
hbCommand.addWord(power)
|
110
109
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
111
110
|
hbCommand.send()
|
112
|
-
|
111
|
+
LOGGER.debug("returns")
|
113
112
|
|
114
113
|
"""
|
115
114
|
@param current verbrauchter Strom in Wattstunden.
|
116
115
|
"""
|
117
116
|
def Current(self, current:int):
|
118
|
-
|
117
|
+
LOGGER.debug("Current"+" current = "+str(current))
|
119
118
|
hbCommand = HausBusCommand(self.objectId, 128, "Current")
|
120
119
|
hbCommand.addDWord(current)
|
121
120
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
122
121
|
hbCommand.send()
|
123
|
-
|
122
|
+
LOGGER.debug("returns")
|
124
123
|
|
125
124
|
"""
|
126
125
|
"""
|
127
126
|
def getSignalCount(self):
|
128
|
-
|
127
|
+
LOGGER.debug("getSignalCount")
|
129
128
|
hbCommand = HausBusCommand(self.objectId, 6, "getSignalCount")
|
130
129
|
ResultWorker()._setResultInfo(SignalCount,self.getObjectId())
|
131
130
|
hbCommand.send()
|
132
|
-
|
131
|
+
LOGGER.debug("returns")
|
133
132
|
|
134
133
|
"""
|
135
134
|
@param signalCount Anzahl gez?hlter S0 Signale seit dem letzten Zur?cksetzen.
|
136
135
|
"""
|
137
136
|
def SignalCount(self, signalCount:int):
|
138
|
-
|
137
|
+
LOGGER.debug("SignalCount"+" signalCount = "+str(signalCount))
|
139
138
|
hbCommand = HausBusCommand(self.objectId, 131, "SignalCount")
|
140
139
|
hbCommand.addDWord(signalCount)
|
141
140
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
142
141
|
hbCommand.send()
|
143
|
-
|
142
|
+
LOGGER.debug("returns")
|
144
143
|
|
145
144
|
"""
|
146
145
|
"""
|
147
146
|
def clearSignalCount(self):
|
148
|
-
|
147
|
+
LOGGER.debug("clearSignalCount")
|
149
148
|
hbCommand = HausBusCommand(self.objectId, 7, "clearSignalCount")
|
150
149
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
151
150
|
hbCommand.send()
|
152
|
-
|
151
|
+
LOGGER.debug("returns")
|
153
152
|
|
154
153
|
"""
|
155
154
|
@param signalCount .
|
156
155
|
"""
|
157
156
|
def setSignalCount(self, signalCount:int):
|
158
|
-
|
157
|
+
LOGGER.debug("setSignalCount"+" signalCount = "+str(signalCount))
|
159
158
|
hbCommand = HausBusCommand(self.objectId, 2, "setSignalCount")
|
160
159
|
hbCommand.addDWord(signalCount)
|
161
160
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
162
161
|
hbCommand.send()
|
163
|
-
|
162
|
+
LOGGER.debug("returns")
|
164
163
|
|
165
164
|
"""
|
166
165
|
"""
|
167
166
|
def getPower(self):
|
168
|
-
|
167
|
+
LOGGER.debug("getPower")
|
169
168
|
hbCommand = HausBusCommand(self.objectId, 5, "getPower")
|
170
169
|
ResultWorker()._setResultInfo(Power,self.getObjectId())
|
171
170
|
hbCommand.send()
|
172
|
-
|
171
|
+
LOGGER.debug("returns")
|
173
172
|
|
174
173
|
"""
|
175
174
|
"""
|
176
175
|
def incSignalCount(self):
|
177
|
-
|
176
|
+
LOGGER.debug("incSignalCount")
|
178
177
|
hbCommand = HausBusCommand(self.objectId, 9, "incSignalCount")
|
179
178
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
180
179
|
hbCommand.send()
|
181
|
-
|
180
|
+
LOGGER.debug("returns")
|
182
181
|
|
183
182
|
"""
|
184
183
|
"""
|
185
184
|
def decSignalCount(self):
|
186
|
-
|
185
|
+
LOGGER.debug("decSignalCount")
|
187
186
|
hbCommand = HausBusCommand(self.objectId, 10, "decSignalCount")
|
188
187
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
189
188
|
hbCommand.send()
|
190
|
-
|
189
|
+
LOGGER.debug("returns")
|
191
190
|
|
192
191
|
"""
|
193
192
|
@param data .
|
194
193
|
@param type .
|
195
194
|
"""
|
196
195
|
def evDebug(self, data:int, type:MConfig):
|
197
|
-
|
196
|
+
LOGGER.debug("evDebug"+" data = "+str(data)+" type = "+str(type))
|
198
197
|
hbCommand = HausBusCommand(self.objectId, 210, "evDebug")
|
199
198
|
hbCommand.addDWord(data)
|
200
199
|
hbCommand.addByte(type.getValue())
|
201
200
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
202
201
|
hbCommand.send()
|
203
|
-
|
202
|
+
LOGGER.debug("returns")
|
204
203
|
|
205
204
|
"""
|
206
205
|
@param value .
|
207
206
|
@param stamp .
|
208
207
|
"""
|
209
208
|
def evInterrupt(self, value:int, stamp:int):
|
210
|
-
|
209
|
+
LOGGER.debug("evInterrupt"+" value = "+str(value)+" stamp = "+str(stamp))
|
211
210
|
hbCommand = HausBusCommand(self.objectId, 211, "evInterrupt")
|
212
211
|
hbCommand.addByte(value)
|
213
212
|
hbCommand.addDWord(stamp)
|
214
213
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
215
214
|
hbCommand.send()
|
216
|
-
|
215
|
+
LOGGER.debug("returns")
|
217
216
|
|
218
217
|
"""
|
219
218
|
@param errorCode .
|
220
219
|
"""
|
221
220
|
def evError(self, errorCode:EErrorCode):
|
222
|
-
|
221
|
+
LOGGER.debug("evError"+" errorCode = "+str(errorCode))
|
223
222
|
hbCommand = HausBusCommand(self.objectId, 255, "evError")
|
224
223
|
hbCommand.addByte(errorCode.value)
|
225
224
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
226
225
|
hbCommand.send()
|
227
|
-
|
226
|
+
LOGGER.debug("returns")
|
228
227
|
|
229
228
|
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import logging
|
2
1
|
from pyhausbus.HausBusCommand import HausBusCommand
|
3
2
|
from pyhausbus.ABusFeature import *
|
4
3
|
from pyhausbus.ResultWorker import ResultWorker
|
@@ -23,7 +22,7 @@ class DaliLine(ABusFeature):
|
|
23
22
|
@param address3 .
|
24
23
|
"""
|
25
24
|
def getConfiguration(self, address0:int, address1:int, address2:int, address3:int):
|
26
|
-
|
25
|
+
LOGGER.debug("getConfiguration"+" address0 = "+str(address0)+" address1 = "+str(address1)+" address2 = "+str(address2)+" address3 = "+str(address3))
|
27
26
|
hbCommand = HausBusCommand(self.objectId, 0, "getConfiguration")
|
28
27
|
hbCommand.addByte(address0)
|
29
28
|
hbCommand.addByte(address1)
|
@@ -31,7 +30,7 @@ class DaliLine(ABusFeature):
|
|
31
30
|
hbCommand.addByte(address3)
|
32
31
|
ResultWorker()._setResultInfo(Configuration,self.getObjectId())
|
33
32
|
hbCommand.send()
|
34
|
-
|
33
|
+
LOGGER.debug("returns")
|
35
34
|
|
36
35
|
"""
|
37
36
|
@param address0 .
|
@@ -40,7 +39,7 @@ class DaliLine(ABusFeature):
|
|
40
39
|
@param address3 .
|
41
40
|
"""
|
42
41
|
def setConfiguration(self, address0:int, address1:int, address2:int, address3:int):
|
43
|
-
|
42
|
+
LOGGER.debug("setConfiguration"+" address0 = "+str(address0)+" address1 = "+str(address1)+" address2 = "+str(address2)+" address3 = "+str(address3))
|
44
43
|
hbCommand = HausBusCommand(self.objectId, 1, "setConfiguration")
|
45
44
|
hbCommand.addByte(address0)
|
46
45
|
hbCommand.addByte(address1)
|
@@ -48,38 +47,38 @@ class DaliLine(ABusFeature):
|
|
48
47
|
hbCommand.addByte(address3)
|
49
48
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
50
49
|
hbCommand.send()
|
51
|
-
|
50
|
+
LOGGER.debug("returns")
|
52
51
|
|
53
52
|
"""
|
54
53
|
"""
|
55
54
|
def allOff(self):
|
56
|
-
|
55
|
+
LOGGER.debug("allOff")
|
57
56
|
hbCommand = HausBusCommand(self.objectId, 2, "allOff")
|
58
57
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
59
58
|
hbCommand.send()
|
60
|
-
|
59
|
+
LOGGER.debug("returns")
|
61
60
|
|
62
61
|
"""
|
63
62
|
"""
|
64
63
|
def allOn(self):
|
65
|
-
|
64
|
+
LOGGER.debug("allOn")
|
66
65
|
hbCommand = HausBusCommand(self.objectId, 3, "allOn")
|
67
66
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
68
67
|
hbCommand.send()
|
69
|
-
|
68
|
+
LOGGER.debug("returns")
|
70
69
|
|
71
70
|
"""
|
72
71
|
@param command Dali Kommando s.Spezifikation.
|
73
72
|
@param address Kurz- oder Gruppenadresse YAAA AAAS\r\n64 Kurzadressen 0AAA AAAS\r\n16 Gruppenadressen 100A AAAS\r\nSammelaufruf 1111 111S\r\n\r\nY: Adressenart: Y=? ? ? ?? ?? ??? ?? ?0? ? ? ?? ?? ??? ?? ? ? Kurzadresse.
|
74
73
|
"""
|
75
74
|
def sendCommand(self, command:int, address:int):
|
76
|
-
|
75
|
+
LOGGER.debug("sendCommand"+" command = "+str(command)+" address = "+str(address))
|
77
76
|
hbCommand = HausBusCommand(self.objectId, 4, "sendCommand")
|
78
77
|
hbCommand.addByte(command)
|
79
78
|
hbCommand.addByte(address)
|
80
79
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
81
80
|
hbCommand.send()
|
82
|
-
|
81
|
+
LOGGER.debug("returns")
|
83
82
|
|
84
83
|
"""
|
85
84
|
@param address0 .
|
@@ -88,7 +87,7 @@ class DaliLine(ABusFeature):
|
|
88
87
|
@param address3 .
|
89
88
|
"""
|
90
89
|
def Configuration(self, address0:int, address1:int, address2:int, address3:int):
|
91
|
-
|
90
|
+
LOGGER.debug("Configuration"+" address0 = "+str(address0)+" address1 = "+str(address1)+" address2 = "+str(address2)+" address3 = "+str(address3))
|
92
91
|
hbCommand = HausBusCommand(self.objectId, 128, "Configuration")
|
93
92
|
hbCommand.addByte(address0)
|
94
93
|
hbCommand.addByte(address1)
|
@@ -96,28 +95,28 @@ class DaliLine(ABusFeature):
|
|
96
95
|
hbCommand.addByte(address3)
|
97
96
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
98
97
|
hbCommand.send()
|
99
|
-
|
98
|
+
LOGGER.debug("returns")
|
100
99
|
|
101
100
|
"""
|
102
101
|
@param status .
|
103
102
|
"""
|
104
103
|
def Status(self, status:int):
|
105
|
-
|
104
|
+
LOGGER.debug("Status"+" status = "+str(status))
|
106
105
|
hbCommand = HausBusCommand(self.objectId, 129, "Status")
|
107
106
|
hbCommand.addByte(status)
|
108
107
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
109
108
|
hbCommand.send()
|
110
|
-
|
109
|
+
LOGGER.debug("returns")
|
111
110
|
|
112
111
|
"""
|
113
112
|
@param errorCode .
|
114
113
|
"""
|
115
114
|
def evError(self, errorCode:EErrorCode):
|
116
|
-
|
115
|
+
LOGGER.debug("evError"+" errorCode = "+str(errorCode))
|
117
116
|
hbCommand = HausBusCommand(self.objectId, 255, "evError")
|
118
117
|
hbCommand.addByte(errorCode.value)
|
119
118
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
120
119
|
hbCommand.send()
|
121
|
-
|
120
|
+
LOGGER.debug("returns")
|
122
121
|
|
123
122
|
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import logging
|
2
1
|
from pyhausbus.HausBusCommand import HausBusCommand
|
3
2
|
from pyhausbus.ABusFeature import *
|
4
3
|
from pyhausbus.ResultWorker import ResultWorker
|
@@ -20,11 +19,11 @@ class DigitalPort(ABusFeature):
|
|
20
19
|
"""
|
21
20
|
"""
|
22
21
|
def getConfiguration(self):
|
23
|
-
|
22
|
+
LOGGER.debug("getConfiguration")
|
24
23
|
hbCommand = HausBusCommand(self.objectId, 0, "getConfiguration")
|
25
24
|
ResultWorker()._setResultInfo(Configuration,self.getObjectId())
|
26
25
|
hbCommand.send()
|
27
|
-
|
26
|
+
LOGGER.debug("returns")
|
28
27
|
|
29
28
|
"""
|
30
29
|
@param pin0 .
|
@@ -37,7 +36,7 @@ class DigitalPort(ABusFeature):
|
|
37
36
|
@param pin7 .
|
38
37
|
"""
|
39
38
|
def setConfiguration(self, pin0:EPin, pin1:EPin, pin2:EPin, pin3:EPin, pin4:EPin, pin5:EPin, pin6:EPin, pin7:EPin):
|
40
|
-
|
39
|
+
LOGGER.debug("setConfiguration"+" pin0 = "+str(pin0)+" pin1 = "+str(pin1)+" pin2 = "+str(pin2)+" pin3 = "+str(pin3)+" pin4 = "+str(pin4)+" pin5 = "+str(pin5)+" pin6 = "+str(pin6)+" pin7 = "+str(pin7))
|
41
40
|
hbCommand = HausBusCommand(self.objectId, 1, "setConfiguration")
|
42
41
|
hbCommand.addByte(pin0.value)
|
43
42
|
hbCommand.addByte(pin1.value)
|
@@ -49,7 +48,7 @@ class DigitalPort(ABusFeature):
|
|
49
48
|
hbCommand.addByte(pin7.value)
|
50
49
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
51
50
|
hbCommand.send()
|
52
|
-
|
51
|
+
LOGGER.debug("returns")
|
53
52
|
|
54
53
|
"""
|
55
54
|
@param pin0 .
|
@@ -62,7 +61,7 @@ class DigitalPort(ABusFeature):
|
|
62
61
|
@param pin7 .
|
63
62
|
"""
|
64
63
|
def Configuration(self, pin0:EPin, pin1:EPin, pin2:EPin, pin3:EPin, pin4:EPin, pin5:EPin, pin6:EPin, pin7:EPin):
|
65
|
-
|
64
|
+
LOGGER.debug("Configuration"+" pin0 = "+str(pin0)+" pin1 = "+str(pin1)+" pin2 = "+str(pin2)+" pin3 = "+str(pin3)+" pin4 = "+str(pin4)+" pin5 = "+str(pin5)+" pin6 = "+str(pin6)+" pin7 = "+str(pin7))
|
66
65
|
hbCommand = HausBusCommand(self.objectId, 128, "Configuration")
|
67
66
|
hbCommand.addByte(pin0.value)
|
68
67
|
hbCommand.addByte(pin1.value)
|
@@ -74,17 +73,17 @@ class DigitalPort(ABusFeature):
|
|
74
73
|
hbCommand.addByte(pin7.value)
|
75
74
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
76
75
|
hbCommand.send()
|
77
|
-
|
76
|
+
LOGGER.debug("returns")
|
78
77
|
|
79
78
|
"""
|
80
79
|
@param errorCode .
|
81
80
|
"""
|
82
81
|
def evError(self, errorCode:EErrorCode):
|
83
|
-
|
82
|
+
LOGGER.debug("evError"+" errorCode = "+str(errorCode))
|
84
83
|
hbCommand = HausBusCommand(self.objectId, 255, "evError")
|
85
84
|
hbCommand.addByte(errorCode.value)
|
86
85
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
87
86
|
hbCommand.send()
|
88
|
-
|
87
|
+
LOGGER.debug("returns")
|
89
88
|
|
90
89
|
|