juham-automation 0.0.17__tar.gz → 0.0.26__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.0.26}/LICENSE.rst +25 -25
- {juham_automation-0.0.17 → juham_automation-0.0.26}/MANIFEST.in +12 -12
- juham_automation-0.0.26/PKG-INFO +152 -0
- juham_automation-0.0.26/README.rst +100 -0
- {juham_automation-0.0.17 → juham_automation-0.0.26}/examples/myapp.py +37 -37
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation/__init__.py +42 -38
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation/automation/__init__.py +23 -21
- juham_automation-0.0.26/juham_automation/automation/energybalancer.py +158 -0
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation/automation/energycostcalculator.py +267 -266
- juham_automation-0.0.17/juham_automation/automation/hotwateroptimizer.py → juham_automation-0.0.26/juham_automation/automation/heatingoptimizer.py +539 -581
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation/automation/powermeter_simulator.py +139 -139
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation/automation/spothintafi.py +140 -140
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation/automation/watercirculator.py +159 -159
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation/japp.py +53 -49
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation/ts/__init__.py +27 -25
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation/ts/electricityprice_ts.py +51 -51
- juham_automation-0.0.26/juham_automation/ts/energybalancer_ts.py +47 -0
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation/ts/energycostcalculator_ts.py +43 -43
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation/ts/forecast_ts.py +97 -97
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation/ts/log_ts.py +57 -57
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation/ts/power_ts.py +49 -49
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation/ts/powermeter_ts.py +67 -70
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation/ts/powerplan_ts.py +45 -45
- juham_automation-0.0.26/juham_automation.egg-info/PKG-INFO +152 -0
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation.egg-info/SOURCES.txt +6 -23
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation.egg-info/entry_points.txt +3 -1
- {juham_automation-0.0.17 → juham_automation-0.0.26}/pyproject.toml +72 -71
- {juham_automation-0.0.17 → juham_automation-0.0.26}/setup.cfg +4 -4
- {juham_automation-0.0.17 → juham_automation-0.0.26}/tests/__init__.py +1 -1
- {juham_automation-0.0.17 → juham_automation-0.0.26}/tests/automation/__init__.py +1 -1
- juham_automation-0.0.26/tests/automation/test_energybalancer.py +183 -0
- {juham_automation-0.0.17 → juham_automation-0.0.26}/tests/automation/test_energycostcalculator.py +118 -118
- juham_automation-0.0.17/tests/automation/test_hotwateroptimizer.py → juham_automation-0.0.26/tests/automation/test_heatingoptimizer.py +134 -109
- {juham_automation-0.0.17 → juham_automation-0.0.26}/tests/automation/test_juham.py +65 -65
- {juham_automation-0.0.17 → juham_automation-0.0.26}/tests/automation/test_spothintafi.py +67 -67
- {juham_automation-0.0.17 → juham_automation-0.0.26}/tests/test_japp.py +18 -18
- juham_automation-0.0.26/tests/ts/__init__.py +1 -0
- {juham_automation-0.0.17 → juham_automation-0.0.26}/tests/ts/test_energycostcalculator_ts.py +14 -14
- {juham_automation-0.0.17 → juham_automation-0.0.26}/tests/ts/test_forecast_ts.py +14 -14
- {juham_automation-0.0.17 → juham_automation-0.0.26}/tests/ts/test_log_ts.py +14 -14
- {juham_automation-0.0.17 → juham_automation-0.0.26}/tests/ts/test_power_ts.py +14 -14
- {juham_automation-0.0.17 → juham_automation-0.0.26}/tests/ts/test_powermeter_ts.py +14 -14
- {juham_automation-0.0.17 → juham_automation-0.0.26}/tests/ts/test_powerplan_ts.py +14 -14
- 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/CONTRIBUTING.rst +0 -44
- juham_automation-0.0.17/docs/source/LICENSE.rst +0 -25
- 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.egg-info/PKG-INFO +0 -106
- juham_automation-0.0.17/tests/__pycache__/__init__.cpython-312.pyc +0 -0
- juham_automation-0.0.17/tests/__pycache__/test_japp.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_juham.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/__pycache__/test_spothintafi.cpython-312.pyc +0 -0
- 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 → juham_automation-0.0.26}/juham_automation/py.typed +0 -0
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation.egg-info/dependency_links.txt +0 -0
- {juham_automation-0.0.17 → juham_automation-0.0.26}/juham_automation.egg-info/requires.txt +0 -0
- {juham_automation-0.0.17 → juham_automation-0.0.26}/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,152 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: juham-automation
|
3
|
+
Version: 0.0.26
|
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: LICENSE
|
8
|
+
=======
|
9
|
+
|
10
|
+
Copyright (c) 2024, Juha Meskanen
|
11
|
+
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
13
|
+
a copy of this software and associated documentation files (the
|
14
|
+
"Software"), to deal in the Software without restriction, including
|
15
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
16
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
17
|
+
permit persons to whom the Software is furnished to do so, subject to
|
18
|
+
the following conditions:
|
19
|
+
|
20
|
+
**The above copyright notice and this permission notice shall be included in all
|
21
|
+
copies or substantial portions of the Software.**
|
22
|
+
|
23
|
+
|
24
|
+
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
25
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
26
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
27
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
28
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
29
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
30
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **
|
31
|
+
|
32
|
+
|
33
|
+
Project-URL: Homepage, https://gitlab.com/juham/juham/juham-automation.git
|
34
|
+
Project-URL: Bug Reports, https://gitlab.com/juham/juham/juham-automation.git
|
35
|
+
Project-URL: Funding, https://meskanen.com
|
36
|
+
Project-URL: Say Thanks!, http://meskanen.com
|
37
|
+
Project-URL: Source, https://gitlab.com/juham/juham/juham-automation.git
|
38
|
+
Keywords: home,automation,juham
|
39
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
40
|
+
Classifier: Intended Audience :: Developers
|
41
|
+
Classifier: Topic :: Software Development
|
42
|
+
Classifier: License :: Public Domain
|
43
|
+
Classifier: Programming Language :: Python :: 3.8
|
44
|
+
Requires-Python: >=3.8
|
45
|
+
Description-Content-Type: text/markdown
|
46
|
+
License-File: LICENSE.rst
|
47
|
+
Requires-Dist: juham_core>=0.1.3
|
48
|
+
Provides-Extra: dev
|
49
|
+
Requires-Dist: check-manifest; extra == "dev"
|
50
|
+
Requires-Dist: types-pyz; extra == "dev"
|
51
|
+
Dynamic: license-file
|
52
|
+
|
53
|
+
Welcome to Juham™ - Juha's Ultimate Home Automation Masterpiece
|
54
|
+
================================================================
|
55
|
+
|
56
|
+
Project Description
|
57
|
+
-------------------
|
58
|
+
|
59
|
+
This package extends the ``juham_core`` package, providing home automation building blocks that address most common needs. It consists of two main sub-modules:
|
60
|
+
|
61
|
+
``automation``:
|
62
|
+
- **spothintafi**: Acquires electricity prices in Finland.
|
63
|
+
- **watercirculator**: Automates a water circulator pump based on hot water temperature and motion detection.
|
64
|
+
- **heatingoptimizer**: Controls hot water radiators based on temperature sensors and electricity price data.
|
65
|
+
- **energycostcalculator**: Monitors power consumption and electricity prices, and computes the energy balance in euros.
|
66
|
+
- **energybalancer**: Handles real-time energy balancing and net billing.
|
67
|
+
|
68
|
+
``ts``:
|
69
|
+
- This folder contains time series recorders that listen for Juham™ topics and store the data in a time series database for later inspection.
|
70
|
+
|
71
|
+
Project Status
|
72
|
+
--------------
|
73
|
+
|
74
|
+
**Current State**: **Pre-Alpha (Status 2)**
|
75
|
+
|
76
|
+
All classes have been tested to some extent, and no known bugs have been reported. However, the code still requires work in terms of design and robustness. For example, electricity prices are currently hard-coded to use euros, but this should be configurable to support multiple currencies.
|
77
|
+
|
78
|
+
|
79
|
+
Features
|
80
|
+
--------
|
81
|
+
|
82
|
+
**HeatingAutomater** listens to the power meter to compute the net energy balance.
|
83
|
+
|
84
|
+
.. image:: _static/images/juham_powermeter.png
|
85
|
+
:alt: Powermeter
|
86
|
+
:width: 400px
|
87
|
+
|
88
|
+
Powermeter is needed to measure the real-time energy consumption
|
89
|
+
|
90
|
+
|
91
|
+
**Energy Revenue** is computed based on the electricity price and transmission costs. This is the total cost one has to pay for consuming energy.
|
92
|
+
|
93
|
+
.. image:: _static/images/juham_energyrevenue.png
|
94
|
+
:alt: Energy Revenue
|
95
|
+
:width: 400px
|
96
|
+
|
97
|
+
Energy revenue per hour and per day
|
98
|
+
|
99
|
+
|
100
|
+
**Real-time temperature** trends monitored by the **Shelly Plus Add-on** and **DS18B20** sensors
|
101
|
+
|
102
|
+
.. image:: _static/images/juham_boilertemperatures.png
|
103
|
+
:alt: Energy Revenue
|
104
|
+
:width: 400px
|
105
|
+
|
106
|
+
Temperature time series.
|
107
|
+
|
108
|
+
|
109
|
+
**Real-time humidity** trends monitored by the **Shelly Plus Add-on** and **DHT22** sensors
|
110
|
+
|
111
|
+
.. image:: _static/images/juham_humiditysensors.png
|
112
|
+
:alt: Energy Revenue
|
113
|
+
:width: 400px
|
114
|
+
|
115
|
+
Relative humidity time series.
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
**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.
|
120
|
+
|
121
|
+
.. image:: _static/images/juham_uoi.png
|
122
|
+
:alt: Power Plan
|
123
|
+
:width: 400px
|
124
|
+
|
125
|
+
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.
|
126
|
+
|
127
|
+
|
128
|
+
**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.
|
129
|
+
|
130
|
+
.. image:: _static/images/juham_powerplan.png
|
131
|
+
:alt: Power Plan
|
132
|
+
:width: 400px
|
133
|
+
|
134
|
+
Powerplan optimizing consumers to use the cheapest hours
|
135
|
+
|
136
|
+
|
137
|
+
**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.
|
138
|
+
|
139
|
+
.. image:: _static/images/juham_automation_energybalancer.png
|
140
|
+
:alt: Energy Balancer
|
141
|
+
:width: 400px
|
142
|
+
|
143
|
+
Energy balancer activating consumers based on the actual real-time net energy
|
144
|
+
|
145
|
+
|
146
|
+
**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.
|
147
|
+
|
148
|
+
.. image:: _static/images/juham_automation_relays.png
|
149
|
+
:alt: Relays
|
150
|
+
:width: 400px
|
151
|
+
|
152
|
+
The operation of the relays for diagnosis.
|
@@ -0,0 +1,100 @@
|
|
1
|
+
Welcome to Juham™ - Juha's Ultimate Home Automation Masterpiece
|
2
|
+
================================================================
|
3
|
+
|
4
|
+
Project Description
|
5
|
+
-------------------
|
6
|
+
|
7
|
+
This package extends the ``juham_core`` package, providing home automation building blocks that address most common needs. It consists of two main sub-modules:
|
8
|
+
|
9
|
+
``automation``:
|
10
|
+
- **spothintafi**: Acquires electricity prices in Finland.
|
11
|
+
- **watercirculator**: Automates a water circulator pump based on hot water temperature and motion detection.
|
12
|
+
- **heatingoptimizer**: Controls hot water radiators based on temperature sensors and electricity price data.
|
13
|
+
- **energycostcalculator**: Monitors power consumption and electricity prices, and computes the energy balance in euros.
|
14
|
+
- **energybalancer**: Handles real-time energy balancing and net billing.
|
15
|
+
|
16
|
+
``ts``:
|
17
|
+
- This folder contains time series recorders that listen for Juham™ topics and store the data in a time series database for later inspection.
|
18
|
+
|
19
|
+
Project Status
|
20
|
+
--------------
|
21
|
+
|
22
|
+
**Current State**: **Pre-Alpha (Status 2)**
|
23
|
+
|
24
|
+
All classes have been tested to some extent, and no known bugs have been reported. However, the code still requires work in terms of design and robustness. For example, electricity prices are currently hard-coded to use euros, but this should be configurable to support multiple currencies.
|
25
|
+
|
26
|
+
|
27
|
+
Features
|
28
|
+
--------
|
29
|
+
|
30
|
+
**HeatingAutomater** listens to the power meter to compute the net energy balance.
|
31
|
+
|
32
|
+
.. image:: _static/images/juham_powermeter.png
|
33
|
+
:alt: Powermeter
|
34
|
+
:width: 400px
|
35
|
+
|
36
|
+
Powermeter is needed to measure the real-time energy consumption
|
37
|
+
|
38
|
+
|
39
|
+
**Energy Revenue** is computed based on the electricity price and transmission costs. This is the total cost one has to pay for consuming energy.
|
40
|
+
|
41
|
+
.. image:: _static/images/juham_energyrevenue.png
|
42
|
+
:alt: Energy Revenue
|
43
|
+
:width: 400px
|
44
|
+
|
45
|
+
Energy revenue per hour and per day
|
46
|
+
|
47
|
+
|
48
|
+
**Real-time temperature** trends monitored by the **Shelly Plus Add-on** and **DS18B20** sensors
|
49
|
+
|
50
|
+
.. image:: _static/images/juham_boilertemperatures.png
|
51
|
+
:alt: Energy Revenue
|
52
|
+
:width: 400px
|
53
|
+
|
54
|
+
Temperature time series.
|
55
|
+
|
56
|
+
|
57
|
+
**Real-time humidity** trends monitored by the **Shelly Plus Add-on** and **DHT22** sensors
|
58
|
+
|
59
|
+
.. image:: _static/images/juham_humiditysensors.png
|
60
|
+
:alt: Energy Revenue
|
61
|
+
:width: 400px
|
62
|
+
|
63
|
+
Relative humidity time series.
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
**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.
|
68
|
+
|
69
|
+
.. image:: _static/images/juham_uoi.png
|
70
|
+
:alt: Power Plan
|
71
|
+
:width: 400px
|
72
|
+
|
73
|
+
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.
|
74
|
+
|
75
|
+
|
76
|
+
**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.
|
77
|
+
|
78
|
+
.. image:: _static/images/juham_powerplan.png
|
79
|
+
:alt: Power Plan
|
80
|
+
:width: 400px
|
81
|
+
|
82
|
+
Powerplan optimizing consumers to use the cheapest hours
|
83
|
+
|
84
|
+
|
85
|
+
**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.
|
86
|
+
|
87
|
+
.. image:: _static/images/juham_automation_energybalancer.png
|
88
|
+
:alt: Energy Balancer
|
89
|
+
:width: 400px
|
90
|
+
|
91
|
+
Energy balancer activating consumers based on the actual real-time net energy
|
92
|
+
|
93
|
+
|
94
|
+
**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.
|
95
|
+
|
96
|
+
.. image:: _static/images/juham_automation_relays.png
|
97
|
+
:alt: Relays
|
98
|
+
:width: 400px
|
99
|
+
|
100
|
+
The operation of the relays for diagnosis.
|
@@ -1,37 +1,37 @@
|
|
1
|
-
from typing_extensions import override
|
2
|
-
|
3
|
-
from juham_automation import JApp
|
4
|
-
from juham_automation import PowerMeterSimulator
|
5
|
-
from juham_automation import
|
6
|
-
|
7
|
-
|
8
|
-
class MyApp(JApp):
|
9
|
-
"""Juham home automation example application."""
|
10
|
-
|
11
|
-
def __init__(self, name: str = "myapp"):
|
12
|
-
"""Creates home automation application with the given name."""
|
13
|
-
super().__init__(name)
|
14
|
-
self.instantiate_classes()
|
15
|
-
|
16
|
-
@override
|
17
|
-
def instantiate_classes(self) -> None:
|
18
|
-
super().instantiate_classes()
|
19
|
-
# generate simulated energy meter readings
|
20
|
-
self.add(PowerMeterSimulator("powerconsumption"))
|
21
|
-
|
22
|
-
# Heating plan for the main boiler, with shelly's temperature sensor
|
23
|
-
self.add(
|
24
|
-
|
25
|
-
# print the instance hierarchy
|
26
|
-
self.print()
|
27
|
-
|
28
|
-
|
29
|
-
def main() -> None:
|
30
|
-
id: str = "myapp"
|
31
|
-
MyApp.init_app_id(id)
|
32
|
-
app: MyApp = MyApp(id)
|
33
|
-
app.run_forever()
|
34
|
-
|
35
|
-
|
36
|
-
if __name__ == "__main__":
|
37
|
-
main()
|
1
|
+
from typing_extensions import override
|
2
|
+
|
3
|
+
from juham_automation import JApp
|
4
|
+
from juham_automation import PowerMeterSimulator
|
5
|
+
from juham_automation import HeatingOptimizer
|
6
|
+
|
7
|
+
|
8
|
+
class MyApp(JApp):
|
9
|
+
"""Juham home automation example application."""
|
10
|
+
|
11
|
+
def __init__(self, name: str = "myapp"):
|
12
|
+
"""Creates home automation application with the given name."""
|
13
|
+
super().__init__(name)
|
14
|
+
self.instantiate_classes()
|
15
|
+
|
16
|
+
@override
|
17
|
+
def instantiate_classes(self) -> None:
|
18
|
+
super().instantiate_classes()
|
19
|
+
# generate simulated energy meter readings
|
20
|
+
self.add(PowerMeterSimulator("powerconsumption"))
|
21
|
+
|
22
|
+
# Heating plan for the main boiler, with shelly's temperature sensor
|
23
|
+
self.add(HeatingOptimizer("boiler", "temperature/102", 0, 3, 0.15))
|
24
|
+
|
25
|
+
# print the instance hierarchy
|
26
|
+
self.print()
|
27
|
+
|
28
|
+
|
29
|
+
def main() -> None:
|
30
|
+
id: str = "myapp"
|
31
|
+
MyApp.init_app_id(id)
|
32
|
+
app: MyApp = MyApp(id)
|
33
|
+
app.run_forever()
|
34
|
+
|
35
|
+
|
36
|
+
if __name__ == "__main__":
|
37
|
+
main()
|
@@ -1,38 +1,42 @@
|
|
1
|
-
"""
|
2
|
-
Description
|
3
|
-
===========
|
4
|
-
|
5
|
-
Juham - Juha's Ultimate Home Automation Masterpiece
|
6
|
-
|
7
|
-
"""
|
8
|
-
|
9
|
-
from .automation import EnergyCostCalculator
|
10
|
-
from .automation import PowerMeterSimulator
|
11
|
-
from .automation import SpotHintaFi
|
12
|
-
from .automation import WaterCirculator
|
13
|
-
from .automation import
|
14
|
-
from .
|
15
|
-
from .ts import
|
16
|
-
from .ts import
|
17
|
-
from .ts import
|
18
|
-
from .ts import
|
19
|
-
from .ts import
|
20
|
-
from .ts import
|
21
|
-
from .
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
"
|
28
|
-
"
|
29
|
-
"
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"
|
35
|
-
"
|
36
|
-
"
|
37
|
-
"
|
38
|
-
|
1
|
+
"""
|
2
|
+
Description
|
3
|
+
===========
|
4
|
+
|
5
|
+
Juham - Juha's Ultimate Home Automation Masterpiece
|
6
|
+
|
7
|
+
"""
|
8
|
+
|
9
|
+
from .automation import EnergyCostCalculator
|
10
|
+
from .automation import PowerMeterSimulator
|
11
|
+
from .automation import SpotHintaFi
|
12
|
+
from .automation import WaterCirculator
|
13
|
+
from .automation import HeatingOptimizer
|
14
|
+
from .automation import EnergyBalancer
|
15
|
+
from .ts import EnergyCostCalculatorTs
|
16
|
+
from .ts import ForecastTs
|
17
|
+
from .ts import LogTs
|
18
|
+
from .ts import PowerTs
|
19
|
+
from .ts import PowerPlanTs
|
20
|
+
from .ts import PowerMeterTs
|
21
|
+
from .ts import ElectricityPriceTs
|
22
|
+
from .ts import EnergyBalancerTs
|
23
|
+
from .japp import JApp
|
24
|
+
|
25
|
+
|
26
|
+
__all__ = [
|
27
|
+
"EnergyCostCalculator",
|
28
|
+
"EnergyCostCalculatorTs",
|
29
|
+
"ForecastTs",
|
30
|
+
"HeatingOptimizer",
|
31
|
+
"EnergyBalancer",
|
32
|
+
"LogTs",
|
33
|
+
"PowerTs",
|
34
|
+
"PowerPlanTs",
|
35
|
+
"PowerMeterTs",
|
36
|
+
"SpotHintaFi",
|
37
|
+
"WaterCirculator",
|
38
|
+
"JApp",
|
39
|
+
"PowerMeterSimulator",
|
40
|
+
"ElectricityPriceTs",
|
41
|
+
"EnergyBalancerTs",
|
42
|
+
]
|
@@ -1,21 +1,23 @@
|
|
1
|
-
"""
|
2
|
-
Description
|
3
|
-
===========
|
4
|
-
|
5
|
-
Juham - Juha's Ultimate Home Automation classes
|
6
|
-
|
7
|
-
"""
|
8
|
-
|
9
|
-
from .energycostcalculator import EnergyCostCalculator
|
10
|
-
from .spothintafi import SpotHintaFi
|
11
|
-
from .watercirculator import WaterCirculator
|
12
|
-
from .
|
13
|
-
from .
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
"
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"
|
21
|
-
|
1
|
+
"""
|
2
|
+
Description
|
3
|
+
===========
|
4
|
+
|
5
|
+
Juham - Juha's Ultimate Home Automation classes
|
6
|
+
|
7
|
+
"""
|
8
|
+
|
9
|
+
from .energycostcalculator import EnergyCostCalculator
|
10
|
+
from .spothintafi import SpotHintaFi
|
11
|
+
from .watercirculator import WaterCirculator
|
12
|
+
from .heatingoptimizer import HeatingOptimizer
|
13
|
+
from .energybalancer import EnergyBalancer
|
14
|
+
from .powermeter_simulator import PowerMeterSimulator
|
15
|
+
|
16
|
+
__all__ = [
|
17
|
+
"EnergyCostCalculator",
|
18
|
+
"HeatingOptimizer",
|
19
|
+
"SpotHintaFi",
|
20
|
+
"WaterCirculator",
|
21
|
+
"PowerMeterSimulator",
|
22
|
+
"EnergyBalancer",
|
23
|
+
]
|