pyhausbus 1.0.4__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/HomeServer.py +0 -1
- 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.4.dist-info → pyhausbus-1.0.6.dist-info}/METADATA +1 -1
- {pyhausbus-1.0.4.dist-info → pyhausbus-1.0.6.dist-info}/RECORD +39 -39
- {pyhausbus-1.0.4.dist-info → pyhausbus-1.0.6.dist-info}/LICENSE +0 -0
- {pyhausbus-1.0.4.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
|
@@ -24,11 +23,11 @@ class LogicalButton(ABusFeature):
|
|
24
23
|
"""
|
25
24
|
"""
|
26
25
|
def getConfiguration(self):
|
27
|
-
|
26
|
+
LOGGER.debug("getConfiguration")
|
28
27
|
hbCommand = HausBusCommand(self.objectId, 0, "getConfiguration")
|
29
28
|
ResultWorker()._setResultInfo(Configuration,self.getObjectId())
|
30
29
|
hbCommand.send()
|
31
|
-
|
30
|
+
LOGGER.debug("returns")
|
32
31
|
|
33
32
|
"""
|
34
33
|
@param button1 instanzId des 1.Tasters.
|
@@ -49,7 +48,7 @@ class LogicalButton(ABusFeature):
|
|
49
48
|
@param led8 .
|
50
49
|
"""
|
51
50
|
def setConfiguration(self, button1:int, button2:int, button3:int, button4:int, button5:int, button6:int, button7:int, button8:int, led1:int, led2:int, led3:int, led4:int, led5:int, led6:int, led7:int, led8:int):
|
52
|
-
|
51
|
+
LOGGER.debug("setConfiguration"+" button1 = "+str(button1)+" button2 = "+str(button2)+" button3 = "+str(button3)+" button4 = "+str(button4)+" button5 = "+str(button5)+" button6 = "+str(button6)+" button7 = "+str(button7)+" button8 = "+str(button8)+" led1 = "+str(led1)+" led2 = "+str(led2)+" led3 = "+str(led3)+" led4 = "+str(led4)+" led5 = "+str(led5)+" led6 = "+str(led6)+" led7 = "+str(led7)+" led8 = "+str(led8))
|
53
52
|
hbCommand = HausBusCommand(self.objectId, 1, "setConfiguration")
|
54
53
|
hbCommand.addByte(button1)
|
55
54
|
hbCommand.addByte(button2)
|
@@ -69,7 +68,7 @@ class LogicalButton(ABusFeature):
|
|
69
68
|
hbCommand.addByte(led8)
|
70
69
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
71
70
|
hbCommand.send()
|
72
|
-
|
71
|
+
LOGGER.debug("returns")
|
73
72
|
|
74
73
|
"""
|
75
74
|
@param button1 .
|
@@ -90,7 +89,7 @@ class LogicalButton(ABusFeature):
|
|
90
89
|
@param led8 .
|
91
90
|
"""
|
92
91
|
def Configuration(self, button1:int, button2:int, button3:int, button4:int, button5:int, button6:int, button7:int, button8:int, led1:int, led2:int, led3:int, led4:int, led5:int, led6:int, led7:int, led8:int):
|
93
|
-
|
92
|
+
LOGGER.debug("Configuration"+" button1 = "+str(button1)+" button2 = "+str(button2)+" button3 = "+str(button3)+" button4 = "+str(button4)+" button5 = "+str(button5)+" button6 = "+str(button6)+" button7 = "+str(button7)+" button8 = "+str(button8)+" led1 = "+str(led1)+" led2 = "+str(led2)+" led3 = "+str(led3)+" led4 = "+str(led4)+" led5 = "+str(led5)+" led6 = "+str(led6)+" led7 = "+str(led7)+" led8 = "+str(led8))
|
94
93
|
hbCommand = HausBusCommand(self.objectId, 128, "Configuration")
|
95
94
|
hbCommand.addByte(button1)
|
96
95
|
hbCommand.addByte(button2)
|
@@ -110,58 +109,58 @@ class LogicalButton(ABusFeature):
|
|
110
109
|
hbCommand.addByte(led8)
|
111
110
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
112
111
|
hbCommand.send()
|
113
|
-
|
112
|
+
LOGGER.debug("returns")
|
114
113
|
|
115
114
|
"""
|
116
115
|
@param errorCode .
|
117
116
|
"""
|
118
117
|
def evError(self, errorCode:EErrorCode):
|
119
|
-
|
118
|
+
LOGGER.debug("evError"+" errorCode = "+str(errorCode))
|
120
119
|
hbCommand = HausBusCommand(self.objectId, 255, "evError")
|
121
120
|
hbCommand.addByte(errorCode.value)
|
122
121
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
123
122
|
hbCommand.send()
|
124
|
-
|
123
|
+
LOGGER.debug("returns")
|
125
124
|
|
126
125
|
"""
|
127
126
|
"""
|
128
127
|
def evOff(self):
|
129
|
-
|
128
|
+
LOGGER.debug("evOff")
|
130
129
|
hbCommand = HausBusCommand(self.objectId, 200, "evOff")
|
131
130
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
132
131
|
hbCommand.send()
|
133
|
-
|
132
|
+
LOGGER.debug("returns")
|
134
133
|
|
135
134
|
"""
|
136
135
|
@param brightness 0-100% Helligkeit.
|
137
136
|
"""
|
138
137
|
def evOn(self, brightness:int):
|
139
|
-
|
138
|
+
LOGGER.debug("evOn"+" brightness = "+str(brightness))
|
140
139
|
hbCommand = HausBusCommand(self.objectId, 201, "evOn")
|
141
140
|
hbCommand.addByte(brightness)
|
142
141
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
143
142
|
hbCommand.send()
|
144
|
-
|
143
|
+
LOGGER.debug("returns")
|
145
144
|
|
146
145
|
"""
|
147
146
|
"""
|
148
147
|
def evBlink(self):
|
149
|
-
|
148
|
+
LOGGER.debug("evBlink")
|
150
149
|
hbCommand = HausBusCommand(self.objectId, 202, "evBlink")
|
151
150
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
152
151
|
hbCommand.send()
|
153
|
-
|
152
|
+
LOGGER.debug("returns")
|
154
153
|
|
155
154
|
"""
|
156
155
|
@param offDelay Ausschaltverzoegerung: Wert * Zeitbasis [ms]\r\n0=Keine.
|
157
156
|
"""
|
158
157
|
def off(self, offDelay:int):
|
159
|
-
|
158
|
+
LOGGER.debug("off"+" offDelay = "+str(offDelay))
|
160
159
|
hbCommand = HausBusCommand(self.objectId, 2, "off")
|
161
160
|
hbCommand.addWord(offDelay)
|
162
161
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
163
162
|
hbCommand.send()
|
164
|
-
|
163
|
+
LOGGER.debug("returns")
|
165
164
|
|
166
165
|
"""
|
167
166
|
@param brightness 0-100% Helligkeit.
|
@@ -169,14 +168,14 @@ class LogicalButton(ABusFeature):
|
|
169
168
|
@param onDelay Einschaltverzoegerung: Wert * Zeitbasis [ms]\r\n0=Keine.
|
170
169
|
"""
|
171
170
|
def on(self, brightness:int, duration:int, onDelay:int):
|
172
|
-
|
171
|
+
LOGGER.debug("on"+" brightness = "+str(brightness)+" duration = "+str(duration)+" onDelay = "+str(onDelay))
|
173
172
|
hbCommand = HausBusCommand(self.objectId, 3, "on")
|
174
173
|
hbCommand.addByte(brightness)
|
175
174
|
hbCommand.addWord(duration)
|
176
175
|
hbCommand.addWord(onDelay)
|
177
176
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
178
177
|
hbCommand.send()
|
179
|
-
|
178
|
+
LOGGER.debug("returns")
|
180
179
|
|
181
180
|
"""
|
182
181
|
@param brightness 0-100% Helligkeit.
|
@@ -185,7 +184,7 @@ class LogicalButton(ABusFeature):
|
|
185
184
|
@param quantity Anzahl Blinks.
|
186
185
|
"""
|
187
186
|
def blink(self, brightness:int, offTime:int, onTime:int, quantity:int):
|
188
|
-
|
187
|
+
LOGGER.debug("blink"+" brightness = "+str(brightness)+" offTime = "+str(offTime)+" onTime = "+str(onTime)+" quantity = "+str(quantity))
|
189
188
|
hbCommand = HausBusCommand(self.objectId, 4, "blink")
|
190
189
|
hbCommand.addByte(brightness)
|
191
190
|
hbCommand.addByte(offTime)
|
@@ -193,27 +192,27 @@ class LogicalButton(ABusFeature):
|
|
193
192
|
hbCommand.addByte(quantity)
|
194
193
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
195
194
|
hbCommand.send()
|
196
|
-
|
195
|
+
LOGGER.debug("returns")
|
197
196
|
|
198
197
|
"""
|
199
198
|
@param status Zustand der Taster LEDs.
|
200
199
|
"""
|
201
200
|
def Status(self, status:EStatus):
|
202
|
-
|
201
|
+
LOGGER.debug("Status"+" status = "+str(status))
|
203
202
|
hbCommand = HausBusCommand(self.objectId, 129, "Status")
|
204
203
|
hbCommand.addByte(status.value)
|
205
204
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
206
205
|
hbCommand.send()
|
207
|
-
|
206
|
+
LOGGER.debug("returns")
|
208
207
|
|
209
208
|
"""
|
210
209
|
"""
|
211
210
|
def getStatus(self):
|
212
|
-
|
211
|
+
LOGGER.debug("getStatus")
|
213
212
|
hbCommand = HausBusCommand(self.objectId, 5, "getStatus")
|
214
213
|
ResultWorker()._setResultInfo(Status,self.getObjectId())
|
215
214
|
hbCommand.send()
|
216
|
-
|
215
|
+
LOGGER.debug("returns")
|
217
216
|
|
218
217
|
"""
|
219
218
|
@param holdTimeout Zeit a 10ms.
|
@@ -222,7 +221,7 @@ class LogicalButton(ABusFeature):
|
|
222
221
|
@param optionMask 0: invertiert die Eingangslogik\r\n1: setzt den Initialzustand auf 0.
|
223
222
|
"""
|
224
223
|
def setButtonConfiguration(self, holdTimeout:int, waitForDoubleClickTimeout:int, eventMask:MEventMask, optionMask:MOptionMask):
|
225
|
-
|
224
|
+
LOGGER.debug("setButtonConfiguration"+" holdTimeout = "+str(holdTimeout)+" waitForDoubleClickTimeout = "+str(waitForDoubleClickTimeout)+" eventMask = "+str(eventMask)+" optionMask = "+str(optionMask))
|
226
225
|
hbCommand = HausBusCommand(self.objectId, 11, "setButtonConfiguration")
|
227
226
|
hbCommand.addByte(holdTimeout)
|
228
227
|
hbCommand.addByte(waitForDoubleClickTimeout)
|
@@ -230,7 +229,7 @@ class LogicalButton(ABusFeature):
|
|
230
229
|
hbCommand.addByte(optionMask.getValue())
|
231
230
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
232
231
|
hbCommand.send()
|
233
|
-
|
232
|
+
LOGGER.debug("returns")
|
234
233
|
|
235
234
|
"""
|
236
235
|
@param dimmOffset 0-100% offset auf den im Kommando angegebenen Helligkeitswert.
|
@@ -239,7 +238,7 @@ class LogicalButton(ABusFeature):
|
|
239
238
|
@param options eservierte Bits muessen immer deaktiviert sein. Das Aktivieren eines reservierten Bits fuehrt nach dem Neustart des Controllers zu den Standard-Einstellungen..
|
240
239
|
"""
|
241
240
|
def setLedConfiguration(self, dimmOffset:int, minBrightness:int, timeBase:int, options:MOptions):
|
242
|
-
|
241
|
+
LOGGER.debug("setLedConfiguration"+" dimmOffset = "+str(dimmOffset)+" minBrightness = "+str(minBrightness)+" timeBase = "+str(timeBase)+" options = "+str(options))
|
243
242
|
hbCommand = HausBusCommand(self.objectId, 12, "setLedConfiguration")
|
244
243
|
hbCommand.addByte(dimmOffset)
|
245
244
|
hbCommand.addByte(minBrightness)
|
@@ -247,26 +246,26 @@ class LogicalButton(ABusFeature):
|
|
247
246
|
hbCommand.addByte(options.getValue())
|
248
247
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
249
248
|
hbCommand.send()
|
250
|
-
|
249
|
+
LOGGER.debug("returns")
|
251
250
|
|
252
251
|
"""
|
253
252
|
@param minBrightness Eine ausgeschaltete LED leuchtet immer noch mit dieser Helligkeit 0-100%.
|
254
253
|
"""
|
255
254
|
def setMinBrightness(self, minBrightness:int):
|
256
|
-
|
255
|
+
LOGGER.debug("setMinBrightness"+" minBrightness = "+str(minBrightness))
|
257
256
|
hbCommand = HausBusCommand(self.objectId, 6, "setMinBrightness")
|
258
257
|
hbCommand.addByte(minBrightness)
|
259
258
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
260
259
|
hbCommand.send()
|
261
|
-
|
260
|
+
LOGGER.debug("returns")
|
262
261
|
|
263
262
|
"""
|
264
263
|
"""
|
265
264
|
def getMinBrightness(self):
|
266
|
-
|
265
|
+
LOGGER.debug("getMinBrightness")
|
267
266
|
hbCommand = HausBusCommand(self.objectId, 7, "getMinBrightness")
|
268
267
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
269
268
|
hbCommand.send()
|
270
|
-
|
269
|
+
LOGGER.debug("returns")
|
271
270
|
|
272
271
|
|
@@ -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,12 +19,12 @@ class ModBusMaster(ABusFeature):
|
|
20
19
|
@param idx index of the configuration slot.
|
21
20
|
"""
|
22
21
|
def getConfiguration(self, idx:int):
|
23
|
-
|
22
|
+
LOGGER.debug("getConfiguration"+" idx = "+str(idx))
|
24
23
|
hbCommand = HausBusCommand(self.objectId, 0, "getConfiguration")
|
25
24
|
hbCommand.addByte(idx)
|
26
25
|
ResultWorker()._setResultInfo(Configuration,self.getObjectId())
|
27
26
|
hbCommand.send()
|
28
|
-
|
27
|
+
LOGGER.debug("returns")
|
29
28
|
|
30
29
|
"""
|
31
30
|
@param idx index of the configuration slot.
|
@@ -33,14 +32,14 @@ class ModBusMaster(ABusFeature):
|
|
33
32
|
@param sensorType Supported Power-Meter SDM630 / SDM72D / SDM72V2 / ORWE517.
|
34
33
|
"""
|
35
34
|
def setConfiguration(self, idx:int, node:int, sensorType:ESensorType):
|
36
|
-
|
35
|
+
LOGGER.debug("setConfiguration"+" idx = "+str(idx)+" node = "+str(node)+" sensorType = "+str(sensorType))
|
37
36
|
hbCommand = HausBusCommand(self.objectId, 1, "setConfiguration")
|
38
37
|
hbCommand.addByte(idx)
|
39
38
|
hbCommand.addByte(node)
|
40
39
|
hbCommand.addByte(sensorType.value)
|
41
40
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
42
41
|
hbCommand.send()
|
43
|
-
|
42
|
+
LOGGER.debug("returns")
|
44
43
|
|
45
44
|
"""
|
46
45
|
@param idx index of the configuration slot.
|
@@ -48,13 +47,13 @@ class ModBusMaster(ABusFeature):
|
|
48
47
|
@param sensorType Supported Power-Meter SDM630 / SDM72D / SDM72V2 / ORWE517.
|
49
48
|
"""
|
50
49
|
def Configuration(self, idx:int, node:int, sensorType:ESensorType):
|
51
|
-
|
50
|
+
LOGGER.debug("Configuration"+" idx = "+str(idx)+" node = "+str(node)+" sensorType = "+str(sensorType))
|
52
51
|
hbCommand = HausBusCommand(self.objectId, 128, "Configuration")
|
53
52
|
hbCommand.addByte(idx)
|
54
53
|
hbCommand.addByte(node)
|
55
54
|
hbCommand.addByte(sensorType.value)
|
56
55
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
57
56
|
hbCommand.send()
|
58
|
-
|
57
|
+
LOGGER.debug("returns")
|
59
58
|
|
60
59
|
|
@@ -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
|
@@ -19,11 +18,11 @@ class PCA9555(ABusFeature):
|
|
19
18
|
@param errorCode .
|
20
19
|
"""
|
21
20
|
def evError(self, errorCode:EErrorCode):
|
22
|
-
|
21
|
+
LOGGER.debug("evError"+" errorCode = "+str(errorCode))
|
23
22
|
hbCommand = HausBusCommand(self.objectId, 255, "evError")
|
24
23
|
hbCommand.addByte(errorCode.value)
|
25
24
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
26
25
|
hbCommand.send()
|
27
|
-
|
26
|
+
LOGGER.debug("returns")
|
28
27
|
|
29
28
|
|
@@ -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
|
@@ -18,87 +17,87 @@ class PCServer(ABusFeature):
|
|
18
17
|
@param command .
|
19
18
|
"""
|
20
19
|
def exec(self, command:str):
|
21
|
-
|
20
|
+
LOGGER.debug("exec"+" command = "+str(command))
|
22
21
|
hbCommand = HausBusCommand(self.objectId, 0, "exec")
|
23
22
|
hbCommand.addString(command)
|
24
23
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
25
24
|
hbCommand.send()
|
26
|
-
|
25
|
+
LOGGER.debug("returns")
|
27
26
|
|
28
27
|
"""
|
29
28
|
@param varId .
|
30
29
|
@param varValue .
|
31
30
|
"""
|
32
31
|
def setVariable(self, varId:int, varValue:int):
|
33
|
-
|
32
|
+
LOGGER.debug("setVariable"+" varId = "+str(varId)+" varValue = "+str(varValue))
|
34
33
|
hbCommand = HausBusCommand(self.objectId, 126, "setVariable")
|
35
34
|
hbCommand.addByte(varId)
|
36
35
|
hbCommand.addByte(varValue)
|
37
36
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
38
37
|
hbCommand.send()
|
39
|
-
|
38
|
+
LOGGER.debug("returns")
|
40
39
|
|
41
40
|
"""
|
42
41
|
"""
|
43
42
|
def shutdown(self):
|
44
|
-
|
43
|
+
LOGGER.debug("shutdown")
|
45
44
|
hbCommand = HausBusCommand(self.objectId, 11, "shutdown")
|
46
45
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
47
46
|
hbCommand.send()
|
48
|
-
|
47
|
+
LOGGER.debug("returns")
|
49
48
|
|
50
49
|
"""
|
51
50
|
"""
|
52
51
|
def restart(self):
|
53
|
-
|
52
|
+
LOGGER.debug("restart")
|
54
53
|
hbCommand = HausBusCommand(self.objectId, 12, "restart")
|
55
54
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
56
55
|
hbCommand.send()
|
57
|
-
|
56
|
+
LOGGER.debug("returns")
|
58
57
|
|
59
58
|
"""
|
60
59
|
"""
|
61
60
|
def quit(self):
|
62
|
-
|
61
|
+
LOGGER.debug("quit")
|
63
62
|
hbCommand = HausBusCommand(self.objectId, 20, "quit")
|
64
63
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
65
64
|
hbCommand.send()
|
66
|
-
|
65
|
+
LOGGER.debug("returns")
|
67
66
|
|
68
67
|
"""
|
69
68
|
"""
|
70
69
|
def evOnline(self):
|
71
|
-
|
70
|
+
LOGGER.debug("evOnline")
|
72
71
|
hbCommand = HausBusCommand(self.objectId, 200, "evOnline")
|
73
72
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
74
73
|
hbCommand.send()
|
75
|
-
|
74
|
+
LOGGER.debug("returns")
|
76
75
|
|
77
76
|
"""
|
78
77
|
"""
|
79
78
|
def evOffline(self):
|
80
|
-
|
79
|
+
LOGGER.debug("evOffline")
|
81
80
|
hbCommand = HausBusCommand(self.objectId, 201, "evOffline")
|
82
81
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
83
82
|
hbCommand.send()
|
84
|
-
|
83
|
+
LOGGER.debug("returns")
|
85
84
|
|
86
85
|
"""
|
87
86
|
"""
|
88
87
|
def standby(self):
|
89
|
-
|
88
|
+
LOGGER.debug("standby")
|
90
89
|
hbCommand = HausBusCommand(self.objectId, 10, "standby")
|
91
90
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
92
91
|
hbCommand.send()
|
93
|
-
|
92
|
+
LOGGER.debug("returns")
|
94
93
|
|
95
94
|
"""
|
96
95
|
"""
|
97
96
|
def reloadUserPlugin(self):
|
98
|
-
|
97
|
+
LOGGER.debug("reloadUserPlugin")
|
99
98
|
hbCommand = HausBusCommand(self.objectId, 13, "reloadUserPlugin")
|
100
99
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
101
100
|
hbCommand.send()
|
102
|
-
|
101
|
+
LOGGER.debug("returns")
|
103
102
|
|
104
103
|
|
@@ -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 PIDController(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 P P-Anteil des Reglers.
|
@@ -39,7 +38,7 @@ class PIDController(ABusFeature):
|
|
39
38
|
@param options additional: erzeugt einen weiteren PIDController.
|
40
39
|
"""
|
41
40
|
def setConfiguration(self, P:int, I:int, D:int, targetValue:int, sensorObjectId:int, actorObjectId:int, timeout:int, hysteresis:int, options:MOptions):
|
42
|
-
|
41
|
+
LOGGER.debug("setConfiguration"+" P = "+str(P)+" I = "+str(I)+" D = "+str(D)+" targetValue = "+str(targetValue)+" sensorObjectId = "+str(sensorObjectId)+" actorObjectId = "+str(actorObjectId)+" timeout = "+str(timeout)+" hysteresis = "+str(hysteresis)+" options = "+str(options))
|
43
42
|
hbCommand = HausBusCommand(self.objectId, 1, "setConfiguration")
|
44
43
|
hbCommand.addWord(P)
|
45
44
|
hbCommand.addWord(I)
|
@@ -52,7 +51,7 @@ class PIDController(ABusFeature):
|
|
52
51
|
hbCommand.addByte(options.getValue())
|
53
52
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
54
53
|
hbCommand.send()
|
55
|
-
|
54
|
+
LOGGER.debug("returns")
|
56
55
|
|
57
56
|
"""
|
58
57
|
@param P P-Anteil des Reglers.
|
@@ -66,7 +65,7 @@ class PIDController(ABusFeature):
|
|
66
65
|
@param options additional: erzeugt einen weiteren PIDController.
|
67
66
|
"""
|
68
67
|
def Configuration(self, P:int, I:int, D:int, targetValue:int, sensorObjectId:int, actorObjectId:int, timeout:int, hysteresis:int, options:MOptions):
|
69
|
-
|
68
|
+
LOGGER.debug("Configuration"+" P = "+str(P)+" I = "+str(I)+" D = "+str(D)+" targetValue = "+str(targetValue)+" sensorObjectId = "+str(sensorObjectId)+" actorObjectId = "+str(actorObjectId)+" timeout = "+str(timeout)+" hysteresis = "+str(hysteresis)+" options = "+str(options))
|
70
69
|
hbCommand = HausBusCommand(self.objectId, 128, "Configuration")
|
71
70
|
hbCommand.addWord(P)
|
72
71
|
hbCommand.addWord(I)
|
@@ -79,57 +78,57 @@ class PIDController(ABusFeature):
|
|
79
78
|
hbCommand.addByte(options.getValue())
|
80
79
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
81
80
|
hbCommand.send()
|
82
|
-
|
81
|
+
LOGGER.debug("returns")
|
83
82
|
|
84
83
|
"""
|
85
84
|
@param targetValue Regelungszielwert z.B. targetValue*0.
|
86
85
|
"""
|
87
86
|
def setTargetValue(self, targetValue:int):
|
88
|
-
|
87
|
+
LOGGER.debug("setTargetValue"+" targetValue = "+str(targetValue))
|
89
88
|
hbCommand = HausBusCommand(self.objectId, 2, "setTargetValue")
|
90
89
|
hbCommand.addWord(targetValue)
|
91
90
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
92
91
|
hbCommand.send()
|
93
|
-
|
92
|
+
LOGGER.debug("returns")
|
94
93
|
|
95
94
|
"""
|
96
95
|
@param enable Reglerverhalten ein/ausschalten.
|
97
96
|
"""
|
98
97
|
def enable(self, enable:EEnable):
|
99
|
-
|
98
|
+
LOGGER.debug("enable"+" enable = "+str(enable))
|
100
99
|
hbCommand = HausBusCommand(self.objectId, 3, "enable")
|
101
100
|
hbCommand.addByte(enable.value)
|
102
101
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
103
102
|
hbCommand.send()
|
104
|
-
|
103
|
+
LOGGER.debug("returns")
|
105
104
|
|
106
105
|
"""
|
107
106
|
"""
|
108
107
|
def evOn(self):
|
109
|
-
|
108
|
+
LOGGER.debug("evOn")
|
110
109
|
hbCommand = HausBusCommand(self.objectId, 200, "evOn")
|
111
110
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
112
111
|
hbCommand.send()
|
113
|
-
|
112
|
+
LOGGER.debug("returns")
|
114
113
|
|
115
114
|
"""
|
116
115
|
@param errorCode .
|
117
116
|
"""
|
118
117
|
def evError(self, errorCode:EErrorCode):
|
119
|
-
|
118
|
+
LOGGER.debug("evError"+" errorCode = "+str(errorCode))
|
120
119
|
hbCommand = HausBusCommand(self.objectId, 255, "evError")
|
121
120
|
hbCommand.addByte(errorCode.value)
|
122
121
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
123
122
|
hbCommand.send()
|
124
|
-
|
123
|
+
LOGGER.debug("returns")
|
125
124
|
|
126
125
|
"""
|
127
126
|
"""
|
128
127
|
def evOff(self):
|
129
|
-
|
128
|
+
LOGGER.debug("evOff")
|
130
129
|
hbCommand = HausBusCommand(self.objectId, 201, "evOff")
|
131
130
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
132
131
|
hbCommand.send()
|
133
|
-
|
132
|
+
LOGGER.debug("returns")
|
134
133
|
|
135
134
|
|