PyViCare 2.53.1__tar.gz → 2.55.0__tar.gz

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.
Files changed (36) hide show
  1. {pyvicare-2.53.1 → pyvicare-2.55.0}/PKG-INFO +3 -4
  2. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareDevice.py +16 -10
  3. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareElectricalEnergySystem.py +31 -31
  4. pyvicare-2.55.0/PyViCare/PyViCareFloorHeating.py +36 -0
  5. pyvicare-2.55.0/PyViCare/PyViCareFuelCell.py +362 -0
  6. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareGateway.py +2 -2
  7. pyvicare-2.55.0/PyViCare/PyViCareGazBoiler.py +293 -0
  8. pyvicare-2.55.0/PyViCare/PyViCareHeatPump.py +487 -0
  9. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareHeatingDevice.py +81 -78
  10. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareOilBoiler.py +5 -5
  11. pyvicare-2.55.0/PyViCare/PyViCarePelletsBoiler.py +108 -0
  12. pyvicare-2.55.0/PyViCare/PyViCareRadiatorActuator.py +33 -0
  13. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareRoomSensor.py +3 -3
  14. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareVentilationDevice.py +90 -18
  15. {pyvicare-2.53.1 → pyvicare-2.55.0}/README.md +1 -1
  16. {pyvicare-2.53.1 → pyvicare-2.55.0}/pyproject.toml +4 -5
  17. pyvicare-2.53.1/PyViCare/PyViCareFloorHeating.py +0 -32
  18. pyvicare-2.53.1/PyViCare/PyViCareFuelCell.py +0 -362
  19. pyvicare-2.53.1/PyViCare/PyViCareGazBoiler.py +0 -293
  20. pyvicare-2.53.1/PyViCare/PyViCareHeatPump.py +0 -378
  21. pyvicare-2.53.1/PyViCare/PyViCarePelletsBoiler.py +0 -108
  22. pyvicare-2.53.1/PyViCare/PyViCareRadiatorActuator.py +0 -29
  23. {pyvicare-2.53.1 → pyvicare-2.55.0}/LICENSE +0 -0
  24. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/Feature.py +0 -0
  25. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCare.py +0 -0
  26. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareAbstractOAuthManager.py +0 -0
  27. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareBrowserOAuthManager.py +0 -0
  28. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareCachedService.py +0 -0
  29. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareDeviceConfig.py +0 -0
  30. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareHeatCurveCalculation.py +0 -0
  31. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareHybrid.py +0 -0
  32. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareOAuthManager.py +0 -0
  33. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareRepeater.py +0 -0
  34. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareService.py +0 -0
  35. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/PyViCareUtils.py +0 -0
  36. {pyvicare-2.53.1 → pyvicare-2.55.0}/PyViCare/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyViCare
3
- Version: 2.53.1
3
+ Version: 2.55.0
4
4
  Summary: Library to communicate with the Viessmann ViCare API.
5
5
  License: Apache-2.0
6
6
  License-File: LICENSE
@@ -9,13 +9,12 @@ Author: Simon Gillet
9
9
  Author-email: mail+pyvicare@gillet.ninja
10
10
  Maintainer: Christopher Fenner
11
11
  Maintainer-email: fenner.christopher@gmail.com
12
- Requires-Python: >=3.9,<4.0
12
+ Requires-Python: >=3.10,<4.0
13
13
  Classifier: Intended Audience :: Developers
14
14
  Classifier: License :: OSI Approved :: Apache Software License
15
15
  Classifier: Natural Language :: English
16
16
  Classifier: Operating System :: OS Independent
17
17
  Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.9
19
18
  Classifier: Programming Language :: Python :: 3.10
20
19
  Classifier: Programming Language :: Python :: 3.11
21
20
  Classifier: Programming Language :: Python :: 3.12
@@ -105,7 +104,7 @@ password = "password"
105
104
 
106
105
  vicare = PyViCare()
107
106
  vicare.initWithCredentials(email, password, client_id, "token.save")
108
- device = vicare.devices[0]
107
+ device = vicare.devices[1]
109
108
  print(device.getModel())
110
109
  print("Online" if device.isOnline() else "Offline")
111
110
 
@@ -14,13 +14,19 @@ class Device:
14
14
  def __init__(self, service: ViCareService) -> None:
15
15
  self.service = service
16
16
 
17
+ def getProperty(self, property_name: str) -> Any:
18
+ return self.service.getProperty(property_name)
19
+
20
+ def setProperty(self, property_name: str, action: str, data: Any) -> Any:
21
+ return self.service.setProperty(property_name, action, data)
22
+
17
23
  @handleNotSupported
18
24
  def getSerial(self):
19
- return self.service.getProperty("device.serial")["properties"]["value"]["value"]
25
+ return self.getProperty("device.serial")["properties"]["value"]["value"]
20
26
 
21
27
  @handleNotSupported
22
28
  def getDeviceErrors(self) -> list[Any]:
23
- return list[Any](self.service.getProperty("device.messages.errors.raw")["properties"]["entries"]["value"])
29
+ return list[Any](self.getProperty("device.messages.errors.raw")["properties"]["entries"]["value"])
24
30
 
25
31
  def isLegacyDevice(self) -> bool:
26
32
  return self.service.hasRoles(["type:legacy"])
@@ -39,7 +45,7 @@ class Device:
39
45
 
40
46
  def _isTypeDevice(self, deviceType: str):
41
47
  try:
42
- return self.service.getProperty(deviceType)["isEnabled"] and self.service.getProperty(deviceType)["properties"]["active"]["value"]
48
+ return self.getProperty(deviceType)["isEnabled"] and self.getProperty(deviceType)["properties"]["active"]["value"]
43
49
  except PyViCareNotSupportedFeatureError:
44
50
  return False
45
51
 
@@ -48,30 +54,30 @@ class ZigbeeDevice(Device):
48
54
 
49
55
  @handleNotSupported
50
56
  def getSerial(self) -> str:
51
- return str(self.service.getProperty("device.zigbee.parent.id")["deviceId"])
57
+ return str(self.getProperty("device.zigbee.parent.id")["deviceId"])
52
58
 
53
59
  @handleNotSupported
54
60
  def getZigbeeParentID(self) -> str:
55
- return str(self.service.getProperty("device.zigbee.parent.id")["properties"]["value"]["value"])
61
+ return str(self.getProperty("device.zigbee.parent.id")["properties"]["value"]["value"])
56
62
 
57
63
  @handleNotSupported
58
64
  def getZigbeeSignalStrength(self) -> int:
59
- return int(self.service.getProperty("device.zigbee.lqi")["properties"]["strength"]["value"])
65
+ return int(self.getProperty("device.zigbee.lqi")["properties"]["strength"]["value"])
60
66
 
61
67
  @handleNotSupported
62
68
  def getName(self) -> str:
63
- return str(self.service.getProperty("device.name")["properties"]["name"]["value"])
69
+ return str(self.getProperty("device.name")["properties"]["name"]["value"])
64
70
 
65
71
  @handleAPICommandErrors
66
72
  def setName(self, name: str) -> None:
67
- self.service.setProperty("device.name", "setName", {'name': name})
73
+ self.setProperty("device.name", "setName", {'name': name})
68
74
 
69
75
  @handleNotSupported
70
76
  def getIdentification(self) -> bool:
71
- return bool(self.service.getProperty("device.identification")["properties"]["triggered"]["value"])
77
+ return bool(self.getProperty("device.identification")["properties"]["triggered"]["value"])
72
78
 
73
79
  class ZigbeeBatteryDevice(ZigbeeDevice):
74
80
 
75
81
  @handleNotSupported
76
82
  def getBatteryLevel(self) -> int:
77
- return int(self.service.getProperty("device.power.battery")["properties"]["level"]["value"])
83
+ return int(self.getProperty("device.power.battery")["properties"]["level"]["value"])
@@ -6,182 +6,182 @@ class ElectricalEnergySystem(Device):
6
6
 
7
7
  @handleNotSupported
8
8
  def getPointOfCommonCouplingTransferPowerExchange(self):
9
- return self.service.getProperty("pcc.transfer.power.exchange")["properties"][
9
+ return self.getProperty("pcc.transfer.power.exchange")["properties"][
10
10
  "value"
11
11
  ]["value"]
12
12
 
13
13
  @handleNotSupported
14
14
  def getPhotovoltaicProductionCumulatedUnit(self):
15
- return self.service.getProperty("photovoltaic.production.cumulated")[
15
+ return self.getProperty("photovoltaic.production.cumulated")[
16
16
  "properties"
17
17
  ]["currentDay"]["unit"]
18
18
 
19
19
  @handleNotSupported
20
20
  def getPhotovoltaicProductionCumulatedCurrentDay(self):
21
- return self.service.getProperty("photovoltaic.production.cumulated")[
21
+ return self.getProperty("photovoltaic.production.cumulated")[
22
22
  "properties"
23
23
  ]["currentDay"]["value"]
24
24
 
25
25
  @handleNotSupported
26
26
  def getPhotovoltaicProductionCumulatedCurrentWeek(self):
27
- return self.service.getProperty("photovoltaic.production.cumulated")[
27
+ return self.getProperty("photovoltaic.production.cumulated")[
28
28
  "properties"
29
29
  ]["currentWeek"]["value"]
30
30
 
31
31
  @handleNotSupported
32
32
  def getPhotovoltaicProductionCumulatedCurrentMonth(self):
33
- return self.service.getProperty("photovoltaic.production.cumulated")[
33
+ return self.getProperty("photovoltaic.production.cumulated")[
34
34
  "properties"
35
35
  ]["currentMonth"]["value"]
36
36
 
37
37
  @handleNotSupported
38
38
  def getPhotovoltaicProductionCumulatedCurrentYear(self):
39
- return self.service.getProperty("photovoltaic.production.cumulated")[
39
+ return self.getProperty("photovoltaic.production.cumulated")[
40
40
  "properties"
41
41
  ]["currentYear"]["value"]
42
42
 
43
43
  @handleNotSupported
44
44
  def getPhotovoltaicProductionCumulatedLifeCycle(self):
45
- return self.service.getProperty("photovoltaic.production.cumulated")[
45
+ return self.getProperty("photovoltaic.production.cumulated")[
46
46
  "properties"
47
47
  ]["lifeCycle"]["value"]
48
48
 
49
49
  @handleNotSupported
50
50
  def getPhotovoltaicStatus(self):
51
- return self.service.getProperty("photovoltaic.status")["properties"]["status"][
51
+ return self.getProperty("photovoltaic.status")["properties"]["status"][
52
52
  "value"
53
53
  ]
54
54
 
55
55
  @handleNotSupported
56
56
  def getPhotovoltaicProductionCurrent(self):
57
- return self.service.getProperty("photovoltaic.production.current")[
57
+ return self.getProperty("photovoltaic.production.current")[
58
58
  "properties"
59
59
  ]["value"]["value"]
60
60
 
61
61
  @handleNotSupported
62
62
  def getPhotovoltaicProductionCurrentUnit(self):
63
- return self.service.getProperty("photovoltaic.production.current")[
63
+ return self.getProperty("photovoltaic.production.current")[
64
64
  "properties"
65
65
  ]["value"]["unit"]
66
66
 
67
67
  @handleNotSupported
68
68
  def getPointOfCommonCouplingTransferConsumptionTotal(self):
69
- return self.service.getProperty("pcc.transfer.consumption.total")["properties"][
69
+ return self.getProperty("pcc.transfer.consumption.total")["properties"][
70
70
  "value"
71
71
  ]["value"]
72
72
 
73
73
  @handleNotSupported
74
74
  def getPointOfCommonCouplingTransferConsumptionTotalUnit(self):
75
- return self.service.getProperty("pcc.transfer.consumption.total")["properties"][
75
+ return self.getProperty("pcc.transfer.consumption.total")["properties"][
76
76
  "value"
77
77
  ]["unit"]
78
78
 
79
79
  @handleNotSupported
80
80
  def getPointOfCommonCouplingTransferFeedInTotal(self):
81
- return self.service.getProperty("pcc.transfer.feedIn.total")["properties"][
81
+ return self.getProperty("pcc.transfer.feedIn.total")["properties"][
82
82
  "value"
83
83
  ]["value"]
84
84
 
85
85
  @handleNotSupported
86
86
  def getPointOfCommonCouplingTransferFeedInTotalUnit(self):
87
- return self.service.getProperty("pcc.transfer.feedIn.total")["properties"][
87
+ return self.getProperty("pcc.transfer.feedIn.total")["properties"][
88
88
  "value"
89
89
  ]["unit"]
90
90
 
91
91
  @handleNotSupported
92
92
  def getElectricalEnergySystemTransferChargeCumulatedUnit(self):
93
- return self.service.getProperty("ess.transfer.charge.cumulated")[
93
+ return self.getProperty("ess.transfer.charge.cumulated")[
94
94
  "properties"
95
95
  ]["currentDay"]["unit"]
96
96
 
97
97
  @handleNotSupported
98
98
  def getElectricalEnergySystemTransferChargeCumulatedCurrentDay(self):
99
- return self.service.getProperty("ess.transfer.charge.cumulated")[
99
+ return self.getProperty("ess.transfer.charge.cumulated")[
100
100
  "properties"
101
101
  ]["currentDay"]["value"]
102
102
 
103
103
  @handleNotSupported
104
104
  def getElectricalEnergySystemTransferChargeCumulatedCurrentWeek(self):
105
- return self.service.getProperty("ess.transfer.charge.cumulated")[
105
+ return self.getProperty("ess.transfer.charge.cumulated")[
106
106
  "properties"
107
107
  ]["currentWeek"]["value"]
108
108
 
109
109
  @handleNotSupported
110
110
  def getElectricalEnergySystemTransferChargeCumulatedCurrentMonth(self):
111
- return self.service.getProperty("ess.transfer.charge.cumulated")[
111
+ return self.getProperty("ess.transfer.charge.cumulated")[
112
112
  "properties"
113
113
  ]["currentMonth"]["value"]
114
114
 
115
115
  @handleNotSupported
116
116
  def getElectricalEnergySystemTransferChargeCumulatedCurrentYear(self):
117
- return self.service.getProperty("ess.transfer.charge.cumulated")[
117
+ return self.getProperty("ess.transfer.charge.cumulated")[
118
118
  "properties"
119
119
  ]["currentYear"]["value"]
120
120
 
121
121
  @handleNotSupported
122
122
  def getElectricalEnergySystemTransferChargeCumulatedLifeCycle(self):
123
- return self.service.getProperty("ess.transfer.charge.cumulated")[
123
+ return self.getProperty("ess.transfer.charge.cumulated")[
124
124
  "properties"
125
125
  ]["lifeCycle"]["value"]
126
126
 
127
127
  @handleNotSupported
128
128
  def getElectricalEnergySystemTransferDischargeCumulatedUnit(self):
129
- return self.service.getProperty("ess.transfer.discharge.cumulated")[
129
+ return self.getProperty("ess.transfer.discharge.cumulated")[
130
130
  "properties"
131
131
  ]["currentDay"]["unit"]
132
132
 
133
133
  @handleNotSupported
134
134
  def getElectricalEnergySystemTransferDischargeCumulatedCurrentDay(self):
135
- return self.service.getProperty("ess.transfer.discharge.cumulated")[
135
+ return self.getProperty("ess.transfer.discharge.cumulated")[
136
136
  "properties"
137
137
  ]["currentDay"]["value"]
138
138
 
139
139
  @handleNotSupported
140
140
  def getElectricalEnergySystemTransferDischargeCumulatedCurrentWeek(self):
141
- return self.service.getProperty("ess.transfer.discharge.cumulated")[
141
+ return self.getProperty("ess.transfer.discharge.cumulated")[
142
142
  "properties"
143
143
  ]["currentWeek"]["value"]
144
144
 
145
145
  @handleNotSupported
146
146
  def getElectricalEnergySystemTransferDischargeCumulatedCurrentMonth(self):
147
- return self.service.getProperty("ess.transfer.discharge.cumulated")[
147
+ return self.getProperty("ess.transfer.discharge.cumulated")[
148
148
  "properties"
149
149
  ]["currentMonth"]["value"]
150
150
 
151
151
  @handleNotSupported
152
152
  def getElectricalEnergySystemTransferDischargeCumulatedCurrentYear(self):
153
- return self.service.getProperty("ess.transfer.discharge.cumulated")[
153
+ return self.getProperty("ess.transfer.discharge.cumulated")[
154
154
  "properties"
155
155
  ]["currentYear"]["value"]
156
156
 
157
157
  @handleNotSupported
158
158
  def getElectricalEnergySystemTransferDischargeCumulatedLifeCycle(self):
159
- return self.service.getProperty("ess.transfer.discharge.cumulated")[
159
+ return self.getProperty("ess.transfer.discharge.cumulated")[
160
160
  "properties"
161
161
  ]["lifeCycle"]["value"]
162
162
 
163
163
  @handleNotSupported
164
164
  def getElectricalEnergySystemSOC(self):
165
- return self.service.getProperty("ess.stateOfCharge")["properties"]["value"][
165
+ return self.getProperty("ess.stateOfCharge")["properties"]["value"][
166
166
  "value"
167
167
  ]
168
168
 
169
169
  @handleNotSupported
170
170
  def getElectricalEnergySystemSOCUnit(self):
171
- return self.service.getProperty("ess.stateOfCharge")["properties"]["value"][
171
+ return self.getProperty("ess.stateOfCharge")["properties"]["value"][
172
172
  "unit"
173
173
  ]
174
174
 
175
175
  @handleNotSupported
176
176
  def getElectricalEnergySystemPower(self):
177
- return self.service.getProperty("ess.power")["properties"]["value"]["value"]
177
+ return self.getProperty("ess.power")["properties"]["value"]["value"]
178
178
 
179
179
  @handleNotSupported
180
180
  def getElectricalEnergySystemPowerUnit(self):
181
- return self.service.getProperty("ess.power")["properties"]["value"]["unit"]
181
+ return self.getProperty("ess.power")["properties"]["value"]["unit"]
182
182
 
183
183
  @handleNotSupported
184
184
  def getElectricalEnergySystemOperationState(self):
185
- return self.service.getProperty("ess.operationState")["properties"]["value"][
185
+ return self.getProperty("ess.operationState")["properties"]["value"][
186
186
  "value"
187
187
  ]
@@ -0,0 +1,36 @@
1
+ from PyViCare.PyViCareDevice import ZigbeeDevice, Device
2
+ from PyViCare.PyViCareUtils import handleAPICommandErrors, handleNotSupported
3
+
4
+
5
+ class FloorHeating(ZigbeeDevice):
6
+
7
+ @handleNotSupported
8
+ def getSupplyTemperature(self) -> float:
9
+ return float(self.getProperty("fht.sensors.temperature.supply")["properties"]["value"]["value"])
10
+
11
+ @handleNotSupported
12
+ def getActiveMode(self) -> str:
13
+ return str(self.getProperty("fht.operating.modes.active")["properties"]["value"]["value"])
14
+
15
+
16
+ class FloorHeatingChannel(Device):
17
+
18
+ @handleNotSupported
19
+ def getSerial(self) -> str:
20
+ return str(self.getProperty("device.name")["deviceId"])
21
+
22
+ @handleNotSupported
23
+ def getName(self) -> str:
24
+ return str(self.getProperty("device.name")["properties"]["name"]["value"])
25
+
26
+ @handleAPICommandErrors
27
+ def setName(self, name: str) -> None:
28
+ self.setProperty("device.name", "setName", {'name': name})
29
+
30
+ @handleNotSupported
31
+ def getValveState(self) -> str:
32
+ return str(self.getProperty("fht.valve.state")["properties"]["status"]["value"])
33
+
34
+ @handleNotSupported
35
+ def isValveOpen(self) -> bool:
36
+ return bool(self.getValveState() != "closed")