pyhausbus 1.0.5__py2.py3-none-any.whl → 1.0.7__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/Templates.py +8 -5
- 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.7.dist-info}/METADATA +1 -1
- {pyhausbus-1.0.5.dist-info → pyhausbus-1.0.7.dist-info}/RECORD +39 -39
- {pyhausbus-1.0.5.dist-info → pyhausbus-1.0.7.dist-info}/LICENSE +0 -0
- {pyhausbus-1.0.5.dist-info → pyhausbus-1.0.7.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,13 +23,13 @@ class Dimmer(ABusFeature):
|
|
24
23
|
@param duration Einschaltdauer: Wert in Sekunden\r\n0=Endlos.
|
25
24
|
"""
|
26
25
|
def evOn(self, brightness:int, duration:int):
|
27
|
-
|
26
|
+
LOGGER.debug("evOn"+" brightness = "+str(brightness)+" duration = "+str(duration))
|
28
27
|
hbCommand = HausBusCommand(self.objectId, 201, "evOn")
|
29
28
|
hbCommand.addByte(brightness)
|
30
29
|
hbCommand.addWord(duration)
|
31
30
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
32
31
|
hbCommand.send()
|
33
|
-
|
32
|
+
LOGGER.debug("returns")
|
34
33
|
|
35
34
|
"""
|
36
35
|
@param mode DIMM_CR: dieser Mode ist zu Verwenden.
|
@@ -40,7 +39,7 @@ class Dimmer(ABusFeature):
|
|
40
39
|
@param dimmingRangeEnd Endwert des Helligkeitbereiches in dem gedimmt werden soll. 0-100%.
|
41
40
|
"""
|
42
41
|
def setConfiguration(self, mode:EMode, fadingTime:int, dimmingTime:int, dimmingRangeStart:int, dimmingRangeEnd:int):
|
43
|
-
|
42
|
+
LOGGER.debug("setConfiguration"+" mode = "+str(mode)+" fadingTime = "+str(fadingTime)+" dimmingTime = "+str(dimmingTime)+" dimmingRangeStart = "+str(dimmingRangeStart)+" dimmingRangeEnd = "+str(dimmingRangeEnd))
|
44
43
|
hbCommand = HausBusCommand(self.objectId, 1, "setConfiguration")
|
45
44
|
hbCommand.addByte(mode.value)
|
46
45
|
hbCommand.addByte(fadingTime)
|
@@ -49,29 +48,29 @@ class Dimmer(ABusFeature):
|
|
49
48
|
hbCommand.addByte(dimmingRangeEnd)
|
50
49
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
51
50
|
hbCommand.send()
|
52
|
-
|
51
|
+
LOGGER.debug("returns")
|
53
52
|
|
54
53
|
"""
|
55
54
|
"""
|
56
55
|
def getConfiguration(self):
|
57
|
-
|
56
|
+
LOGGER.debug("getConfiguration")
|
58
57
|
hbCommand = HausBusCommand(self.objectId, 0, "getConfiguration")
|
59
58
|
ResultWorker()._setResultInfo(Configuration,self.getObjectId())
|
60
59
|
hbCommand.send()
|
61
|
-
|
60
|
+
LOGGER.debug("returns")
|
62
61
|
|
63
62
|
"""
|
64
63
|
@param brightness Helligkeit in Prozent.
|
65
64
|
@param duration Einschaltdauer in Sekunden.
|
66
65
|
"""
|
67
66
|
def setBrightness(self, brightness:int, duration:int):
|
68
|
-
|
67
|
+
LOGGER.debug("setBrightness"+" brightness = "+str(brightness)+" duration = "+str(duration))
|
69
68
|
hbCommand = HausBusCommand(self.objectId, 2, "setBrightness")
|
70
69
|
hbCommand.addByte(brightness)
|
71
70
|
hbCommand.addWord(duration)
|
72
71
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
73
72
|
hbCommand.send()
|
74
|
-
|
73
|
+
LOGGER.debug("returns")
|
75
74
|
|
76
75
|
"""
|
77
76
|
@param mode DIMM_CR: Dimmer arbeitet mit Phasenabschnitt\r\nDIMM_L: Dimmer arbeitet mit Phasenanschnitt\r\nSWITCH: Dimmer schaltet nur keine Dimmfunktion\r\n\r\nACHTUNG: EIN FALSCHER MODE.
|
@@ -81,7 +80,7 @@ class Dimmer(ABusFeature):
|
|
81
80
|
@param dimmingRangeEnd Endwert des Helligkeitbereiches in dem gedimmt werden soll. 0-100%.
|
82
81
|
"""
|
83
82
|
def Configuration(self, mode:EMode, fadingTime:int, dimmingTime:int, dimmingRangeStart:int, dimmingRangeEnd:int):
|
84
|
-
|
83
|
+
LOGGER.debug("Configuration"+" mode = "+str(mode)+" fadingTime = "+str(fadingTime)+" dimmingTime = "+str(dimmingTime)+" dimmingRangeStart = "+str(dimmingRangeStart)+" dimmingRangeEnd = "+str(dimmingRangeEnd))
|
85
84
|
hbCommand = HausBusCommand(self.objectId, 128, "Configuration")
|
86
85
|
hbCommand.addByte(mode.value)
|
87
86
|
hbCommand.addByte(fadingTime)
|
@@ -90,79 +89,79 @@ class Dimmer(ABusFeature):
|
|
90
89
|
hbCommand.addByte(dimmingRangeEnd)
|
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 evOff(self):
|
98
|
-
|
97
|
+
LOGGER.debug("evOff")
|
99
98
|
hbCommand = HausBusCommand(self.objectId, 200, "evOff")
|
100
99
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
101
100
|
hbCommand.send()
|
102
|
-
|
101
|
+
LOGGER.debug("returns")
|
103
102
|
|
104
103
|
"""
|
105
104
|
@param direction .
|
106
105
|
"""
|
107
106
|
def evStart(self, direction:EDirection):
|
108
|
-
|
107
|
+
LOGGER.debug("evStart"+" direction = "+str(direction))
|
109
108
|
hbCommand = HausBusCommand(self.objectId, 202, "evStart")
|
110
109
|
hbCommand.addByte(direction.value)
|
111
110
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
112
111
|
hbCommand.send()
|
113
|
-
|
112
|
+
LOGGER.debug("returns")
|
114
113
|
|
115
114
|
"""
|
116
115
|
@param direction .
|
117
116
|
"""
|
118
117
|
def start(self, direction:EDirection):
|
119
|
-
|
118
|
+
LOGGER.debug("start"+" direction = "+str(direction))
|
120
119
|
hbCommand = HausBusCommand(self.objectId, 3, "start")
|
121
120
|
hbCommand.addByte(direction.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 stop(self):
|
129
|
-
|
128
|
+
LOGGER.debug("stop")
|
130
129
|
hbCommand = HausBusCommand(self.objectId, 4, "stop")
|
131
130
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
132
131
|
hbCommand.send()
|
133
|
-
|
132
|
+
LOGGER.debug("returns")
|
134
133
|
|
135
134
|
"""
|
136
135
|
"""
|
137
136
|
def getStatus(self):
|
138
|
-
|
137
|
+
LOGGER.debug("getStatus")
|
139
138
|
hbCommand = HausBusCommand(self.objectId, 5, "getStatus")
|
140
139
|
ResultWorker()._setResultInfo(Status,self.getObjectId())
|
141
140
|
hbCommand.send()
|
142
|
-
|
141
|
+
LOGGER.debug("returns")
|
143
142
|
|
144
143
|
"""
|
145
144
|
@param brightness aktuelle Helligkeit 0-100%.
|
146
145
|
@param duration Einschaltdauer: Wert in Sekunden\r\n0=Endlos.
|
147
146
|
"""
|
148
147
|
def Status(self, brightness:int, duration:int):
|
149
|
-
|
148
|
+
LOGGER.debug("Status"+" brightness = "+str(brightness)+" duration = "+str(duration))
|
150
149
|
hbCommand = HausBusCommand(self.objectId, 129, "Status")
|
151
150
|
hbCommand.addByte(brightness)
|
152
151
|
hbCommand.addWord(duration)
|
153
152
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
154
153
|
hbCommand.send()
|
155
|
-
|
154
|
+
LOGGER.debug("returns")
|
156
155
|
|
157
156
|
"""
|
158
157
|
@param errorCode NO_ZERO_CROSS_DETECTED: Nulldurchgaenge koennen nicht detektiert werde.
|
159
158
|
"""
|
160
159
|
def evError(self, errorCode:EErrorCode):
|
161
|
-
|
160
|
+
LOGGER.debug("evError"+" errorCode = "+str(errorCode))
|
162
161
|
hbCommand = HausBusCommand(self.objectId, 255, "evError")
|
163
162
|
hbCommand.addByte(errorCode.value)
|
164
163
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
165
164
|
hbCommand.send()
|
166
|
-
|
165
|
+
LOGGER.debug("returns")
|
167
166
|
|
168
167
|
|
@@ -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,51 +19,51 @@ class Drucksensor(ABusFeature):
|
|
20
19
|
"""
|
21
20
|
"""
|
22
21
|
def evLow(self):
|
23
|
-
|
22
|
+
LOGGER.debug("evLow")
|
24
23
|
hbCommand = HausBusCommand(self.objectId, 200, "evLow")
|
25
24
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
26
25
|
hbCommand.send()
|
27
|
-
|
26
|
+
LOGGER.debug("returns")
|
28
27
|
|
29
28
|
"""
|
30
29
|
"""
|
31
30
|
def evInRange(self):
|
32
|
-
|
31
|
+
LOGGER.debug("evInRange")
|
33
32
|
hbCommand = HausBusCommand(self.objectId, 201, "evInRange")
|
34
33
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
35
34
|
hbCommand.send()
|
36
|
-
|
35
|
+
LOGGER.debug("returns")
|
37
36
|
|
38
37
|
"""
|
39
38
|
"""
|
40
39
|
def evHigh(self):
|
41
|
-
|
40
|
+
LOGGER.debug("evHigh")
|
42
41
|
hbCommand = HausBusCommand(self.objectId, 202, "evHigh")
|
43
42
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
44
43
|
hbCommand.send()
|
45
|
-
|
44
|
+
LOGGER.debug("returns")
|
46
45
|
|
47
46
|
"""
|
48
47
|
@param value gemessener Druck in Pa.
|
49
48
|
@param lastEvent .
|
50
49
|
"""
|
51
50
|
def evStatus(self, value:int, lastEvent:ELastEvent):
|
52
|
-
|
51
|
+
LOGGER.debug("evStatus"+" value = "+str(value)+" lastEvent = "+str(lastEvent))
|
53
52
|
hbCommand = HausBusCommand(self.objectId, 203, "evStatus")
|
54
53
|
hbCommand.addWord(value)
|
55
54
|
hbCommand.addByte(lastEvent.value)
|
56
55
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
57
56
|
hbCommand.send()
|
58
|
-
|
57
|
+
LOGGER.debug("returns")
|
59
58
|
|
60
59
|
"""
|
61
60
|
"""
|
62
61
|
def getConfiguration(self):
|
63
|
-
|
62
|
+
LOGGER.debug("getConfiguration")
|
64
63
|
hbCommand = HausBusCommand(self.objectId, 0, "getConfiguration")
|
65
64
|
ResultWorker()._setResultInfo(Configuration,self.getObjectId())
|
66
65
|
hbCommand.send()
|
67
|
-
|
66
|
+
LOGGER.debug("returns")
|
68
67
|
|
69
68
|
"""
|
70
69
|
@param lowerThreshold untere Schwelle.
|
@@ -77,7 +76,7 @@ class Drucksensor(ABusFeature):
|
|
77
76
|
@param deltaSensorID Die InstanceID des Sensors auf diesem Controller.
|
78
77
|
"""
|
79
78
|
def setConfiguration(self, lowerThreshold:int, upperThreshold:int, reportTimeBase:int, minReportTime:int, maxReportTime:int, hysteresis:int, calibration:int, deltaSensorID:int):
|
80
|
-
|
79
|
+
LOGGER.debug("setConfiguration"+" lowerThreshold = "+str(lowerThreshold)+" upperThreshold = "+str(upperThreshold)+" reportTimeBase = "+str(reportTimeBase)+" minReportTime = "+str(minReportTime)+" maxReportTime = "+str(maxReportTime)+" hysteresis = "+str(hysteresis)+" calibration = "+str(calibration)+" deltaSensorID = "+str(deltaSensorID))
|
81
80
|
hbCommand = HausBusCommand(self.objectId, 1, "setConfiguration")
|
82
81
|
hbCommand.addWord(lowerThreshold)
|
83
82
|
hbCommand.addWord(upperThreshold)
|
@@ -89,16 +88,16 @@ class Drucksensor(ABusFeature):
|
|
89
88
|
hbCommand.addByte(deltaSensorID)
|
90
89
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
91
90
|
hbCommand.send()
|
92
|
-
|
91
|
+
LOGGER.debug("returns")
|
93
92
|
|
94
93
|
"""
|
95
94
|
"""
|
96
95
|
def getStatus(self):
|
97
|
-
|
96
|
+
LOGGER.debug("getStatus")
|
98
97
|
hbCommand = HausBusCommand(self.objectId, 2, "getStatus")
|
99
98
|
ResultWorker()._setResultInfo(Status,self.getObjectId())
|
100
99
|
hbCommand.send()
|
101
|
-
|
100
|
+
LOGGER.debug("returns")
|
102
101
|
|
103
102
|
"""
|
104
103
|
@param lowerThreshold untere Schwelle.
|
@@ -111,7 +110,7 @@ class Drucksensor(ABusFeature):
|
|
111
110
|
@param deltaSensorID Die InstanceID des Sensors auf diesem Controller.
|
112
111
|
"""
|
113
112
|
def Configuration(self, lowerThreshold:int, upperThreshold:int, reportTimeBase:int, minReportTime:int, maxReportTime:int, hysteresis:int, calibration:int, deltaSensorID:int):
|
114
|
-
|
113
|
+
LOGGER.debug("Configuration"+" lowerThreshold = "+str(lowerThreshold)+" upperThreshold = "+str(upperThreshold)+" reportTimeBase = "+str(reportTimeBase)+" minReportTime = "+str(minReportTime)+" maxReportTime = "+str(maxReportTime)+" hysteresis = "+str(hysteresis)+" calibration = "+str(calibration)+" deltaSensorID = "+str(deltaSensorID))
|
115
114
|
hbCommand = HausBusCommand(self.objectId, 128, "Configuration")
|
116
115
|
hbCommand.addWord(lowerThreshold)
|
117
116
|
hbCommand.addWord(upperThreshold)
|
@@ -123,19 +122,19 @@ class Drucksensor(ABusFeature):
|
|
123
122
|
hbCommand.addByte(deltaSensorID)
|
124
123
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
125
124
|
hbCommand.send()
|
126
|
-
|
125
|
+
LOGGER.debug("returns")
|
127
126
|
|
128
127
|
"""
|
129
128
|
@param value aktuell gemessener Druck in Pa.
|
130
129
|
@param lastEvent .
|
131
130
|
"""
|
132
131
|
def Status(self, value:int, lastEvent:ELastEvent):
|
133
|
-
|
132
|
+
LOGGER.debug("Status"+" value = "+str(value)+" lastEvent = "+str(lastEvent))
|
134
133
|
hbCommand = HausBusCommand(self.objectId, 129, "Status")
|
135
134
|
hbCommand.addWord(value)
|
136
135
|
hbCommand.addByte(lastEvent.value)
|
137
136
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
138
137
|
hbCommand.send()
|
139
|
-
|
138
|
+
LOGGER.debug("returns")
|
140
139
|
|
141
140
|
|
@@ -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 Ethernet(ABusFeature):
|
|
27
26
|
@param mac0 .
|
28
27
|
"""
|
29
28
|
def wakeUpDevice(self, mac5:int, mac4:int, mac3:int, mac2:int, mac1:int, mac0:int):
|
30
|
-
|
29
|
+
LOGGER.debug("wakeUpDevice"+" mac5 = "+str(mac5)+" mac4 = "+str(mac4)+" mac3 = "+str(mac3)+" mac2 = "+str(mac2)+" mac1 = "+str(mac1)+" mac0 = "+str(mac0))
|
31
30
|
hbCommand = HausBusCommand(self.objectId, 2, "wakeUpDevice")
|
32
31
|
hbCommand.addByte(mac5)
|
33
32
|
hbCommand.addByte(mac4)
|
@@ -37,7 +36,7 @@ class Ethernet(ABusFeature):
|
|
37
36
|
hbCommand.addByte(mac0)
|
38
37
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
39
38
|
hbCommand.send()
|
40
|
-
|
39
|
+
LOGGER.debug("returns")
|
41
40
|
|
42
41
|
"""
|
43
42
|
@param IP0 Eigene IP-Adresse im Format IP0.IP1.IP2.IP3.
|
@@ -52,7 +51,7 @@ class Ethernet(ABusFeature):
|
|
52
51
|
@param Server_IP3 Server IP-Adresse im Format IP0.IP1.IP2.IP3 0.0.0.0 deaktiviert das Gateway 13 und 14.
|
53
52
|
"""
|
54
53
|
def Configuration(self, IP0:int, IP1:int, IP2:int, IP3:int, options:MOptions, Server_Port:int, Server_IP0:int, Server_IP1:int, Server_IP2:int, Server_IP3:int):
|
55
|
-
|
54
|
+
LOGGER.debug("Configuration"+" IP0 = "+str(IP0)+" IP1 = "+str(IP1)+" IP2 = "+str(IP2)+" IP3 = "+str(IP3)+" options = "+str(options)+" Server_Port = "+str(Server_Port)+" Server_IP0 = "+str(Server_IP0)+" Server_IP1 = "+str(Server_IP1)+" Server_IP2 = "+str(Server_IP2)+" Server_IP3 = "+str(Server_IP3))
|
56
55
|
hbCommand = HausBusCommand(self.objectId, 128, "Configuration")
|
57
56
|
hbCommand.addByte(IP0)
|
58
57
|
hbCommand.addByte(IP1)
|
@@ -66,7 +65,7 @@ class Ethernet(ABusFeature):
|
|
66
65
|
hbCommand.addByte(Server_IP3)
|
67
66
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
68
67
|
hbCommand.send()
|
69
|
-
|
68
|
+
LOGGER.debug("returns")
|
70
69
|
|
71
70
|
"""
|
72
71
|
@param IP0 .
|
@@ -81,7 +80,7 @@ class Ethernet(ABusFeature):
|
|
81
80
|
@param Server_IP3 Server IP-Adresse im Format IP0.IP1.IP2.IP3 0.0.0.0 deaktiviert das Gateway 13 und 14.
|
82
81
|
"""
|
83
82
|
def setConfiguration(self, IP0:int, IP1:int, IP2:int, IP3:int, options:MOptions, Server_Port:int, Server_IP0:int, Server_IP1:int, Server_IP2:int, Server_IP3:int):
|
84
|
-
|
83
|
+
LOGGER.debug("setConfiguration"+" IP0 = "+str(IP0)+" IP1 = "+str(IP1)+" IP2 = "+str(IP2)+" IP3 = "+str(IP3)+" options = "+str(options)+" Server_Port = "+str(Server_Port)+" Server_IP0 = "+str(Server_IP0)+" Server_IP1 = "+str(Server_IP1)+" Server_IP2 = "+str(Server_IP2)+" Server_IP3 = "+str(Server_IP3))
|
85
84
|
hbCommand = HausBusCommand(self.objectId, 1, "setConfiguration")
|
86
85
|
hbCommand.addByte(IP0)
|
87
86
|
hbCommand.addByte(IP1)
|
@@ -95,27 +94,27 @@ class Ethernet(ABusFeature):
|
|
95
94
|
hbCommand.addByte(Server_IP3)
|
96
95
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
97
96
|
hbCommand.send()
|
98
|
-
|
97
|
+
LOGGER.debug("returns")
|
99
98
|
|
100
99
|
"""
|
101
100
|
"""
|
102
101
|
def getConfiguration(self):
|
103
|
-
|
102
|
+
LOGGER.debug("getConfiguration")
|
104
103
|
hbCommand = HausBusCommand(self.objectId, 0, "getConfiguration")
|
105
104
|
ResultWorker()._setResultInfo(Configuration,self.getObjectId())
|
106
105
|
hbCommand.send()
|
107
|
-
|
106
|
+
LOGGER.debug("returns")
|
108
107
|
|
109
108
|
"""
|
110
109
|
@param errorCode .
|
111
110
|
"""
|
112
111
|
def evError(self, errorCode:EErrorCode):
|
113
|
-
|
112
|
+
LOGGER.debug("evError"+" errorCode = "+str(errorCode))
|
114
113
|
hbCommand = HausBusCommand(self.objectId, 255, "evError")
|
115
114
|
hbCommand.addByte(errorCode.value)
|
116
115
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
117
116
|
hbCommand.send()
|
118
|
-
|
117
|
+
LOGGER.debug("returns")
|
119
118
|
|
120
119
|
"""
|
121
120
|
@param IP0 .
|
@@ -124,7 +123,7 @@ class Ethernet(ABusFeature):
|
|
124
123
|
@param IP3 .
|
125
124
|
"""
|
126
125
|
def CurrentIp(self, IP0:int, IP1:int, IP2:int, IP3:int):
|
127
|
-
|
126
|
+
LOGGER.debug("CurrentIp"+" IP0 = "+str(IP0)+" IP1 = "+str(IP1)+" IP2 = "+str(IP2)+" IP3 = "+str(IP3))
|
128
127
|
hbCommand = HausBusCommand(self.objectId, 129, "CurrentIp")
|
129
128
|
hbCommand.addByte(IP0)
|
130
129
|
hbCommand.addByte(IP1)
|
@@ -132,15 +131,15 @@ class Ethernet(ABusFeature):
|
|
132
131
|
hbCommand.addByte(IP3)
|
133
132
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
134
133
|
hbCommand.send()
|
135
|
-
|
134
|
+
LOGGER.debug("returns")
|
136
135
|
|
137
136
|
"""
|
138
137
|
"""
|
139
138
|
def getCurrentIp(self):
|
140
|
-
|
139
|
+
LOGGER.debug("getCurrentIp")
|
141
140
|
hbCommand = HausBusCommand(self.objectId, 3, "getCurrentIp")
|
142
141
|
ResultWorker()._setResultInfo(CurrentIp,self.getObjectId())
|
143
142
|
hbCommand.send()
|
144
|
-
|
143
|
+
LOGGER.debug("returns")
|
145
144
|
|
146
145
|
|
@@ -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,49 +20,49 @@ class Feuchtesensor(ABusFeature):
|
|
21
20
|
"""
|
22
21
|
"""
|
23
22
|
def evDry(self):
|
24
|
-
|
23
|
+
LOGGER.debug("evDry")
|
25
24
|
hbCommand = HausBusCommand(self.objectId, 200, "evDry")
|
26
25
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
27
26
|
hbCommand.send()
|
28
|
-
|
27
|
+
LOGGER.debug("returns")
|
29
28
|
|
30
29
|
"""
|
31
30
|
"""
|
32
31
|
def evConfortable(self):
|
33
|
-
|
32
|
+
LOGGER.debug("evConfortable")
|
34
33
|
hbCommand = HausBusCommand(self.objectId, 201, "evConfortable")
|
35
34
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
36
35
|
hbCommand.send()
|
37
|
-
|
36
|
+
LOGGER.debug("returns")
|
38
37
|
|
39
38
|
"""
|
40
39
|
"""
|
41
40
|
def evWet(self):
|
42
|
-
|
41
|
+
LOGGER.debug("evWet")
|
43
42
|
hbCommand = HausBusCommand(self.objectId, 202, "evWet")
|
44
43
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
45
44
|
hbCommand.send()
|
46
|
-
|
45
|
+
LOGGER.debug("returns")
|
47
46
|
|
48
47
|
"""
|
49
48
|
@param errorCode .
|
50
49
|
"""
|
51
50
|
def evError(self, errorCode:EErrorCode):
|
52
|
-
|
51
|
+
LOGGER.debug("evError"+" errorCode = "+str(errorCode))
|
53
52
|
hbCommand = HausBusCommand(self.objectId, 255, "evError")
|
54
53
|
hbCommand.addByte(errorCode.value)
|
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 getConfiguration(self):
|
62
|
-
|
61
|
+
LOGGER.debug("getConfiguration")
|
63
62
|
hbCommand = HausBusCommand(self.objectId, 0, "getConfiguration")
|
64
63
|
ResultWorker()._setResultInfo(Configuration,self.getObjectId())
|
65
64
|
hbCommand.send()
|
66
|
-
|
65
|
+
LOGGER.debug("returns")
|
67
66
|
|
68
67
|
"""
|
69
68
|
@param lowerThreshold untere Temperaturschwelle.
|
@@ -78,7 +77,7 @@ class Feuchtesensor(ABusFeature):
|
|
78
77
|
@param deltaSensorID Die InstanceID des Sensors auf diesem Controller.
|
79
78
|
"""
|
80
79
|
def setConfiguration(self, lowerThreshold:int, lowerThresholdFraction:int, upperThreshold:int, upperThresholdFraction:int, reportTimeBase:int, minReportTime:int, maxReportTime:int, hysteresis:int, calibration:int, deltaSensorID:int):
|
81
|
-
|
80
|
+
LOGGER.debug("setConfiguration"+" lowerThreshold = "+str(lowerThreshold)+" lowerThresholdFraction = "+str(lowerThresholdFraction)+" upperThreshold = "+str(upperThreshold)+" upperThresholdFraction = "+str(upperThresholdFraction)+" reportTimeBase = "+str(reportTimeBase)+" minReportTime = "+str(minReportTime)+" maxReportTime = "+str(maxReportTime)+" hysteresis = "+str(hysteresis)+" calibration = "+str(calibration)+" deltaSensorID = "+str(deltaSensorID))
|
82
81
|
hbCommand = HausBusCommand(self.objectId, 1, "setConfiguration")
|
83
82
|
hbCommand.addByte(lowerThreshold)
|
84
83
|
hbCommand.addByte(lowerThresholdFraction)
|
@@ -92,16 +91,16 @@ class Feuchtesensor(ABusFeature):
|
|
92
91
|
hbCommand.addByte(deltaSensorID)
|
93
92
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
94
93
|
hbCommand.send()
|
95
|
-
|
94
|
+
LOGGER.debug("returns")
|
96
95
|
|
97
96
|
"""
|
98
97
|
"""
|
99
98
|
def getStatus(self):
|
100
|
-
|
99
|
+
LOGGER.debug("getStatus")
|
101
100
|
hbCommand = HausBusCommand(self.objectId, 2, "getStatus")
|
102
101
|
ResultWorker()._setResultInfo(Status,self.getObjectId())
|
103
102
|
hbCommand.send()
|
104
|
-
|
103
|
+
LOGGER.debug("returns")
|
105
104
|
|
106
105
|
"""
|
107
106
|
@param lowerThreshold untere Temperaturschwelle.
|
@@ -116,7 +115,7 @@ class Feuchtesensor(ABusFeature):
|
|
116
115
|
@param deltaSensorID Die InstanceID des Sensors auf diesem Controller.
|
117
116
|
"""
|
118
117
|
def Configuration(self, lowerThreshold:int, lowerThresholdFraction:int, upperThreshold:int, upperThresholdFraction:int, reportTimeBase:int, minReportTime:int, maxReportTime:int, hysteresis:int, calibration:int, deltaSensorID:int):
|
119
|
-
|
118
|
+
LOGGER.debug("Configuration"+" lowerThreshold = "+str(lowerThreshold)+" lowerThresholdFraction = "+str(lowerThresholdFraction)+" upperThreshold = "+str(upperThreshold)+" upperThresholdFraction = "+str(upperThresholdFraction)+" reportTimeBase = "+str(reportTimeBase)+" minReportTime = "+str(minReportTime)+" maxReportTime = "+str(maxReportTime)+" hysteresis = "+str(hysteresis)+" calibration = "+str(calibration)+" deltaSensorID = "+str(deltaSensorID))
|
120
119
|
hbCommand = HausBusCommand(self.objectId, 128, "Configuration")
|
121
120
|
hbCommand.addByte(lowerThreshold)
|
122
121
|
hbCommand.addByte(lowerThresholdFraction)
|
@@ -130,7 +129,7 @@ class Feuchtesensor(ABusFeature):
|
|
130
129
|
hbCommand.addByte(deltaSensorID)
|
131
130
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
132
131
|
hbCommand.send()
|
133
|
-
|
132
|
+
LOGGER.debug("returns")
|
134
133
|
|
135
134
|
"""
|
136
135
|
@param relativeHumidity Relative Luftfeuchte in %.
|
@@ -138,14 +137,14 @@ class Feuchtesensor(ABusFeature):
|
|
138
137
|
@param lastEvent .
|
139
138
|
"""
|
140
139
|
def evStatus(self, relativeHumidity:int, centiHumidity:int, lastEvent:ELastEvent):
|
141
|
-
|
140
|
+
LOGGER.debug("evStatus"+" relativeHumidity = "+str(relativeHumidity)+" centiHumidity = "+str(centiHumidity)+" lastEvent = "+str(lastEvent))
|
142
141
|
hbCommand = HausBusCommand(self.objectId, 203, "evStatus")
|
143
142
|
hbCommand.addByte(relativeHumidity)
|
144
143
|
hbCommand.addByte(centiHumidity)
|
145
144
|
hbCommand.addByte(lastEvent.value)
|
146
145
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
147
146
|
hbCommand.send()
|
148
|
-
|
147
|
+
LOGGER.debug("returns")
|
149
148
|
|
150
149
|
"""
|
151
150
|
@param relativeHumidity Relative Luftfeuchte in %.
|
@@ -153,13 +152,13 @@ class Feuchtesensor(ABusFeature):
|
|
153
152
|
@param lastEvent .
|
154
153
|
"""
|
155
154
|
def Status(self, relativeHumidity:int, centiHumidity:int, lastEvent:ELastEvent):
|
156
|
-
|
155
|
+
LOGGER.debug("Status"+" relativeHumidity = "+str(relativeHumidity)+" centiHumidity = "+str(centiHumidity)+" lastEvent = "+str(lastEvent))
|
157
156
|
hbCommand = HausBusCommand(self.objectId, 129, "Status")
|
158
157
|
hbCommand.addByte(relativeHumidity)
|
159
158
|
hbCommand.addByte(centiHumidity)
|
160
159
|
hbCommand.addByte(lastEvent.value)
|
161
160
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
162
161
|
hbCommand.send()
|
163
|
-
|
162
|
+
LOGGER.debug("returns")
|
164
163
|
|
165
164
|
|