weheat 2024.9.10__tar.gz → 2024.9.10rc2__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.
Potentially problematic release.
This version of weheat might be problematic. Click here for more details.
- {weheat-2024.9.10/weheat.egg-info → weheat-2024.9.10rc2}/PKG-INFO +1 -1
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/pyproject.toml +1 -1
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/setup.py +1 -1
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/abstractions/heat_pump.py +5 -26
- {weheat-2024.9.10 → weheat-2024.9.10rc2/weheat.egg-info}/PKG-INFO +1 -1
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/LICENSE +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/README.md +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/setup.cfg +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/__init__.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/abstractions/__init__.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/abstractions/auth.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/abstractions/discovery.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/abstractions/user.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/api/__init__.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/api/energy_log_api.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/api/heat_pump_api.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/api/heat_pump_log_api.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/api/user_api.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/api_client.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/api_response.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/configuration.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/exceptions.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/models/__init__.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/models/boiler_type.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/models/device_state.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/models/dhw_type.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/models/energy_view_dto.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/models/heat_pump_log_view_dto.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/models/heat_pump_model.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/models/heat_pump_status_enum.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/models/heat_pump_type.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/models/raw_heat_pump_log_dto.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/models/read_all_heat_pump_dto.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/models/read_heat_pump_dto.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/models/read_user_dto.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/models/role.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/py.typed +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat/rest.py +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat.egg-info/SOURCES.txt +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat.egg-info/dependency_links.txt +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat.egg-info/requires.txt +0 -0
- {weheat-2024.9.10 → weheat-2024.9.10rc2}/weheat.egg-info/top_level.txt +0 -0
|
@@ -21,7 +21,7 @@ from setuptools import setup, find_packages # noqa: H301
|
|
|
21
21
|
# prerequisite: setuptools
|
|
22
22
|
# http://pypi.python.org/pypi/setuptools
|
|
23
23
|
NAME = "weheat"
|
|
24
|
-
VERSION = "2024.09.
|
|
24
|
+
VERSION = "2024.09.10rc2"
|
|
25
25
|
PYTHON_REQUIRES = ">=3.7"
|
|
26
26
|
REQUIRES = [
|
|
27
27
|
"urllib3 >= 1.25.3, < 2.1.0",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"""Weheat heat pump abstraction from the API."""
|
|
2
1
|
from enum import Enum, auto
|
|
3
2
|
from weheat.configuration import Configuration
|
|
4
3
|
from weheat.api_client import ApiClient
|
|
@@ -6,12 +5,10 @@ from weheat.api.heat_pump_log_api import HeatPumpLogApi
|
|
|
6
5
|
from weheat.api.energy_log_api import EnergyLogApi
|
|
7
6
|
from datetime import datetime, timedelta
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
START_DATE = datetime(2023, 1, 1, 0, 0, 0)
|
|
8
|
+
START_DATE = datetime(2024, 1, 1, 0, 0, 0)
|
|
11
9
|
|
|
12
10
|
|
|
13
11
|
class HeatPump:
|
|
14
|
-
"""Heat pump class representing a heat pump."""
|
|
15
12
|
class State(Enum):
|
|
16
13
|
STANDBY = auto()
|
|
17
14
|
WATER_CHECK = auto()
|
|
@@ -30,7 +27,6 @@ class HeatPump:
|
|
|
30
27
|
self._energy_consumption = None
|
|
31
28
|
|
|
32
29
|
def get_status(self, access_token: str):
|
|
33
|
-
"""Updates the heat pump instance with data from the API."""
|
|
34
30
|
try:
|
|
35
31
|
config = Configuration(host=self._api_url, access_token=access_token)
|
|
36
32
|
|
|
@@ -59,16 +55,18 @@ class HeatPump:
|
|
|
59
55
|
self._energy_consumption += year.total_ein_heating_defrost
|
|
60
56
|
self._energy_consumption += year.total_ein_dhw
|
|
61
57
|
self._energy_consumption += year.total_ein_dhw_defrost
|
|
58
|
+
print(f'Summed for {self._uuid}: {self._energy_consumption}')
|
|
62
59
|
|
|
63
60
|
|
|
64
61
|
|
|
65
62
|
except Exception as e:
|
|
66
63
|
self._last_log = None
|
|
67
|
-
self._energy_consumption = None
|
|
68
64
|
raise e
|
|
69
65
|
|
|
66
|
+
def _update_properties(self):
|
|
67
|
+
pass
|
|
68
|
+
|
|
70
69
|
def _if_available(self, key):
|
|
71
|
-
"""Returns the value from the last logged value if available. None otherwise."""
|
|
72
70
|
if self._last_log is not None and hasattr(self._last_log, key):
|
|
73
71
|
return getattr(self._last_log, key)
|
|
74
72
|
return None
|
|
@@ -81,67 +79,54 @@ class HeatPump:
|
|
|
81
79
|
|
|
82
80
|
@property
|
|
83
81
|
def water_inlet_temperature(self):
|
|
84
|
-
"""The heat pump water inlet temperature."""
|
|
85
82
|
return self._if_available("t_water_in")
|
|
86
83
|
|
|
87
84
|
@property
|
|
88
85
|
def water_outlet_temperature(self):
|
|
89
|
-
"""The heat pump water outlet temperature."""
|
|
90
86
|
return self._if_available("t_water_out")
|
|
91
87
|
|
|
92
88
|
@property
|
|
93
89
|
def water_house_in_temperature(self):
|
|
94
|
-
"""The water house in temperature."""
|
|
95
90
|
return self._if_available("t_water_house_in")
|
|
96
91
|
|
|
97
92
|
@property
|
|
98
93
|
def air_inlet_temperature(self):
|
|
99
|
-
"""The heat pump air inlet temperature."""
|
|
100
94
|
return self._if_available("t_air_in")
|
|
101
95
|
|
|
102
96
|
@property
|
|
103
97
|
def air_outlet_temperature(self):
|
|
104
|
-
"""The heat pump air outlet temperature."""
|
|
105
98
|
return self._if_available("t_air_out")
|
|
106
99
|
|
|
107
100
|
@property
|
|
108
101
|
def thermostat_water_setpoint(self):
|
|
109
|
-
"""The thermostat water setpoint."""
|
|
110
102
|
return self._if_available("t_thermostat_setpoint")
|
|
111
103
|
|
|
112
104
|
@property
|
|
113
105
|
def thermostat_room_temperature(self):
|
|
114
|
-
"""The thermostat current room temperature."""
|
|
115
106
|
return self._if_available("t_room")
|
|
116
107
|
|
|
117
108
|
@property
|
|
118
109
|
def thermostat_room_temperature_setpoint(self):
|
|
119
|
-
"""The thermostat room temperature setpoint."""
|
|
120
110
|
return self._if_available("t_room_target")
|
|
121
111
|
|
|
122
112
|
@property
|
|
123
113
|
def thermostat_on_off_state(self):
|
|
124
|
-
"""The thermostat on/off state."""
|
|
125
114
|
return self._if_available("on_off_thermostat_state")
|
|
126
115
|
|
|
127
116
|
@property
|
|
128
117
|
def power_input(self):
|
|
129
|
-
"""The heat pumps power input."""
|
|
130
118
|
return self._if_available("cm_mass_power_in")
|
|
131
119
|
|
|
132
120
|
@property
|
|
133
121
|
def power_output(self):
|
|
134
|
-
"""The heat pumps hydraulic output power."""
|
|
135
122
|
return self._if_available("cm_mass_power_out")
|
|
136
123
|
|
|
137
124
|
@property
|
|
138
125
|
def dhw_top_temperature(self):
|
|
139
|
-
"""The DHW vessel top temperature."""
|
|
140
126
|
return self._if_available("t1")
|
|
141
127
|
|
|
142
128
|
@property
|
|
143
129
|
def dhw_bottom_temperature(self):
|
|
144
|
-
"""The DHW vessel bottom temperature."""
|
|
145
130
|
return self._if_available("t2")
|
|
146
131
|
|
|
147
132
|
@property
|
|
@@ -158,27 +143,22 @@ class HeatPump:
|
|
|
158
143
|
|
|
159
144
|
@property
|
|
160
145
|
def inside_unit_water_pump_state(self):
|
|
161
|
-
"""Decoded water pump state."""
|
|
162
146
|
return self._if_available("control_bridge_status_decoded_water_pump")
|
|
163
147
|
|
|
164
148
|
@property
|
|
165
149
|
def inside_unit_auxilary_pump_state(self):
|
|
166
|
-
"""Decoded auxilary pump state."""
|
|
167
150
|
return self._if_available("control_bridge_status_decoded_water_pump2")
|
|
168
151
|
|
|
169
152
|
@property
|
|
170
153
|
def inside_unit_dhw_valve_or_pump_state(self):
|
|
171
|
-
"""Decoded DHW valve or pump state."""
|
|
172
154
|
return self._if_available("control_bridge_status_decoded_dhw_valve")
|
|
173
155
|
|
|
174
156
|
@property
|
|
175
157
|
def inside_unit_gas_boiler_state(self):
|
|
176
|
-
"""Decoded gas boiler state."""
|
|
177
158
|
return self._if_available("control_bridge_status_decoded_gas_boiler")
|
|
178
159
|
|
|
179
160
|
@property
|
|
180
161
|
def heat_pump_state(self) -> State | None:
|
|
181
|
-
"""The heat pump state."""
|
|
182
162
|
numeric_state = self._if_available("state")
|
|
183
163
|
if numeric_state is None:
|
|
184
164
|
return None
|
|
@@ -203,5 +183,4 @@ class HeatPump:
|
|
|
203
183
|
|
|
204
184
|
@property
|
|
205
185
|
def energy_total(self):
|
|
206
|
-
"""The total used energy in kWh from 2023 to now."""
|
|
207
186
|
return self._energy_consumption
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|