juham-automation 0.0.31__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.
Files changed (104) hide show
  1. {juham_automation-0.0.31/juham_automation.egg-info → juham_automation-0.2.7}/PKG-INFO +86 -39
  2. {juham_automation-0.0.31 → juham_automation-0.2.7}/README.rst +78 -5
  3. juham_automation-0.2.7/docs/source/CHANGELOG.rst +191 -0
  4. juham_automation-0.2.7/docs/source/CONTRIBUTING.rst +44 -0
  5. juham_automation-0.2.7/docs/source/LICENSE.rst +25 -0
  6. juham_automation-0.2.7/docs/source/README.rst +173 -0
  7. juham_automation-0.2.7/examples/myapp.log +52 -0
  8. {juham_automation-0.0.31 → juham_automation-0.2.7}/examples/myapp.py +0 -3
  9. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/__init__.py +2 -2
  10. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/automation/__init__.py +2 -2
  11. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/automation/energybalancer.py +26 -11
  12. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/automation/energycostcalculator.py +107 -64
  13. juham_automation-0.2.7/juham_automation/automation/heatingoptimizer.py +971 -0
  14. juham_automation-0.2.7/juham_automation/automation/leakdetector.py +164 -0
  15. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/automation/watercirculator.py +1 -20
  16. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/ts/electricityprice_ts.py +1 -1
  17. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/ts/energycostcalculator_ts.py +3 -1
  18. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/ts/log_ts.py +19 -16
  19. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/ts/power_ts.py +17 -14
  20. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/ts/powermeter_ts.py +3 -2
  21. juham_automation-0.2.7/juham_automation/ts/powerplan_ts.py +64 -0
  22. {juham_automation-0.0.31 → juham_automation-0.2.7/juham_automation.egg-info}/PKG-INFO +86 -39
  23. juham_automation-0.2.7/juham_automation.egg-info/SOURCES.txt +89 -0
  24. juham_automation-0.2.7/juham_automation.egg-info/requires.txt +5 -0
  25. {juham_automation-0.0.31 → juham_automation-0.2.7}/pyproject.toml +10 -13
  26. juham_automation-0.2.7/tests/__pycache__/__init__.cpython-312.pyc +0 -0
  27. juham_automation-0.2.7/tests/__pycache__/test_japp.cpython-312-pytest-9.0.1.pyc +0 -0
  28. juham_automation-0.2.7/tests/__pycache__/test_japp.cpython-312.pyc +0 -0
  29. juham_automation-0.2.7/tests/automation/__pycache__/__init__.cpython-312.pyc +0 -0
  30. juham_automation-0.2.7/tests/automation/__pycache__/test_energybalancer.cpython-312-pytest-9.0.1.pyc +0 -0
  31. juham_automation-0.2.7/tests/automation/__pycache__/test_energybalancer.cpython-312.pyc +0 -0
  32. juham_automation-0.2.7/tests/automation/__pycache__/test_energycostcalculator.cpython-312-pytest-9.0.1.pyc +0 -0
  33. juham_automation-0.2.7/tests/automation/__pycache__/test_energycostcalculator.cpython-312.pyc +0 -0
  34. juham_automation-0.2.7/tests/automation/__pycache__/test_heatingoptimizer.cpython-312-pytest-9.0.1.pyc +0 -0
  35. juham_automation-0.2.7/tests/automation/__pycache__/test_heatingoptimizer.cpython-312.pyc +0 -0
  36. juham_automation-0.2.7/tests/automation/__pycache__/test_juham.cpython-312-pytest-9.0.1.pyc +0 -0
  37. juham_automation-0.2.7/tests/automation/__pycache__/test_juham.cpython-312.pyc +0 -0
  38. juham_automation-0.2.7/tests/automation/__pycache__/test_leakdetector.cpython-312-pytest-9.0.1.pyc +0 -0
  39. juham_automation-0.2.7/tests/automation/__pycache__/test_leakdetector.cpython-312.pyc +0 -0
  40. juham_automation-0.2.7/tests/automation/__pycache__/test_spothintafi.cpython-312-pytest-9.0.1.pyc +0 -0
  41. juham_automation-0.2.7/tests/automation/__pycache__/test_spothintafi.cpython-312.pyc +0 -0
  42. juham_automation-0.2.7/tests/automation/__pycache__/test_watercirculator.cpython-312-pytest-9.0.1.pyc +0 -0
  43. juham_automation-0.2.7/tests/automation/__pycache__/test_watercirculator.cpython-312.pyc +0 -0
  44. {juham_automation-0.0.31 → juham_automation-0.2.7}/tests/automation/test_energybalancer.py +2 -2
  45. juham_automation-0.2.7/tests/automation/test_energycostcalculator.py +272 -0
  46. juham_automation-0.2.7/tests/automation/test_heatingoptimizer.py +485 -0
  47. juham_automation-0.2.7/tests/automation/test_leakdetector.py +123 -0
  48. juham_automation-0.2.7/tests/automation/test_watercirculator.py +131 -0
  49. juham_automation-0.2.7/tests/ts/__pycache__/__init__.cpython-312.pyc +0 -0
  50. juham_automation-0.2.7/tests/ts/__pycache__/test_electricityprice_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  51. juham_automation-0.2.7/tests/ts/__pycache__/test_electricityprice_ts.cpython-312.pyc +0 -0
  52. juham_automation-0.2.7/tests/ts/__pycache__/test_energybalancer_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  53. juham_automation-0.2.7/tests/ts/__pycache__/test_energybalancer_ts.cpython-312.pyc +0 -0
  54. juham_automation-0.2.7/tests/ts/__pycache__/test_energycostcalculator_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  55. juham_automation-0.2.7/tests/ts/__pycache__/test_energycostcalculator_ts.cpython-312.pyc +0 -0
  56. juham_automation-0.2.7/tests/ts/__pycache__/test_forecast_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  57. juham_automation-0.2.7/tests/ts/__pycache__/test_forecast_ts.cpython-312.pyc +0 -0
  58. juham_automation-0.2.7/tests/ts/__pycache__/test_log_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  59. juham_automation-0.2.7/tests/ts/__pycache__/test_log_ts.cpython-312.pyc +0 -0
  60. juham_automation-0.2.7/tests/ts/__pycache__/test_power_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  61. juham_automation-0.2.7/tests/ts/__pycache__/test_power_ts.cpython-312.pyc +0 -0
  62. juham_automation-0.2.7/tests/ts/__pycache__/test_powermeter_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  63. juham_automation-0.2.7/tests/ts/__pycache__/test_powermeter_ts.cpython-312.pyc +0 -0
  64. juham_automation-0.2.7/tests/ts/__pycache__/test_powerplan_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  65. juham_automation-0.2.7/tests/ts/__pycache__/test_powerplan_ts.cpython-312.pyc +0 -0
  66. juham_automation-0.2.7/tests/ts/test_electricityprice_ts.py +70 -0
  67. juham_automation-0.2.7/tests/ts/test_energybalancer_ts.py +103 -0
  68. juham_automation-0.2.7/tests/ts/test_energycostcalculator_ts.py +75 -0
  69. juham_automation-0.2.7/tests/ts/test_forecast_ts.py +90 -0
  70. juham_automation-0.2.7/tests/ts/test_log_ts.py +84 -0
  71. juham_automation-0.2.7/tests/ts/test_power_ts.py +78 -0
  72. juham_automation-0.2.7/tests/ts/test_powermeter_ts.py +83 -0
  73. juham_automation-0.2.7/tests/ts/test_powerplan_ts.py +85 -0
  74. juham_automation-0.0.31/juham_automation/automation/heatingoptimizer.py +0 -551
  75. juham_automation-0.0.31/juham_automation/automation/powermeter_simulator.py +0 -139
  76. juham_automation-0.0.31/juham_automation/ts/powerplan_ts.py +0 -45
  77. juham_automation-0.0.31/juham_automation.egg-info/SOURCES.txt +0 -45
  78. juham_automation-0.0.31/juham_automation.egg-info/requires.txt +0 -5
  79. juham_automation-0.0.31/tests/automation/test_energycostcalculator.py +0 -118
  80. juham_automation-0.0.31/tests/automation/test_heatingoptimizer.py +0 -134
  81. juham_automation-0.0.31/tests/ts/test_energycostcalculator_ts.py +0 -14
  82. juham_automation-0.0.31/tests/ts/test_forecast_ts.py +0 -14
  83. juham_automation-0.0.31/tests/ts/test_log_ts.py +0 -14
  84. juham_automation-0.0.31/tests/ts/test_power_ts.py +0 -14
  85. juham_automation-0.0.31/tests/ts/test_powermeter_ts.py +0 -14
  86. juham_automation-0.0.31/tests/ts/test_powerplan_ts.py +0 -14
  87. {juham_automation-0.0.31 → juham_automation-0.2.7}/LICENSE.rst +0 -0
  88. {juham_automation-0.0.31 → juham_automation-0.2.7}/MANIFEST.in +0 -0
  89. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/automation/spothintafi.py +0 -0
  90. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/japp.py +0 -0
  91. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/py.typed +0 -0
  92. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/ts/__init__.py +0 -0
  93. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/ts/energybalancer_ts.py +0 -0
  94. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation/ts/forecast_ts.py +0 -0
  95. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation.egg-info/dependency_links.txt +0 -0
  96. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation.egg-info/entry_points.txt +0 -0
  97. {juham_automation-0.0.31 → juham_automation-0.2.7}/juham_automation.egg-info/top_level.txt +0 -0
  98. {juham_automation-0.0.31 → juham_automation-0.2.7}/setup.cfg +0 -0
  99. {juham_automation-0.0.31 → juham_automation-0.2.7}/tests/__init__.py +0 -0
  100. {juham_automation-0.0.31 → juham_automation-0.2.7}/tests/automation/__init__.py +0 -0
  101. {juham_automation-0.0.31 → juham_automation-0.2.7}/tests/automation/test_juham.py +0 -0
  102. {juham_automation-0.0.31 → juham_automation-0.2.7}/tests/automation/test_spothintafi.py +0 -0
  103. {juham_automation-0.0.31 → juham_automation-0.2.7}/tests/test_japp.py +0 -0
  104. {juham_automation-0.0.31 → juham_automation-0.2.7}/tests/ts/__init__.py +0 -0
@@ -1,64 +1,43 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: juham-automation
3
- Version: 0.0.31
3
+ Version: 0.2.7
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>
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
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
35
10
  Project-URL: Funding, https://meskanen.com
36
11
  Project-URL: Say Thanks!, http://meskanen.com
37
- Project-URL: Source, https://gitlab.com/juham/juham/juham-automation.git
12
+ Project-URL: Source, https://gitlab.com/juham/juham/juham-automation
38
13
  Keywords: home,automation,juham
39
- Classifier: Development Status :: 2 - Pre-Alpha
14
+ Classifier: Development Status :: 4 - Beta
40
15
  Classifier: Intended Audience :: Developers
41
16
  Classifier: Topic :: Software Development
42
- Classifier: License :: Public Domain
43
17
  Classifier: Programming Language :: Python :: 3.8
44
18
  Requires-Python: >=3.8
45
19
  Description-Content-Type: text/markdown
46
20
  License-File: LICENSE.rst
47
- Requires-Dist: juham_core>=0.1.5
21
+ Requires-Dist: juham_core>=0.2.4
48
22
  Provides-Extra: dev
49
23
  Requires-Dist: check-manifest; extra == "dev"
50
- Requires-Dist: types-pyz; extra == "dev"
24
+ Requires-Dist: coverage>=7.0; extra == "dev"
51
25
  Dynamic: license-file
52
26
 
53
27
  Welcome to Juham™ - Juha's Ultimate Home Automation Masterpiece
54
- ================================================================
28
+ ===============================================================
55
29
 
56
30
  Project Description
57
31
  -------------------
58
32
 
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:
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:
60
36
 
61
37
  ``automation``:
38
+
39
+ This folder contains automation classes that listen to Juham™ MQTT topics and control various home automation tasks.
40
+
62
41
  - **spothintafi**: Acquires electricity prices in Finland.
63
42
  - **watercirculator**: Automates a water circulator pump based on hot water temperature and motion detection.
64
43
  - **heatingoptimizer**: Controls hot water radiators based on temperature sensors and electricity price data.
@@ -66,15 +45,35 @@ This package extends the ``juham_core`` package, providing home automation build
66
45
  - **energybalancer**: Handles real-time energy balancing and net billing.
67
46
 
68
47
  ``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.
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
+
70
59
 
71
60
  Project Status
72
61
  --------------
73
62
 
74
- **Current State**: **Pre-Alpha (Status 2)**
63
+ **Current State**: **Beta (Status 4)**
64
+
65
+ All classes have been tested to some extent, and no known bugs have been reported.
66
+
75
67
 
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.
68
+ Project Links
69
+ -------------
77
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
+
78
77
 
79
78
  Features
80
79
  --------
@@ -150,3 +149,51 @@ Features
150
149
  :width: 400px
151
150
 
152
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.
@@ -1,12 +1,17 @@
1
1
  Welcome to Juham™ - Juha's Ultimate Home Automation Masterpiece
2
- ================================================================
2
+ ===============================================================
3
3
 
4
4
  Project Description
5
5
  -------------------
6
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:
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:
8
10
 
9
11
  ``automation``:
12
+
13
+ This folder contains automation classes that listen to Juham™ MQTT topics and control various home automation tasks.
14
+
10
15
  - **spothintafi**: Acquires electricity prices in Finland.
11
16
  - **watercirculator**: Automates a water circulator pump based on hot water temperature and motion detection.
12
17
  - **heatingoptimizer**: Controls hot water radiators based on temperature sensors and electricity price data.
@@ -14,15 +19,35 @@ This package extends the ``juham_core`` package, providing home automation build
14
19
  - **energybalancer**: Handles real-time energy balancing and net billing.
15
20
 
16
21
  ``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.
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
+
18
33
 
19
34
  Project Status
20
35
  --------------
21
36
 
22
- **Current State**: **Pre-Alpha (Status 2)**
37
+ **Current State**: **Beta (Status 4)**
38
+
39
+ All classes have been tested to some extent, and no known bugs have been reported.
40
+
23
41
 
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.
42
+ Project Links
43
+ -------------
25
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
+
26
51
 
27
52
  Features
28
53
  --------
@@ -98,3 +123,51 @@ Features
98
123
  :width: 400px
99
124
 
100
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
+
@@ -0,0 +1,44 @@
1
+ Contributing to Juham™ - Juha's Ultimate Home Automation Masterpiece
2
+ ====================================================================
3
+
4
+ Thank You!
5
+ ----------
6
+
7
+ Thank you in advance for your forthcoming contributions, whether they are bug fixes,
8
+ documentation improvements, entirely new features, or simply feedback. Your efforts
9
+ will be highly appreciated and will help turn this project from its current mission
10
+ state into an actual masterpiece.
11
+
12
+
13
+ Design Patterns
14
+ ---------------
15
+
16
+ Please read the developer documentation and understand the few design patterns behind Juham™ before contributing.
17
+ This will help ensure that your contributions align with the project's design and goals.
18
+ .. todo:: (okay, the documentation is currently lacking many essential chapters, add.)
19
+
20
+
21
+ Code Formatting
22
+ ---------------
23
+
24
+ To help maintain consistent code formatting across different developers, we use 'black' python formatter, by Microsoft.
25
+
26
+ Strange, the formatter doesn't seem to format that much, it doesn't organize imports,
27
+ doesn't adjust docstring lenghts
28
+ .. todo:: most likely I don't know how to use it properly, read the docs.
29
+
30
+
31
+ Using Emacs and Makefile
32
+ ------------------------
33
+
34
+ Despite my attempts to fall in love with Eclipse, VSCode and other IDEs, I still find Emacs and Makefile the best
35
+ tools for many workflows.
36
+ So there is a Makefile in the root folder. For those old dogs who are like me
37
+ ::
38
+
39
+ make help
40
+
41
+ More Stuff
42
+ ----------
43
+ .. todo:: TBA
44
+
@@ -0,0 +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
+