juham-automation 0.0.14__tar.gz → 0.0.16__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.
- {juham_automation-0.0.14/juham_automation.egg-info → juham_automation-0.0.16}/PKG-INFO +3 -2
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/automation/hotwateroptimizer.py +23 -17
- {juham_automation-0.0.14 → juham_automation-0.0.16/juham_automation.egg-info}/PKG-INFO +3 -2
- {juham_automation-0.0.14 → juham_automation-0.0.16}/pyproject.toml +1 -1
- {juham_automation-0.0.14 → juham_automation-0.0.16}/LICENSE.rst +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/MANIFEST.in +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/README.rst +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/docs/source/CHANGELOG.rst +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/docs/source/CONTRIBUTING.rst +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/docs/source/LICENSE.rst +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/docs/source/README.rst +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/examples/myapp.log +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/examples/myapp.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/__init__.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/automation/__init__.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/automation/energycostcalculator.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/automation/powermeter_simulator.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/automation/spothintafi.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/automation/watercirculator.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/japp.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/py.typed +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/ts/__init__.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/ts/electricityprice_ts.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/ts/energycostcalculator_ts.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/ts/forecast_ts.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/ts/log_ts.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/ts/power_ts.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/ts/powermeter_ts.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/ts/powerplan_ts.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation.egg-info/SOURCES.txt +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation.egg-info/dependency_links.txt +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation.egg-info/entry_points.txt +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation.egg-info/requires.txt +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation.egg-info/top_level.txt +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/setup.cfg +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/__init__.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/__pycache__/test_japp.cpython-312.pyc +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/automation/__init__.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/automation/__pycache__/__init__.cpython-312.pyc +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/automation/__pycache__/test_energycostcalculator.cpython-312.pyc +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/automation/__pycache__/test_hotwateroptimizer.cpython-312.pyc +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/automation/__pycache__/test_juham.cpython-312.pyc +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/automation/__pycache__/test_powermeter_simulator.cpython-312.pyc +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/automation/__pycache__/test_spothintafi.cpython-312.pyc +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/automation/test_energycostcalculator.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/automation/test_hotwateroptimizer.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/automation/test_juham.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/automation/test_spothintafi.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/test_japp.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/__init__.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/__pycache__/__init__.cpython-312.pyc +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/__pycache__/test_energycostcalculator_ts.cpython-312.pyc +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/__pycache__/test_forecast_ts.cpython-312.pyc +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/__pycache__/test_log_ts.cpython-312.pyc +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/__pycache__/test_power_ts.cpython-312.pyc +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/__pycache__/test_powermeter_ts.cpython-312.pyc +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/__pycache__/test_powerplan_ts.cpython-312.pyc +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/test_energycostcalculator_ts.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/test_forecast_ts.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/test_log_ts.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/test_power_ts.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/test_powermeter_ts.py +0 -0
- {juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/test_powerplan_ts.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: juham-automation
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.16
|
4
4
|
Summary: Juha's Ultimate Home Automation Masterpiece
|
5
5
|
Author-email: J Meskanen <juham.api@gmail.com>
|
6
6
|
Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
|
@@ -48,6 +48,7 @@ Requires-Dist: juham_core>=0.1.3
|
|
48
48
|
Provides-Extra: dev
|
49
49
|
Requires-Dist: check-manifest; extra == "dev"
|
50
50
|
Requires-Dist: types-pyz; extra == "dev"
|
51
|
+
Dynamic: license-file
|
51
52
|
|
52
53
|
Welcome to Juham™ - Juha's Ultimate Home Automation Masterpiece
|
53
54
|
================================================================
|
{juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/automation/hotwateroptimizer.py
RENAMED
@@ -25,18 +25,19 @@ class HotWaterOptimizer(Juham):
|
|
25
25
|
|
26
26
|
|
27
27
|
"""
|
28
|
+
|
28
29
|
#: Description of the attribute
|
29
|
-
maximum_boiler_temperature
|
30
|
-
minimum_boiler_temperature
|
30
|
+
maximum_boiler_temperature: float = 70
|
31
|
+
minimum_boiler_temperature: float = 40
|
31
32
|
energy_balancing_interval: float = 3600
|
32
|
-
radiator_power
|
33
|
-
operation_threshold
|
34
|
-
heating_hours_per_day
|
33
|
+
radiator_power: float = 3000
|
34
|
+
operation_threshold: float = 5 * 60
|
35
|
+
heating_hours_per_day: float = 4
|
35
36
|
schedule_start_hour: float = 0
|
36
37
|
schedule_stop_hour: float = 0
|
37
|
-
timezone
|
38
|
-
expected_average_price
|
39
|
-
uoi_threshold
|
38
|
+
timezone: str = "Europe/Helsinki"
|
39
|
+
expected_average_price: float = 0.2
|
40
|
+
uoi_threshold: float = 0.8
|
40
41
|
|
41
42
|
def __init__(
|
42
43
|
self,
|
@@ -305,18 +306,25 @@ class HotWaterOptimizer(Juham):
|
|
305
306
|
# don't bother to switch the relay on for small intervals, to avoid
|
306
307
|
# wearing contactors out
|
307
308
|
if remaining_ts < self.operation_threshold:
|
309
|
+
print(
|
310
|
+
f"Skipping balance, remaining time {remaining_ts}s < {self.operation_threshold}s"
|
311
|
+
)
|
308
312
|
return False
|
309
313
|
|
310
314
|
# check if the balance is sufficient for heating the next half of the energy balancing interval
|
311
315
|
# if yes then switch heating on for the next half an hour
|
312
316
|
needed_energy = 0.5 * self.radiator_power * remaining_ts
|
313
317
|
elapsed_interval = ts - self.net_energy_balance_ts
|
318
|
+
print(
|
319
|
+
f"Needed energy {needed_energy}Wh, current balance {self.net_energy_balance}Wh"
|
320
|
+
)
|
321
|
+
|
314
322
|
if (
|
315
323
|
self.net_energy_balance > needed_energy
|
316
324
|
) and not self.net_energy_balancing_rc:
|
317
325
|
self.net_energy_balance_ts = ts
|
318
326
|
self.net_energy_balancing_rc = True # heat
|
319
|
-
|
327
|
+
self.info("Enough to supply the radiator, enable")
|
320
328
|
self.net_energy_balancing_mode = True # balancing mode indicator on
|
321
329
|
else:
|
322
330
|
# check if we have reach the end of the interval, or consumed all the energy
|
@@ -326,7 +334,7 @@ class HotWaterOptimizer(Juham):
|
|
326
334
|
or self.net_energy_balance < 0
|
327
335
|
):
|
328
336
|
self.net_energy_balancing_rc = False # heating off
|
329
|
-
|
337
|
+
self.info("Balance used, or the end of the interval reached, disable")
|
330
338
|
return self.net_energy_balancing_rc
|
331
339
|
|
332
340
|
def consider_heating(self, ts: float) -> int:
|
@@ -341,21 +349,19 @@ class HotWaterOptimizer(Juham):
|
|
341
349
|
|
342
350
|
# check if we have energy to consume, if so return 1
|
343
351
|
if self.consider_net_energy_balance(ts):
|
344
|
-
self.warning("
|
345
|
-
|
352
|
+
self.warning("Net energy balance positive")
|
353
|
+
return 1
|
346
354
|
elif self.net_energy_balancing_mode:
|
347
355
|
balancing_slot_start_ts = quantize(self.energy_balancing_interval, ts)
|
348
356
|
elapsed_b = ts - balancing_slot_start_ts
|
349
357
|
if elapsed_b > self.energy_balancing_interval:
|
350
358
|
self.net_energy_balancing_mode = False
|
351
359
|
self.info(
|
352
|
-
f"
|
360
|
+
f"Exiting net energy balancing mode: {elapsed_b}s > {self.energy_balancing_interval}s"
|
353
361
|
)
|
354
362
|
else:
|
355
|
-
self.info(
|
356
|
-
|
357
|
-
)
|
358
|
-
# return 0
|
363
|
+
self.info(f"Net energy balance waiting interval {elapsed_b}s to end")
|
364
|
+
return 0
|
359
365
|
|
360
366
|
if self.current_temperature > self.maximum_boiler_temperature:
|
361
367
|
self.info(
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: juham-automation
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.16
|
4
4
|
Summary: Juha's Ultimate Home Automation Masterpiece
|
5
5
|
Author-email: J Meskanen <juham.api@gmail.com>
|
6
6
|
Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
|
@@ -48,6 +48,7 @@ Requires-Dist: juham_core>=0.1.3
|
|
48
48
|
Provides-Extra: dev
|
49
49
|
Requires-Dist: check-manifest; extra == "dev"
|
50
50
|
Requires-Dist: types-pyz; extra == "dev"
|
51
|
+
Dynamic: license-file
|
51
52
|
|
52
53
|
Welcome to Juham™ - Juha's Ultimate Home Automation Masterpiece
|
53
54
|
================================================================
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
5
5
|
|
6
6
|
[project]
|
7
7
|
name = "juham-automation"
|
8
|
-
version = "0.0.
|
8
|
+
version = "0.0.16"
|
9
9
|
description = "Juha's Ultimate Home Automation Masterpiece"
|
10
10
|
readme = {file = "README.rst", content-type = "text/markdown"}
|
11
11
|
requires-python = ">=3.8"
|
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
|
{juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/automation/spothintafi.py
RENAMED
File without changes
|
{juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/automation/watercirculator.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/ts/electricityprice_ts.py
RENAMED
File without changes
|
{juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation/ts/energycostcalculator_ts.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation.egg-info/dependency_links.txt
RENAMED
File without changes
|
{juham_automation-0.0.14 → juham_automation-0.0.16}/juham_automation.egg-info/entry_points.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{juham_automation-0.0.14 → juham_automation-0.0.16}/tests/__pycache__/test_japp.cpython-312.pyc
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{juham_automation-0.0.14 → juham_automation-0.0.16}/tests/automation/test_energycostcalculator.py
RENAMED
File without changes
|
{juham_automation-0.0.14 → juham_automation-0.0.16}/tests/automation/test_hotwateroptimizer.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/__pycache__/__init__.cpython-312.pyc
RENAMED
File without changes
|
File without changes
|
File without changes
|
{juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/__pycache__/test_log_ts.cpython-312.pyc
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{juham_automation-0.0.14 → juham_automation-0.0.16}/tests/ts/test_energycostcalculator_ts.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|