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,62 +20,62 @@ class PT1000(ABusFeature):
|
|
21
20
|
"""
|
22
21
|
"""
|
23
22
|
def evLow(self):
|
24
|
-
|
23
|
+
LOGGER.debug("evLow")
|
25
24
|
hbCommand = HausBusCommand(self.objectId, 200, "evLow")
|
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 evInRange(self):
|
33
|
-
|
32
|
+
LOGGER.debug("evInRange")
|
34
33
|
hbCommand = HausBusCommand(self.objectId, 201, "evInRange")
|
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 evHigh(self):
|
42
|
-
|
41
|
+
LOGGER.debug("evHigh")
|
43
42
|
hbCommand = HausBusCommand(self.objectId, 202, "evHigh")
|
44
43
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
45
44
|
hbCommand.send()
|
46
|
-
|
45
|
+
LOGGER.debug("returns")
|
47
46
|
|
48
47
|
"""
|
49
48
|
@param celsius Grad Celsius.
|
50
49
|
@param lastEvent .
|
51
50
|
"""
|
52
51
|
def evStatus(self, celsius:int, lastEvent:ELastEvent):
|
53
|
-
|
52
|
+
LOGGER.debug("evStatus"+" celsius = "+str(celsius)+" lastEvent = "+str(lastEvent))
|
54
53
|
hbCommand = HausBusCommand(self.objectId, 203, "evStatus")
|
55
54
|
hbCommand.addWord(celsius)
|
56
55
|
hbCommand.addByte(lastEvent.value)
|
57
56
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
58
57
|
hbCommand.send()
|
59
|
-
|
58
|
+
LOGGER.debug("returns")
|
60
59
|
|
61
60
|
"""
|
62
61
|
@param errorCode .
|
63
62
|
"""
|
64
63
|
def evError(self, errorCode:EErrorCode):
|
65
|
-
|
64
|
+
LOGGER.debug("evError"+" errorCode = "+str(errorCode))
|
66
65
|
hbCommand = HausBusCommand(self.objectId, 255, "evError")
|
67
66
|
hbCommand.addByte(errorCode.value)
|
68
67
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
69
68
|
hbCommand.send()
|
70
|
-
|
69
|
+
LOGGER.debug("returns")
|
71
70
|
|
72
71
|
"""
|
73
72
|
"""
|
74
73
|
def getConfiguration(self):
|
75
|
-
|
74
|
+
LOGGER.debug("getConfiguration")
|
76
75
|
hbCommand = HausBusCommand(self.objectId, 0, "getConfiguration")
|
77
76
|
ResultWorker()._setResultInfo(Configuration,self.getObjectId())
|
78
77
|
hbCommand.send()
|
79
|
-
|
78
|
+
LOGGER.debug("returns")
|
80
79
|
|
81
80
|
"""
|
82
81
|
@param lowerThreshold untere Temperaturschwelle.
|
@@ -89,7 +88,7 @@ class PT1000(ABusFeature):
|
|
89
88
|
@param deltaSensorID Die InstanceID des Sensors auf diesem Controller.
|
90
89
|
"""
|
91
90
|
def setConfiguration(self, lowerThreshold:int, upperThreshold:int, reportTimeBase:int, minReportTime:int, maxReportTime:int, hysteresis:int, calibration:int, deltaSensorID:int):
|
92
|
-
|
91
|
+
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))
|
93
92
|
hbCommand = HausBusCommand(self.objectId, 1, "setConfiguration")
|
94
93
|
hbCommand.addWord(lowerThreshold)
|
95
94
|
hbCommand.addWord(upperThreshold)
|
@@ -101,16 +100,16 @@ class PT1000(ABusFeature):
|
|
101
100
|
hbCommand.addByte(deltaSensorID)
|
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 getStatus(self):
|
109
|
-
|
108
|
+
LOGGER.debug("getStatus")
|
110
109
|
hbCommand = HausBusCommand(self.objectId, 2, "getStatus")
|
111
110
|
ResultWorker()._setResultInfo(Status,self.getObjectId())
|
112
111
|
hbCommand.send()
|
113
|
-
|
112
|
+
LOGGER.debug("returns")
|
114
113
|
|
115
114
|
"""
|
116
115
|
@param lowerThreshold untere Temperaturschwelle.
|
@@ -123,7 +122,7 @@ class PT1000(ABusFeature):
|
|
123
122
|
@param deltaSensorID Die InstanceID des Sensors auf diesem Controller.
|
124
123
|
"""
|
125
124
|
def Configuration(self, lowerThreshold:int, upperThreshold:int, reportTimeBase:int, minReportTime:int, maxReportTime:int, hysteresis:int, calibration:int, deltaSensorID:int):
|
126
|
-
|
125
|
+
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))
|
127
126
|
hbCommand = HausBusCommand(self.objectId, 128, "Configuration")
|
128
127
|
hbCommand.addWord(lowerThreshold)
|
129
128
|
hbCommand.addWord(upperThreshold)
|
@@ -135,19 +134,19 @@ class PT1000(ABusFeature):
|
|
135
134
|
hbCommand.addByte(deltaSensorID)
|
136
135
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
137
136
|
hbCommand.send()
|
138
|
-
|
137
|
+
LOGGER.debug("returns")
|
139
138
|
|
140
139
|
"""
|
141
140
|
@param celsius Grad Celsius.
|
142
141
|
@param lastEvent .
|
143
142
|
"""
|
144
143
|
def Status(self, celsius:int, lastEvent:ELastEvent):
|
145
|
-
|
144
|
+
LOGGER.debug("Status"+" celsius = "+str(celsius)+" lastEvent = "+str(lastEvent))
|
146
145
|
hbCommand = HausBusCommand(self.objectId, 129, "Status")
|
147
146
|
hbCommand.addWord(celsius)
|
148
147
|
hbCommand.addByte(lastEvent.value)
|
149
148
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
150
149
|
hbCommand.send()
|
151
|
-
|
150
|
+
LOGGER.debug("returns")
|
152
151
|
|
153
152
|
|
@@ -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 PowerMeter(ABusFeature):
|
|
21
20
|
"""
|
22
21
|
"""
|
23
22
|
def evLowPower(self):
|
24
|
-
|
23
|
+
LOGGER.debug("evLowPower")
|
25
24
|
hbCommand = HausBusCommand(self.objectId, 200, "evLowPower")
|
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 evMediumPower(self):
|
33
|
-
|
32
|
+
LOGGER.debug("evMediumPower")
|
34
33
|
hbCommand = HausBusCommand(self.objectId, 201, "evMediumPower")
|
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 evHighPower(self):
|
42
|
-
|
41
|
+
LOGGER.debug("evHighPower")
|
43
42
|
hbCommand = HausBusCommand(self.objectId, 202, "evHighPower")
|
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 Leistungsschwelle[kWh].
|
@@ -78,7 +77,7 @@ class PowerMeter(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.addSByte(lowerThreshold)
|
84
83
|
hbCommand.addSByte(lowerThresholdFraction)
|
@@ -92,16 +91,16 @@ class PowerMeter(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 Leistungsschwelle[kWh].
|
@@ -116,7 +115,7 @@ class PowerMeter(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.addSByte(lowerThreshold)
|
122
121
|
hbCommand.addSByte(lowerThresholdFraction)
|
@@ -130,7 +129,7 @@ class PowerMeter(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 power Aktueller Stromverbrauch.
|
@@ -138,14 +137,14 @@ class PowerMeter(ABusFeature):
|
|
138
137
|
@param lastEvent .
|
139
138
|
"""
|
140
139
|
def Status(self, power:int, centiPower:int, lastEvent:ELastEvent):
|
141
|
-
|
140
|
+
LOGGER.debug("Status"+" power = "+str(power)+" centiPower = "+str(centiPower)+" lastEvent = "+str(lastEvent))
|
142
141
|
hbCommand = HausBusCommand(self.objectId, 129, "Status")
|
143
142
|
hbCommand.addSByte(power)
|
144
143
|
hbCommand.addSByte(centiPower)
|
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 power Stromverbrauch [kWh].
|
@@ -153,13 +152,13 @@ class PowerMeter(ABusFeature):
|
|
153
152
|
@param lastEvent .
|
154
153
|
"""
|
155
154
|
def evStatus(self, power:int, centiPower:int, lastEvent:ELastEvent):
|
156
|
-
|
155
|
+
LOGGER.debug("evStatus"+" power = "+str(power)+" centiPower = "+str(centiPower)+" lastEvent = "+str(lastEvent))
|
157
156
|
hbCommand = HausBusCommand(self.objectId, 203, "evStatus")
|
158
157
|
hbCommand.addSByte(power)
|
159
158
|
hbCommand.addSByte(centiPower)
|
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
|
|
@@ -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
|
@@ -22,99 +21,99 @@ class RFIDReader(ABusFeature):
|
|
22
21
|
"""
|
23
22
|
"""
|
24
23
|
def evConnected(self):
|
25
|
-
|
24
|
+
LOGGER.debug("evConnected")
|
26
25
|
hbCommand = HausBusCommand(self.objectId, 200, "evConnected")
|
27
26
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
28
27
|
hbCommand.send()
|
29
|
-
|
28
|
+
LOGGER.debug("returns")
|
30
29
|
|
31
30
|
"""
|
32
31
|
@param errorCode .
|
33
32
|
"""
|
34
33
|
def evError(self, errorCode:EErrorCode):
|
35
|
-
|
34
|
+
LOGGER.debug("evError"+" errorCode = "+str(errorCode))
|
36
35
|
hbCommand = HausBusCommand(self.objectId, 255, "evError")
|
37
36
|
hbCommand.addByte(errorCode.value)
|
38
37
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
39
38
|
hbCommand.send()
|
40
|
-
|
39
|
+
LOGGER.debug("returns")
|
41
40
|
|
42
41
|
"""
|
43
42
|
"""
|
44
43
|
def getConfiguration(self):
|
45
|
-
|
44
|
+
LOGGER.debug("getConfiguration")
|
46
45
|
hbCommand = HausBusCommand(self.objectId, 0, "getConfiguration")
|
47
46
|
ResultWorker()._setResultInfo(Configuration,self.getObjectId())
|
48
47
|
hbCommand.send()
|
49
|
-
|
48
|
+
LOGGER.debug("returns")
|
50
49
|
|
51
50
|
"""
|
52
51
|
"""
|
53
52
|
def setConfiguration(self):
|
54
|
-
|
53
|
+
LOGGER.debug("setConfiguration")
|
55
54
|
hbCommand = HausBusCommand(self.objectId, 1, "setConfiguration")
|
56
55
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
57
56
|
hbCommand.send()
|
58
|
-
|
57
|
+
LOGGER.debug("returns")
|
59
58
|
|
60
59
|
"""
|
61
60
|
@param state State of the RFID-Reader hardware.
|
62
61
|
"""
|
63
62
|
def State(self, state:EState):
|
64
|
-
|
63
|
+
LOGGER.debug("State"+" state = "+str(state))
|
65
64
|
hbCommand = HausBusCommand(self.objectId, 129, "State")
|
66
65
|
hbCommand.addByte(state.value)
|
67
66
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
68
67
|
hbCommand.send()
|
69
|
-
|
68
|
+
LOGGER.debug("returns")
|
70
69
|
|
71
70
|
"""
|
72
71
|
@param tagID ID of the detected RFID tag.
|
73
72
|
"""
|
74
73
|
def evData(self, tagID:int):
|
75
|
-
|
74
|
+
LOGGER.debug("evData"+" tagID = "+str(tagID))
|
76
75
|
hbCommand = HausBusCommand(self.objectId, 201, "evData")
|
77
76
|
hbCommand.addDWord(tagID)
|
78
77
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
79
78
|
hbCommand.send()
|
80
|
-
|
79
|
+
LOGGER.debug("returns")
|
81
80
|
|
82
81
|
"""
|
83
82
|
"""
|
84
83
|
def getLastData(self):
|
85
|
-
|
84
|
+
LOGGER.debug("getLastData")
|
86
85
|
hbCommand = HausBusCommand(self.objectId, 3, "getLastData")
|
87
86
|
ResultWorker()._setResultInfo(LastData,self.getObjectId())
|
88
87
|
hbCommand.send()
|
89
|
-
|
88
|
+
LOGGER.debug("returns")
|
90
89
|
|
91
90
|
"""
|
92
91
|
@param tagID last tagID read successfully.
|
93
92
|
"""
|
94
93
|
def LastData(self, tagID:int):
|
95
|
-
|
94
|
+
LOGGER.debug("LastData"+" tagID = "+str(tagID))
|
96
95
|
hbCommand = HausBusCommand(self.objectId, 130, "LastData")
|
97
96
|
hbCommand.addDWord(tagID)
|
98
97
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
99
98
|
hbCommand.send()
|
100
|
-
|
99
|
+
LOGGER.debug("returns")
|
101
100
|
|
102
101
|
"""
|
103
102
|
"""
|
104
103
|
def Configuration(self):
|
105
|
-
|
104
|
+
LOGGER.debug("Configuration")
|
106
105
|
hbCommand = HausBusCommand(self.objectId, 128, "Configuration")
|
107
106
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
108
107
|
hbCommand.send()
|
109
|
-
|
108
|
+
LOGGER.debug("returns")
|
110
109
|
|
111
110
|
"""
|
112
111
|
"""
|
113
112
|
def getState(self):
|
114
|
-
|
113
|
+
LOGGER.debug("getState")
|
115
114
|
hbCommand = HausBusCommand(self.objectId, 2, "getState")
|
116
115
|
ResultWorker()._setResultInfo(State,self.getObjectId())
|
117
116
|
hbCommand.send()
|
118
|
-
|
117
|
+
LOGGER.debug("returns")
|
119
118
|
|
120
119
|
|
@@ -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 RGBDimmer(ABusFeature):
|
|
19
18
|
"""
|
20
19
|
"""
|
21
20
|
def evOff(self):
|
22
|
-
|
21
|
+
LOGGER.debug("evOff")
|
23
22
|
hbCommand = HausBusCommand(self.objectId, 200, "evOff")
|
24
23
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
25
24
|
hbCommand.send()
|
26
|
-
|
25
|
+
LOGGER.debug("returns")
|
27
26
|
|
28
27
|
"""
|
29
28
|
@param brightnessRed Helligkeit ROT-Anteil. \r\n0: AUS\r\n100: MAX.
|
@@ -32,7 +31,7 @@ class RGBDimmer(ABusFeature):
|
|
32
31
|
@param duration Einschaltdauer in Sekunden.
|
33
32
|
"""
|
34
33
|
def evOn(self, brightnessRed:int, brightnessGreen:int, brightnessBlue:int, duration:int):
|
35
|
-
|
34
|
+
LOGGER.debug("evOn"+" brightnessRed = "+str(brightnessRed)+" brightnessGreen = "+str(brightnessGreen)+" brightnessBlue = "+str(brightnessBlue)+" duration = "+str(duration))
|
36
35
|
hbCommand = HausBusCommand(self.objectId, 201, "evOn")
|
37
36
|
hbCommand.addByte(brightnessRed)
|
38
37
|
hbCommand.addByte(brightnessGreen)
|
@@ -40,7 +39,7 @@ class RGBDimmer(ABusFeature):
|
|
40
39
|
hbCommand.addWord(duration)
|
41
40
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
42
41
|
hbCommand.send()
|
43
|
-
|
42
|
+
LOGGER.debug("returns")
|
44
43
|
|
45
44
|
"""
|
46
45
|
@param brightnessRed Helligkeit ROT-Anteil. \r\n0: AUS\r\n100: MAX.
|
@@ -49,7 +48,7 @@ class RGBDimmer(ABusFeature):
|
|
49
48
|
@param duration Einschaltdauer in Sekunden.
|
50
49
|
"""
|
51
50
|
def setColor(self, brightnessRed:int, brightnessGreen:int, brightnessBlue:int, duration:int):
|
52
|
-
|
51
|
+
LOGGER.debug("setColor"+" brightnessRed = "+str(brightnessRed)+" brightnessGreen = "+str(brightnessGreen)+" brightnessBlue = "+str(brightnessBlue)+" duration = "+str(duration))
|
53
52
|
hbCommand = HausBusCommand(self.objectId, 2, "setColor")
|
54
53
|
hbCommand.addByte(brightnessRed)
|
55
54
|
hbCommand.addByte(brightnessGreen)
|
@@ -57,47 +56,47 @@ class RGBDimmer(ABusFeature):
|
|
57
56
|
hbCommand.addWord(duration)
|
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 getConfiguration(self):
|
65
|
-
|
64
|
+
LOGGER.debug("getConfiguration")
|
66
65
|
hbCommand = HausBusCommand(self.objectId, 0, "getConfiguration")
|
67
66
|
ResultWorker()._setResultInfo(Configuration,self.getObjectId())
|
68
67
|
hbCommand.send()
|
69
|
-
|
68
|
+
LOGGER.debug("returns")
|
70
69
|
|
71
70
|
"""
|
72
71
|
@param fadingTime Zeit a 50ms um 0-100% zu dimmen.
|
73
72
|
"""
|
74
73
|
def setConfiguration(self, fadingTime:int):
|
75
|
-
|
74
|
+
LOGGER.debug("setConfiguration"+" fadingTime = "+str(fadingTime))
|
76
75
|
hbCommand = HausBusCommand(self.objectId, 1, "setConfiguration")
|
77
76
|
hbCommand.addByte(fadingTime)
|
78
77
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
79
78
|
hbCommand.send()
|
80
|
-
|
79
|
+
LOGGER.debug("returns")
|
81
80
|
|
82
81
|
"""
|
83
82
|
"""
|
84
83
|
def getStatus(self):
|
85
|
-
|
84
|
+
LOGGER.debug("getStatus")
|
86
85
|
hbCommand = HausBusCommand(self.objectId, 5, "getStatus")
|
87
86
|
ResultWorker()._setResultInfo(Status,self.getObjectId())
|
88
87
|
hbCommand.send()
|
89
|
-
|
88
|
+
LOGGER.debug("returns")
|
90
89
|
|
91
90
|
"""
|
92
91
|
@param fadingTime Zeit a 50ms um zwischen den unterschiedlichen Helligkeitsstufen zu schalten.
|
93
92
|
"""
|
94
93
|
def Configuration(self, fadingTime:int):
|
95
|
-
|
94
|
+
LOGGER.debug("Configuration"+" fadingTime = "+str(fadingTime))
|
96
95
|
hbCommand = HausBusCommand(self.objectId, 128, "Configuration")
|
97
96
|
hbCommand.addByte(fadingTime)
|
98
97
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
99
98
|
hbCommand.send()
|
100
|
-
|
99
|
+
LOGGER.debug("returns")
|
101
100
|
|
102
101
|
"""
|
103
102
|
@param brightnessRed Helligkeit ROT-Anteil. \r\n0: AUS\r\n100: MAX.
|
@@ -106,7 +105,7 @@ class RGBDimmer(ABusFeature):
|
|
106
105
|
@param duration Einschaltdauer in Sekunden.
|
107
106
|
"""
|
108
107
|
def Status(self, brightnessRed:int, brightnessGreen:int, brightnessBlue:int, duration:int):
|
109
|
-
|
108
|
+
LOGGER.debug("Status"+" brightnessRed = "+str(brightnessRed)+" brightnessGreen = "+str(brightnessGreen)+" brightnessBlue = "+str(brightnessBlue)+" duration = "+str(duration))
|
110
109
|
hbCommand = HausBusCommand(self.objectId, 129, "Status")
|
111
110
|
hbCommand.addByte(brightnessRed)
|
112
111
|
hbCommand.addByte(brightnessGreen)
|
@@ -114,6 +113,6 @@ class RGBDimmer(ABusFeature):
|
|
114
113
|
hbCommand.addWord(duration)
|
115
114
|
ResultWorker()._setResultInfo(None,self.getObjectId())
|
116
115
|
hbCommand.send()
|
117
|
-
|
116
|
+
LOGGER.debug("returns")
|
118
117
|
|
119
118
|
|