juham-automation 0.0.17__tar.gz → 0.2.7__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.17 → juham_automation-0.2.7}/LICENSE.rst +25 -25
- {juham_automation-0.0.17 → juham_automation-0.2.7}/MANIFEST.in +12 -12
- juham_automation-0.2.7/PKG-INFO +199 -0
- juham_automation-0.2.7/README.rst +173 -0
- juham_automation-0.2.7/docs/source/CHANGELOG.rst +191 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/docs/source/CONTRIBUTING.rst +44 -44
- {juham_automation-0.0.17 → juham_automation-0.2.7}/docs/source/LICENSE.rst +25 -25
- juham_automation-0.2.7/docs/source/README.rst +173 -0
- juham_automation-0.2.7/examples/myapp.log +52 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/examples/myapp.py +34 -37
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation/__init__.py +42 -38
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation/automation/__init__.py +23 -21
- juham_automation-0.2.7/juham_automation/automation/energybalancer.py +281 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation/automation/energycostcalculator.py +310 -266
- juham_automation-0.2.7/juham_automation/automation/heatingoptimizer.py +971 -0
- juham_automation-0.2.7/juham_automation/automation/leakdetector.py +164 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation/automation/spothintafi.py +140 -140
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation/automation/watercirculator.py +140 -159
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation/japp.py +53 -49
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation/ts/__init__.py +27 -25
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation/ts/electricityprice_ts.py +51 -51
- juham_automation-0.2.7/juham_automation/ts/energybalancer_ts.py +73 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation/ts/energycostcalculator_ts.py +45 -43
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation/ts/forecast_ts.py +97 -97
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation/ts/log_ts.py +60 -57
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation/ts/power_ts.py +52 -49
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation/ts/powermeter_ts.py +68 -70
- juham_automation-0.2.7/juham_automation/ts/powerplan_ts.py +64 -0
- juham_automation-0.2.7/juham_automation.egg-info/PKG-INFO +199 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation.egg-info/SOURCES.txt +32 -5
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation.egg-info/entry_points.txt +3 -1
- juham_automation-0.2.7/juham_automation.egg-info/requires.txt +5 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/pyproject.toml +69 -71
- {juham_automation-0.0.17 → juham_automation-0.2.7}/setup.cfg +4 -4
- {juham_automation-0.0.17 → juham_automation-0.2.7}/tests/__init__.py +1 -1
- juham_automation-0.2.7/tests/__pycache__/__init__.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/__pycache__/test_japp.cpython-312-pytest-9.0.1.pyc +0 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/tests/__pycache__/test_japp.cpython-312.pyc +0 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/tests/automation/__init__.py +1 -1
- juham_automation-0.2.7/tests/automation/__pycache__/__init__.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/automation/__pycache__/test_energybalancer.cpython-312-pytest-9.0.1.pyc +0 -0
- juham_automation-0.2.7/tests/automation/__pycache__/test_energybalancer.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/automation/__pycache__/test_energycostcalculator.cpython-312-pytest-9.0.1.pyc +0 -0
- juham_automation-0.2.7/tests/automation/__pycache__/test_energycostcalculator.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/automation/__pycache__/test_heatingoptimizer.cpython-312-pytest-9.0.1.pyc +0 -0
- juham_automation-0.2.7/tests/automation/__pycache__/test_heatingoptimizer.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/automation/__pycache__/test_juham.cpython-312-pytest-9.0.1.pyc +0 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/tests/automation/__pycache__/test_juham.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/automation/__pycache__/test_leakdetector.cpython-312-pytest-9.0.1.pyc +0 -0
- juham_automation-0.2.7/tests/automation/__pycache__/test_leakdetector.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/automation/__pycache__/test_spothintafi.cpython-312-pytest-9.0.1.pyc +0 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/tests/automation/__pycache__/test_spothintafi.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/automation/__pycache__/test_watercirculator.cpython-312-pytest-9.0.1.pyc +0 -0
- juham_automation-0.2.7/tests/automation/__pycache__/test_watercirculator.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/automation/test_energybalancer.py +107 -0
- juham_automation-0.2.7/tests/automation/test_energycostcalculator.py +272 -0
- juham_automation-0.2.7/tests/automation/test_heatingoptimizer.py +485 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/tests/automation/test_juham.py +65 -65
- juham_automation-0.2.7/tests/automation/test_leakdetector.py +123 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/tests/automation/test_spothintafi.py +67 -67
- juham_automation-0.2.7/tests/automation/test_watercirculator.py +131 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/tests/test_japp.py +18 -18
- juham_automation-0.2.7/tests/ts/__init__.py +1 -0
- juham_automation-0.2.7/tests/ts/__pycache__/__init__.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_electricityprice_ts.cpython-312-pytest-9.0.1.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_electricityprice_ts.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_energybalancer_ts.cpython-312-pytest-9.0.1.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_energybalancer_ts.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_energycostcalculator_ts.cpython-312-pytest-9.0.1.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_energycostcalculator_ts.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_forecast_ts.cpython-312-pytest-9.0.1.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_forecast_ts.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_log_ts.cpython-312-pytest-9.0.1.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_log_ts.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_power_ts.cpython-312-pytest-9.0.1.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_power_ts.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_powermeter_ts.cpython-312-pytest-9.0.1.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_powermeter_ts.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_powerplan_ts.cpython-312-pytest-9.0.1.pyc +0 -0
- juham_automation-0.2.7/tests/ts/__pycache__/test_powerplan_ts.cpython-312.pyc +0 -0
- juham_automation-0.2.7/tests/ts/test_electricityprice_ts.py +70 -0
- juham_automation-0.2.7/tests/ts/test_energybalancer_ts.py +103 -0
- juham_automation-0.2.7/tests/ts/test_energycostcalculator_ts.py +75 -0
- juham_automation-0.2.7/tests/ts/test_forecast_ts.py +90 -0
- juham_automation-0.2.7/tests/ts/test_log_ts.py +84 -0
- juham_automation-0.2.7/tests/ts/test_power_ts.py +78 -0
- juham_automation-0.2.7/tests/ts/test_powermeter_ts.py +83 -0
- juham_automation-0.2.7/tests/ts/test_powerplan_ts.py +85 -0
- juham_automation-0.0.17/PKG-INFO +0 -106
- juham_automation-0.0.17/README.rst +0 -54
- juham_automation-0.0.17/docs/source/CHANGELOG.rst +0 -27
- juham_automation-0.0.17/docs/source/README.rst +0 -54
- juham_automation-0.0.17/examples/myapp.log +0 -252
- juham_automation-0.0.17/juham_automation/automation/hotwateroptimizer.py +0 -581
- juham_automation-0.0.17/juham_automation/automation/powermeter_simulator.py +0 -139
- juham_automation-0.0.17/juham_automation/ts/powerplan_ts.py +0 -45
- juham_automation-0.0.17/juham_automation.egg-info/PKG-INFO +0 -106
- juham_automation-0.0.17/juham_automation.egg-info/requires.txt +0 -5
- juham_automation-0.0.17/tests/__pycache__/__init__.cpython-312.pyc +0 -0
- juham_automation-0.0.17/tests/automation/__pycache__/__init__.cpython-312.pyc +0 -0
- juham_automation-0.0.17/tests/automation/__pycache__/test_energycostcalculator.cpython-312.pyc +0 -0
- juham_automation-0.0.17/tests/automation/__pycache__/test_hotwateroptimizer.cpython-312.pyc +0 -0
- juham_automation-0.0.17/tests/automation/__pycache__/test_powermeter_simulator.cpython-312.pyc +0 -0
- juham_automation-0.0.17/tests/automation/test_energycostcalculator.py +0 -118
- juham_automation-0.0.17/tests/automation/test_hotwateroptimizer.py +0 -109
- juham_automation-0.0.17/tests/ts/__init__.py +0 -1
- juham_automation-0.0.17/tests/ts/__pycache__/__init__.cpython-312.pyc +0 -0
- juham_automation-0.0.17/tests/ts/__pycache__/test_energycostcalculator_ts.cpython-312.pyc +0 -0
- juham_automation-0.0.17/tests/ts/__pycache__/test_forecast_ts.cpython-312.pyc +0 -0
- juham_automation-0.0.17/tests/ts/__pycache__/test_log_ts.cpython-312.pyc +0 -0
- juham_automation-0.0.17/tests/ts/__pycache__/test_power_ts.cpython-312.pyc +0 -0
- juham_automation-0.0.17/tests/ts/__pycache__/test_powermeter_ts.cpython-312.pyc +0 -0
- juham_automation-0.0.17/tests/ts/__pycache__/test_powerplan_ts.cpython-312.pyc +0 -0
- juham_automation-0.0.17/tests/ts/test_energycostcalculator_ts.py +0 -14
- juham_automation-0.0.17/tests/ts/test_forecast_ts.py +0 -14
- juham_automation-0.0.17/tests/ts/test_log_ts.py +0 -14
- juham_automation-0.0.17/tests/ts/test_power_ts.py +0 -14
- juham_automation-0.0.17/tests/ts/test_powermeter_ts.py +0 -14
- juham_automation-0.0.17/tests/ts/test_powerplan_ts.py +0 -14
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation/py.typed +0 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation.egg-info/dependency_links.txt +0 -0
- {juham_automation-0.0.17 → juham_automation-0.2.7}/juham_automation.egg-info/top_level.txt +0 -0
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
LICENSE
|
|
2
|
-
=======
|
|
3
|
-
|
|
4
|
-
Copyright (c) 2024, Juha Meskanen
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
7
|
-
a copy of this software and associated documentation files (the
|
|
8
|
-
"Software"), to deal in the Software without restriction, including
|
|
9
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
10
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
11
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
12
|
-
the following conditions:
|
|
13
|
-
|
|
14
|
-
**The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
copies or substantial portions of the Software.**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
19
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
20
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
21
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
22
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
23
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **
|
|
25
|
-
|
|
1
|
+
LICENSE
|
|
2
|
+
=======
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2024, Juha Meskanen
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
7
|
+
a copy of this software and associated documentation files (the
|
|
8
|
+
"Software"), to deal in the Software without restriction, including
|
|
9
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
10
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
11
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
12
|
+
the following conditions:
|
|
13
|
+
|
|
14
|
+
**The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.**
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
19
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
20
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
21
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
22
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
23
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **
|
|
25
|
+
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
include docs/source/README.rst
|
|
2
|
-
include docs/source/CHANGELOG.rst
|
|
3
|
-
include docs/source/LICENSE.rst
|
|
4
|
-
include docs/source/CONTRIBUTING.rst
|
|
5
|
-
|
|
6
|
-
recursive-include examples *
|
|
7
|
-
recursive-include tests *
|
|
8
|
-
recursive-include docs/build/html *
|
|
9
|
-
|
|
10
|
-
# files to be excluded
|
|
11
|
-
global-exclude *~ \#*
|
|
12
|
-
config/*
|
|
1
|
+
include docs/source/README.rst
|
|
2
|
+
include docs/source/CHANGELOG.rst
|
|
3
|
+
include docs/source/LICENSE.rst
|
|
4
|
+
include docs/source/CONTRIBUTING.rst
|
|
5
|
+
|
|
6
|
+
recursive-include examples *
|
|
7
|
+
recursive-include tests *
|
|
8
|
+
recursive-include docs/build/html *
|
|
9
|
+
|
|
10
|
+
# files to be excluded
|
|
11
|
+
global-exclude *~ \#*
|
|
12
|
+
config/*
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: juham-automation
|
|
3
|
+
Version: 0.2.7
|
|
4
|
+
Summary: Juha's Ultimate Home Automation Masterpiece
|
|
5
|
+
Author-email: J Meskanen <juham.api@gmail.com>
|
|
6
|
+
Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Homepage, https://gitlab.com/juham/juham/juham-automation
|
|
9
|
+
Project-URL: Bug Reports, https://gitlab.com/juham/juham/juham-automationt
|
|
10
|
+
Project-URL: Funding, https://meskanen.com
|
|
11
|
+
Project-URL: Say Thanks!, http://meskanen.com
|
|
12
|
+
Project-URL: Source, https://gitlab.com/juham/juham/juham-automation
|
|
13
|
+
Keywords: home,automation,juham
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Topic :: Software Development
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Requires-Python: >=3.8
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE.rst
|
|
21
|
+
Requires-Dist: juham_core>=0.2.4
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: check-manifest; extra == "dev"
|
|
24
|
+
Requires-Dist: coverage>=7.0; extra == "dev"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
Welcome to Juham™ - Juha's Ultimate Home Automation Masterpiece
|
|
28
|
+
===============================================================
|
|
29
|
+
|
|
30
|
+
Project Description
|
|
31
|
+
-------------------
|
|
32
|
+
|
|
33
|
+
Beyond its super-cool name, this package provides essential home automation building blocks that address most common needs.
|
|
34
|
+
|
|
35
|
+
It consists of two main sub-modules:
|
|
36
|
+
|
|
37
|
+
``automation``:
|
|
38
|
+
|
|
39
|
+
This folder contains automation classes that listen to Juham™ MQTT topics and control various home automation tasks.
|
|
40
|
+
|
|
41
|
+
- **spothintafi**: Acquires electricity prices in Finland.
|
|
42
|
+
- **watercirculator**: Automates a water circulator pump based on hot water temperature and motion detection.
|
|
43
|
+
- **heatingoptimizer**: Controls hot water radiators based on temperature sensors and electricity price data.
|
|
44
|
+
- **energycostcalculator**: Monitors power consumption and electricity prices, and computes the energy balance in euros.
|
|
45
|
+
- **energybalancer**: Handles real-time energy balancing and net billing.
|
|
46
|
+
|
|
47
|
+
``ts``:
|
|
48
|
+
|
|
49
|
+
This folder contains time series recorders that listen for Juham™ topics and store the data in a time series database for later inspection.
|
|
50
|
+
|
|
51
|
+
- **electricityprice_ts** : publishes electricity prices to timeseries database.
|
|
52
|
+
- **energybalancer_ts**: for monitoring the operation of energy balancer.
|
|
53
|
+
- **energycostcalculator_ts**: publishes actualized energy prices per hour and per day.
|
|
54
|
+
- **forecast_ts**: publishes the forecast datat to timeseries database.
|
|
55
|
+
- **log_ts**: Writes log events to timeseries datbase.
|
|
56
|
+
- **powerplan_ts**: publishes power plan data to timeseries database, when relays are planned to be switched on/off.
|
|
57
|
+
- **powermeter_ts**: publishes powermeter data to timeseries database.
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
Project Status
|
|
61
|
+
--------------
|
|
62
|
+
|
|
63
|
+
**Current State**: **Beta (Status 4)**
|
|
64
|
+
|
|
65
|
+
All classes have been tested to some extent, and no known bugs have been reported.
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
Project Links
|
|
69
|
+
-------------
|
|
70
|
+
|
|
71
|
+
- **Source code:** https://gitlab.com/juham/juham/juham-automation
|
|
72
|
+
- **Issue tracker:** https://gitlab.com/juham/juham/juham-automation/-/issues
|
|
73
|
+
- **Documentation:** https://juham-automation-c6383e.gitlab.io
|
|
74
|
+
- **PyPI page:** https://pypi.org/project/juham-automation
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
Features
|
|
79
|
+
--------
|
|
80
|
+
|
|
81
|
+
**HeatingAutomater** listens to the power meter to compute the net energy balance.
|
|
82
|
+
|
|
83
|
+
.. image:: _static/images/juham_powermeter.png
|
|
84
|
+
:alt: Powermeter
|
|
85
|
+
:width: 400px
|
|
86
|
+
|
|
87
|
+
Powermeter is needed to measure the real-time energy consumption
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
**Energy Revenue** is computed based on the electricity price and transmission costs. This is the total cost one has to pay for consuming energy.
|
|
91
|
+
|
|
92
|
+
.. image:: _static/images/juham_energyrevenue.png
|
|
93
|
+
:alt: Energy Revenue
|
|
94
|
+
:width: 400px
|
|
95
|
+
|
|
96
|
+
Energy revenue per hour and per day
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
**Real-time temperature** trends monitored by the **Shelly Plus Add-on** and **DS18B20** sensors
|
|
100
|
+
|
|
101
|
+
.. image:: _static/images/juham_boilertemperatures.png
|
|
102
|
+
:alt: Energy Revenue
|
|
103
|
+
:width: 400px
|
|
104
|
+
|
|
105
|
+
Temperature time series.
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
**Real-time humidity** trends monitored by the **Shelly Plus Add-on** and **DHT22** sensors
|
|
109
|
+
|
|
110
|
+
.. image:: _static/images/juham_humiditysensors.png
|
|
111
|
+
:alt: Energy Revenue
|
|
112
|
+
:width: 400px
|
|
113
|
+
|
|
114
|
+
Relative humidity time series.
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
**Utilization Optimization Index**: The Utilization Optimization Index predicts the optimal hours for energy consumption by factoring in electricity prices, temperature, and forecasts for wind and solar energy. It identifies the best times to activate heating systems. The cheapest hours within the current period may be skipped if the solar forecast predicts free electricity in the next period.period.
|
|
119
|
+
|
|
120
|
+
.. image:: _static/images/juham_uoi.png
|
|
121
|
+
:alt: Power Plan
|
|
122
|
+
:width: 400px
|
|
123
|
+
|
|
124
|
+
UOI cast for heating the primary and sun pre-heating boilers for two types of solar panels and boilers: electric-based panels and solar thermal panels, which use water circulation. The primary one is electrically heated, while the secondary ‘pre-heating’ boiler is heated by the hot water from the solar thermal panels, or by electricity when there's a positive energy balance.
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
**Power Plan** is computed for the next 12 hours based on the electricity price and solar energy forecast. If no solar energy is available, the power plan determines power consumption, e.g., when the hot water radiators are enabled.
|
|
128
|
+
|
|
129
|
+
.. image:: _static/images/juham_powerplan.png
|
|
130
|
+
:alt: Power Plan
|
|
131
|
+
:width: 400px
|
|
132
|
+
|
|
133
|
+
Powerplan optimizing consumers to use the cheapest hours
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
**Energy Balancer**: When the energy balance is positive (e.g., when solar panels produce more energy than is currently being consumed), the energy balancer is activated. It monitors the energy balance in 15-minute (or one-hour) intervals and computes when a consumer with a specific power demand should be activated to consume all the energy produced so far.
|
|
137
|
+
|
|
138
|
+
.. image:: _static/images/juham_automation_energybalancer.png
|
|
139
|
+
:alt: Energy Balancer
|
|
140
|
+
:width: 400px
|
|
141
|
+
|
|
142
|
+
Energy balancer activating consumers based on the actual real-time net energy
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
**Power Diagnosis**: All controlled relays are monitored to ensure their correct operation. This ensures that relays are enabled according to the power plan and energy balancer commands.
|
|
146
|
+
|
|
147
|
+
.. image:: _static/images/juham_automation_relays.png
|
|
148
|
+
:alt: Relays
|
|
149
|
+
:width: 400px
|
|
150
|
+
|
|
151
|
+
The operation of the relays for diagnosis.
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
Installing
|
|
155
|
+
----------
|
|
156
|
+
|
|
157
|
+
Juham™ ships with a minimal yet fully functional home automation application that can be found in the **examples** folder.
|
|
158
|
+
It creates a **PowerMeterSimulator** and **ShellyMotionSimulator** objets to generate simulated motion sensor and power meter readings.
|
|
159
|
+
Later, you can replace it with your actual power meter, as well as plug in other input sensors to read and relays to control.
|
|
160
|
+
|
|
161
|
+
1. Set up a Mosquitto MQTT broker service. For more information read the manuals.
|
|
162
|
+
|
|
163
|
+
.. code-block:: bash
|
|
164
|
+
|
|
165
|
+
sudo apt install mosquitto mosquitto-clients
|
|
166
|
+
|
|
167
|
+
2. Configure Juham to talk to Mosquitto.
|
|
168
|
+
|
|
169
|
+
In ``PahoMqtt.json``:
|
|
170
|
+
|
|
171
|
+
.. code-block:: json
|
|
172
|
+
|
|
173
|
+
{"paho_version" : 2}
|
|
174
|
+
|
|
175
|
+
In ``Juham.json``:
|
|
176
|
+
|
|
177
|
+
.. code-block:: json
|
|
178
|
+
|
|
179
|
+
{"mqtt_class_id": "PahoMqtt", "mqtt_root_topic": "myapp", "mqtt_host": "localhost", "mqtt_port": 1883}
|
|
180
|
+
|
|
181
|
+
In ``Timeseries.json``:
|
|
182
|
+
|
|
183
|
+
.. code-block:: json
|
|
184
|
+
|
|
185
|
+
{
|
|
186
|
+
"token": "your-influx-token",
|
|
187
|
+
"org": "your-organization",
|
|
188
|
+
"host": "https://us-east-1-1.aws.cloud2.influxdata.com",
|
|
189
|
+
"database": "your-database"
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
3. In the ``juham/examples`` folder, run:
|
|
193
|
+
|
|
194
|
+
.. code-block:: bash
|
|
195
|
+
|
|
196
|
+
python3 myapp.py
|
|
197
|
+
|
|
198
|
+
The application will start and time series data will show up in your InfluxDB database,
|
|
199
|
+
which you can then visualize with tools such as Grafana.
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
Welcome to Juham™ - Juha's Ultimate Home Automation Masterpiece
|
|
2
|
+
===============================================================
|
|
3
|
+
|
|
4
|
+
Project Description
|
|
5
|
+
-------------------
|
|
6
|
+
|
|
7
|
+
Beyond its super-cool name, this package provides essential home automation building blocks that address most common needs.
|
|
8
|
+
|
|
9
|
+
It consists of two main sub-modules:
|
|
10
|
+
|
|
11
|
+
``automation``:
|
|
12
|
+
|
|
13
|
+
This folder contains automation classes that listen to Juham™ MQTT topics and control various home automation tasks.
|
|
14
|
+
|
|
15
|
+
- **spothintafi**: Acquires electricity prices in Finland.
|
|
16
|
+
- **watercirculator**: Automates a water circulator pump based on hot water temperature and motion detection.
|
|
17
|
+
- **heatingoptimizer**: Controls hot water radiators based on temperature sensors and electricity price data.
|
|
18
|
+
- **energycostcalculator**: Monitors power consumption and electricity prices, and computes the energy balance in euros.
|
|
19
|
+
- **energybalancer**: Handles real-time energy balancing and net billing.
|
|
20
|
+
|
|
21
|
+
``ts``:
|
|
22
|
+
|
|
23
|
+
This folder contains time series recorders that listen for Juham™ topics and store the data in a time series database for later inspection.
|
|
24
|
+
|
|
25
|
+
- **electricityprice_ts** : publishes electricity prices to timeseries database.
|
|
26
|
+
- **energybalancer_ts**: for monitoring the operation of energy balancer.
|
|
27
|
+
- **energycostcalculator_ts**: publishes actualized energy prices per hour and per day.
|
|
28
|
+
- **forecast_ts**: publishes the forecast datat to timeseries database.
|
|
29
|
+
- **log_ts**: Writes log events to timeseries datbase.
|
|
30
|
+
- **powerplan_ts**: publishes power plan data to timeseries database, when relays are planned to be switched on/off.
|
|
31
|
+
- **powermeter_ts**: publishes powermeter data to timeseries database.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
Project Status
|
|
35
|
+
--------------
|
|
36
|
+
|
|
37
|
+
**Current State**: **Beta (Status 4)**
|
|
38
|
+
|
|
39
|
+
All classes have been tested to some extent, and no known bugs have been reported.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
Project Links
|
|
43
|
+
-------------
|
|
44
|
+
|
|
45
|
+
- **Source code:** https://gitlab.com/juham/juham/juham-automation
|
|
46
|
+
- **Issue tracker:** https://gitlab.com/juham/juham/juham-automation/-/issues
|
|
47
|
+
- **Documentation:** https://juham-automation-c6383e.gitlab.io
|
|
48
|
+
- **PyPI page:** https://pypi.org/project/juham-automation
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
Features
|
|
53
|
+
--------
|
|
54
|
+
|
|
55
|
+
**HeatingAutomater** listens to the power meter to compute the net energy balance.
|
|
56
|
+
|
|
57
|
+
.. image:: _static/images/juham_powermeter.png
|
|
58
|
+
:alt: Powermeter
|
|
59
|
+
:width: 400px
|
|
60
|
+
|
|
61
|
+
Powermeter is needed to measure the real-time energy consumption
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
**Energy Revenue** is computed based on the electricity price and transmission costs. This is the total cost one has to pay for consuming energy.
|
|
65
|
+
|
|
66
|
+
.. image:: _static/images/juham_energyrevenue.png
|
|
67
|
+
:alt: Energy Revenue
|
|
68
|
+
:width: 400px
|
|
69
|
+
|
|
70
|
+
Energy revenue per hour and per day
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
**Real-time temperature** trends monitored by the **Shelly Plus Add-on** and **DS18B20** sensors
|
|
74
|
+
|
|
75
|
+
.. image:: _static/images/juham_boilertemperatures.png
|
|
76
|
+
:alt: Energy Revenue
|
|
77
|
+
:width: 400px
|
|
78
|
+
|
|
79
|
+
Temperature time series.
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
**Real-time humidity** trends monitored by the **Shelly Plus Add-on** and **DHT22** sensors
|
|
83
|
+
|
|
84
|
+
.. image:: _static/images/juham_humiditysensors.png
|
|
85
|
+
:alt: Energy Revenue
|
|
86
|
+
:width: 400px
|
|
87
|
+
|
|
88
|
+
Relative humidity time series.
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
**Utilization Optimization Index**: The Utilization Optimization Index predicts the optimal hours for energy consumption by factoring in electricity prices, temperature, and forecasts for wind and solar energy. It identifies the best times to activate heating systems. The cheapest hours within the current period may be skipped if the solar forecast predicts free electricity in the next period.period.
|
|
93
|
+
|
|
94
|
+
.. image:: _static/images/juham_uoi.png
|
|
95
|
+
:alt: Power Plan
|
|
96
|
+
:width: 400px
|
|
97
|
+
|
|
98
|
+
UOI cast for heating the primary and sun pre-heating boilers for two types of solar panels and boilers: electric-based panels and solar thermal panels, which use water circulation. The primary one is electrically heated, while the secondary ‘pre-heating’ boiler is heated by the hot water from the solar thermal panels, or by electricity when there's a positive energy balance.
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
**Power Plan** is computed for the next 12 hours based on the electricity price and solar energy forecast. If no solar energy is available, the power plan determines power consumption, e.g., when the hot water radiators are enabled.
|
|
102
|
+
|
|
103
|
+
.. image:: _static/images/juham_powerplan.png
|
|
104
|
+
:alt: Power Plan
|
|
105
|
+
:width: 400px
|
|
106
|
+
|
|
107
|
+
Powerplan optimizing consumers to use the cheapest hours
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
**Energy Balancer**: When the energy balance is positive (e.g., when solar panels produce more energy than is currently being consumed), the energy balancer is activated. It monitors the energy balance in 15-minute (or one-hour) intervals and computes when a consumer with a specific power demand should be activated to consume all the energy produced so far.
|
|
111
|
+
|
|
112
|
+
.. image:: _static/images/juham_automation_energybalancer.png
|
|
113
|
+
:alt: Energy Balancer
|
|
114
|
+
:width: 400px
|
|
115
|
+
|
|
116
|
+
Energy balancer activating consumers based on the actual real-time net energy
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
**Power Diagnosis**: All controlled relays are monitored to ensure their correct operation. This ensures that relays are enabled according to the power plan and energy balancer commands.
|
|
120
|
+
|
|
121
|
+
.. image:: _static/images/juham_automation_relays.png
|
|
122
|
+
:alt: Relays
|
|
123
|
+
:width: 400px
|
|
124
|
+
|
|
125
|
+
The operation of the relays for diagnosis.
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
Installing
|
|
129
|
+
----------
|
|
130
|
+
|
|
131
|
+
Juham™ ships with a minimal yet fully functional home automation application that can be found in the **examples** folder.
|
|
132
|
+
It creates a **PowerMeterSimulator** and **ShellyMotionSimulator** objets to generate simulated motion sensor and power meter readings.
|
|
133
|
+
Later, you can replace it with your actual power meter, as well as plug in other input sensors to read and relays to control.
|
|
134
|
+
|
|
135
|
+
1. Set up a Mosquitto MQTT broker service. For more information read the manuals.
|
|
136
|
+
|
|
137
|
+
.. code-block:: bash
|
|
138
|
+
|
|
139
|
+
sudo apt install mosquitto mosquitto-clients
|
|
140
|
+
|
|
141
|
+
2. Configure Juham to talk to Mosquitto.
|
|
142
|
+
|
|
143
|
+
In ``PahoMqtt.json``:
|
|
144
|
+
|
|
145
|
+
.. code-block:: json
|
|
146
|
+
|
|
147
|
+
{"paho_version" : 2}
|
|
148
|
+
|
|
149
|
+
In ``Juham.json``:
|
|
150
|
+
|
|
151
|
+
.. code-block:: json
|
|
152
|
+
|
|
153
|
+
{"mqtt_class_id": "PahoMqtt", "mqtt_root_topic": "myapp", "mqtt_host": "localhost", "mqtt_port": 1883}
|
|
154
|
+
|
|
155
|
+
In ``Timeseries.json``:
|
|
156
|
+
|
|
157
|
+
.. code-block:: json
|
|
158
|
+
|
|
159
|
+
{
|
|
160
|
+
"token": "your-influx-token",
|
|
161
|
+
"org": "your-organization",
|
|
162
|
+
"host": "https://us-east-1-1.aws.cloud2.influxdata.com",
|
|
163
|
+
"database": "your-database"
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
3. In the ``juham/examples`` folder, run:
|
|
167
|
+
|
|
168
|
+
.. code-block:: bash
|
|
169
|
+
|
|
170
|
+
python3 myapp.py
|
|
171
|
+
|
|
172
|
+
The application will start and time series data will show up in your InfluxDB database,
|
|
173
|
+
which you can then visualize with tools such as Grafana.
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
Changelog
|
|
2
|
+
=========
|
|
3
|
+
|
|
4
|
+
[0.2.7] - December 1 2025
|
|
5
|
+
-------------------------
|
|
6
|
+
|
|
7
|
+
- LeakDetector migrated from juham-watermeter
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
[0.2.6] - November 30 2025
|
|
11
|
+
--------------------------
|
|
12
|
+
|
|
13
|
+
- More agressive spot sensitivity.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
[0.2.5] - 2025-11-21
|
|
18
|
+
--------------------
|
|
19
|
+
|
|
20
|
+
- Project development status elevated to **Beta**.
|
|
21
|
+
- Added an electricity-forecast–aware heating algorithm:
|
|
22
|
+
If today's electricity price is high and tomorrow's is lower, the system
|
|
23
|
+
automatically reduces heating today to optimize cost.
|
|
24
|
+
- Introduced **SupervisorThread**, responsible for:
|
|
25
|
+
- Detecting and listing crashed threads
|
|
26
|
+
- Logging failures
|
|
27
|
+
- Automatically restarting affected threads
|
|
28
|
+
- Added a significant number of new unit tests to improve stability and
|
|
29
|
+
coverage.
|
|
30
|
+
- Extracted **powermeter_simulator.py** into a separate simulation plugin
|
|
31
|
+
for cleaner architecture and modularity.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
[0.1.13] - Nov 15, 2025
|
|
36
|
+
-----------------------
|
|
37
|
+
|
|
38
|
+
- Installation instructions added into README.rst
|
|
39
|
+
- Failure in **ts/log_ts.py** logging method logged the failure, leading to Infinite logging loop. Fixed.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
[0.1.11] - Nov 11, 2025
|
|
43
|
+
-----------------------
|
|
44
|
+
|
|
45
|
+
- New heating plan attributes published to timeseries
|
|
46
|
+
- Heating plan now includes flags indicating whether temperature and solar power forecasts were used.
|
|
47
|
+
- Min and max temperature limits published with the powerplan.
|
|
48
|
+
- Minor issues in docstrings fixed.
|
|
49
|
+
- Unit tests updated to reflect new heating plan attributes.
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
[0.1.5] - Nov 07, 2025
|
|
53
|
+
----------------------
|
|
54
|
+
|
|
55
|
+
- Heating plan optimization logic improved to better account for temperature and solar power forecasts.
|
|
56
|
+
- Unit tests added for significantly higher coverage.
|
|
57
|
+
- Documentation updated to reflect changes in temperature and solar power forecast handling.
|
|
58
|
+
- SolarForecast and TemperatureForecast fields added to PowerPlan time series.
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
[0.1.3] - Nov 01, 2025
|
|
63
|
+
----------------------
|
|
64
|
+
|
|
65
|
+
- Added support for arbitrary energy balancing intervals in the automation module.
|
|
66
|
+
- Default energy balancing interval changed from 1 hour to 15 minutes to comply with the new EU energy market directive.
|
|
67
|
+
- Updated energy cost calculator and heating optimizer components to work with configurable intervals.
|
|
68
|
+
- Improved unit tests to validate behavior across various interval lengths.
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
[0.1.1] - Oct 28, 2025
|
|
73
|
+
----------------------
|
|
74
|
+
|
|
75
|
+
- Project status elevated from Pre-Alpha to Alpha.
|
|
76
|
+
- The default energy balancing interval for **HeatingOptimizer** is now 15 minutes.
|
|
77
|
+
- Added "converage" package to [project.optional-dependencies] in pyproject.toml
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
[0.0.73] - Aug 30, 2025
|
|
82
|
+
-----------------------
|
|
83
|
+
|
|
84
|
+
- Default boiler temperature limits adjusted.
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
[0.0.34] - May 02, 2025
|
|
88
|
+
-----------------------
|
|
89
|
+
|
|
90
|
+
- Weight attribute added to heatingoptimizer. Determines how large a share of the time slot
|
|
91
|
+
a consumer receives compared to others.
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
[0.0.33] - May 01, 2025
|
|
96
|
+
-----------------------
|
|
97
|
+
|
|
98
|
+
- Workaround to Sphinx issue with multiply defined instance variables.
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
[0.0.32] - April 27, 2025
|
|
102
|
+
-------------------------
|
|
103
|
+
|
|
104
|
+
* **HeatingOptimizer** single minimum and maximum temperature attributes replaced by a montly limits.
|
|
105
|
+
|
|
106
|
+
.. code-block:: python
|
|
107
|
+
|
|
108
|
+
pip install masterpiece_plugin
|
|
109
|
+
boiler.temperature_limits = {
|
|
110
|
+
1: (50, 68), # January: colder, need hotter heating water
|
|
111
|
+
2: (50, 68), # February
|
|
112
|
+
3: (50, 68), # March
|
|
113
|
+
4: (40, 68), # April
|
|
114
|
+
5: (30, 68), # May
|
|
115
|
+
6: (30, 68), # June: warmer, need less heating
|
|
116
|
+
7: (30, 68), # July
|
|
117
|
+
8: (30, 68), # August
|
|
118
|
+
9: (40, 68), # September
|
|
119
|
+
10: (50, 68), # October
|
|
120
|
+
11: (50, 68), # November
|
|
121
|
+
12: (50, 68), # December
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
* **HeatingOptimizer** class attributes documented.
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
[0.0.31] - April 21, 2025
|
|
129
|
+
-------------------------
|
|
130
|
+
|
|
131
|
+
* EnergyBalancer and EnergyBalancerTs classes improved. There is now two MQTT sub-topics: status,
|
|
132
|
+
for controlling consumers, and diagnostics for monitoring the operation of the energy balancer.
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
[0.0.29] - April 20, 2025
|
|
136
|
+
-------------------------
|
|
137
|
+
|
|
138
|
+
* Bug fixes to EnergyBalancer.
|
|
139
|
+
* PriceForecast class updated (not there yet)
|
|
140
|
+
|
|
141
|
+
[0.0.28] - April 20, 2025
|
|
142
|
+
-------------------------
|
|
143
|
+
|
|
144
|
+
* EnergyBalancer logic improved. Instead of activating all consumers at the same time, it now activates them one at a time
|
|
145
|
+
in a serialized manner to minimize the maximum power (and fuse capacity, which affects the energy bill) required
|
|
146
|
+
during balancing cycles.
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
[0.0.27] - April 16, 2025
|
|
150
|
+
-------------------------
|
|
151
|
+
|
|
152
|
+
* CI pipeline unification.
|
|
153
|
+
* EnergyBalacing features isolated from the HeatingOptimizer and implemented as a separate energybalancer module.
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
[0.0.23] - April 04, 2025
|
|
158
|
+
-------------------------
|
|
159
|
+
* The HotWaterOptimizer class has been renamed to HeatingOptimizer to better reflect its general-purpose nature.
|
|
160
|
+
* Added test_energybalancer.py
|
|
161
|
+
* Added publish_diagnostics() method to track energy balance driven heating.
|
|
162
|
+
* Added heatingoptimizer_ts module to support time series recording.
|
|
163
|
+
* Fixed bug in net-energy balancing system.
|
|
164
|
+
* Removed redundand dependencies in ``pyproject.toml``.
|
|
165
|
+
* Enabled net energy balance feature.
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
[0.1.12] - March 03, 2025
|
|
169
|
+
-------------------------
|
|
170
|
+
|
|
171
|
+
* Updated for the new modularized ci-templates and docs
|
|
172
|
+
* New unit tests written, for better coverage. Not nearly there yet.
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
[0.1.8-10] - February 23, 2025
|
|
176
|
+
------------------------------
|
|
177
|
+
|
|
178
|
+
* Support for grid (network) prices and tax added.
|
|
179
|
+
|
|
180
|
+
* Bug fix in the computation of the utilization optimization index: solar power was previously
|
|
181
|
+
given in kW, while radiator power was in W, which underestimated the effect of available solar power.
|
|
182
|
+
|
|
183
|
+
* New attribute added to time series: GridCost (cost and tax per kWh)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
[0.1.7] - February 08, 2025
|
|
188
|
+
---------------------------
|
|
189
|
+
|
|
190
|
+
Initial release for GitLab. Pre-alpha!
|
|
191
|
+
|