juham-automation 0.0.16__py3-none-any.whl → 0.0.17__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.
- juham_automation/automation/hotwateroptimizer.py +15 -7
- {juham_automation-0.0.16.dist-info → juham_automation-0.0.17.dist-info}/METADATA +1 -1
- {juham_automation-0.0.16.dist-info → juham_automation-0.0.17.dist-info}/RECORD +7 -7
- {juham_automation-0.0.16.dist-info → juham_automation-0.0.17.dist-info}/WHEEL +0 -0
- {juham_automation-0.0.16.dist-info → juham_automation-0.0.17.dist-info}/entry_points.txt +0 -0
- {juham_automation-0.0.16.dist-info → juham_automation-0.0.17.dist-info}/licenses/LICENSE.rst +0 -0
- {juham_automation-0.0.16.dist-info → juham_automation-0.0.17.dist-info}/top_level.txt +0 -0
@@ -16,13 +16,17 @@ from juham_core.timeutils import (
|
|
16
16
|
|
17
17
|
class HotWaterOptimizer(Juham):
|
18
18
|
"""Automation class for optimized control of temperature driven home energy consumers e.g hot
|
19
|
-
water radiators. Reads spot prices, electricity forecast and temperatures to minimize electricity bill.
|
20
|
-
Additional control over heating is provided by the following attributes
|
19
|
+
water radiators. Reads spot prices, electricity forecast, power meter and temperatures to minimize electricity bill.
|
21
20
|
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
Represents a heating system that knows the power rating of its radiator (e.g., 3kW).
|
22
|
+
The system subscribes to the 'power' topic to track the current power balance. If the solar panels
|
23
|
+
generate more energy than is being consumed, the optimizer activates a relay to ensure that all excess energy
|
24
|
+
produced within that hour is used for heating. The goal is to achieve a net zero energy balance for each hour,
|
25
|
+
ensuring that any surplus energy from the solar panels is fully utilized.
|
25
26
|
|
27
|
+
Computes also UOI - optimization utilization index for each hour, based on the spot price and the solar power forecast.
|
28
|
+
For negative energy balance this determines when energy is consumed. Value of 0 means the hour is expensive, value of 1 means
|
29
|
+
the hour is free. The UOI threshold determines the slots that are allowed to be consumed.
|
26
30
|
|
27
31
|
"""
|
28
32
|
|
@@ -299,6 +303,10 @@ class HotWaterOptimizer(Juham):
|
|
299
303
|
bool: true if production exceeds the consumption
|
300
304
|
"""
|
301
305
|
|
306
|
+
# if net energy balance is negative, then we are not in balancing mode
|
307
|
+
if self.net_energy_balance < 0:
|
308
|
+
return False
|
309
|
+
|
302
310
|
# elapsed and remaining time within the current balancing slot
|
303
311
|
elapsed_ts = ts - quantize(self.energy_balancing_interval, ts)
|
304
312
|
remaining_ts = self.energy_balancing_interval - elapsed_ts
|
@@ -316,7 +324,7 @@ class HotWaterOptimizer(Juham):
|
|
316
324
|
needed_energy = 0.5 * self.radiator_power * remaining_ts
|
317
325
|
elapsed_interval = ts - self.net_energy_balance_ts
|
318
326
|
print(
|
319
|
-
f"Needed energy {needed_energy}Wh, current balance {self.net_energy_balance}Wh"
|
327
|
+
f"Needed energy {int(needed_energy)}Wh, current balance {int(self.net_energy_balance)}Wh"
|
320
328
|
)
|
321
329
|
|
322
330
|
if (
|
@@ -349,7 +357,7 @@ class HotWaterOptimizer(Juham):
|
|
349
357
|
|
350
358
|
# check if we have energy to consume, if so return 1
|
351
359
|
if self.consider_net_energy_balance(ts):
|
352
|
-
self.
|
360
|
+
self.info("Net energy balance positive")
|
353
361
|
return 1
|
354
362
|
elif self.net_energy_balancing_mode:
|
355
363
|
balancing_slot_start_ts = quantize(self.energy_balancing_interval, ts)
|
@@ -3,7 +3,7 @@ juham_automation/japp.py,sha256=zD5ulfIcaSzwbVKjHv2tdXpw79fpw97B7P-v-ncY6e4,1520
|
|
3
3
|
juham_automation/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
4
4
|
juham_automation/automation/__init__.py,sha256=73Mw0jkipeMCoUtpREHJPATfKe368ZyNeqfbjamBx_Q,481
|
5
5
|
juham_automation/automation/energycostcalculator.py,sha256=7GGKLv5JpHAY3XVjbkboXuQBk-whpWkBwNuQ68Tv4Pc,11091
|
6
|
-
juham_automation/automation/hotwateroptimizer.py,sha256=
|
6
|
+
juham_automation/automation/hotwateroptimizer.py,sha256=oOgMgfqzqLN-hNdqaxgK_eKuw6q3JCsnZNM5XG17nko,23194
|
7
7
|
juham_automation/automation/powermeter_simulator.py,sha256=0g0gOD9WTqxUj9IbENkea_33JrJ2sZDSQVtmxVUHcD8,4688
|
8
8
|
juham_automation/automation/spothintafi.py,sha256=XnL2zIPx_XaP_1E8ksuYEUemtHP7N6tLlSv2LEBQyXQ,4471
|
9
9
|
juham_automation/automation/watercirculator.py,sha256=d7PQFNajtVafizS_y2R_6GWhm_GYb8uV4-QScz1Sggo,6569
|
@@ -15,9 +15,9 @@ juham_automation/ts/log_ts.py,sha256=DPfeJhbSMQChY37mjAxEmE73Ys3dxUvNsN78PSuBm9Y
|
|
15
15
|
juham_automation/ts/power_ts.py,sha256=esNbtH1xklyUaf0YJQ2wDuxTAV3SnEfx-FtiBGPaSVA,1448
|
16
16
|
juham_automation/ts/powermeter_ts.py,sha256=zSATxZAzz1KJeU1wFK8CP86iySWnHil89mridz7WHos,2421
|
17
17
|
juham_automation/ts/powerplan_ts.py,sha256=-Lhc7v5Cj7USy2MfmyUEusXSox9UbEoDtYGReDEt3cw,1527
|
18
|
-
juham_automation-0.0.
|
19
|
-
juham_automation-0.0.
|
20
|
-
juham_automation-0.0.
|
21
|
-
juham_automation-0.0.
|
22
|
-
juham_automation-0.0.
|
23
|
-
juham_automation-0.0.
|
18
|
+
juham_automation-0.0.17.dist-info/licenses/LICENSE.rst,sha256=D3SSbUrv10lpAZ91lTMCQAke-MXMvrjFDsDyM3vEKJI,1114
|
19
|
+
juham_automation-0.0.17.dist-info/METADATA,sha256=os2IZ8IJd054hzwvnWwzC8OPdX5939zEMzdrSwH77nw,4733
|
20
|
+
juham_automation-0.0.17.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
21
|
+
juham_automation-0.0.17.dist-info/entry_points.txt,sha256=di8tXChhP8B_98bQ44u-1zkOha2kZCoJpCAXxTgoSw8,491
|
22
|
+
juham_automation-0.0.17.dist-info/top_level.txt,sha256=jfohvtocvX_gfT21AhJk7Iay5ZiQsS3HzrDjF7S4Qp0,17
|
23
|
+
juham_automation-0.0.17.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{juham_automation-0.0.16.dist-info → juham_automation-0.0.17.dist-info}/licenses/LICENSE.rst
RENAMED
File without changes
|
File without changes
|