juham-automation 0.0.31__tar.gz → 0.2.20__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 (103) hide show
  1. {juham_automation-0.0.31/juham_automation.egg-info → juham_automation-0.2.20}/PKG-INFO +86 -40
  2. {juham_automation-0.0.31 → juham_automation-0.2.20}/README.rst +78 -6
  3. juham_automation-0.2.20/docs/source/CHANGELOG.rst +204 -0
  4. juham_automation-0.2.20/docs/source/CONTRIBUTING.rst +44 -0
  5. juham_automation-0.2.20/docs/source/LICENSE.rst +25 -0
  6. juham_automation-0.2.20/docs/source/README.rst +172 -0
  7. {juham_automation-0.0.31 → juham_automation-0.2.20}/examples/myapp.py +0 -3
  8. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation/__init__.py +2 -4
  9. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation/automation/__init__.py +2 -4
  10. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation/automation/energybalancer.py +26 -11
  11. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation/automation/energycostcalculator.py +107 -64
  12. juham_automation-0.2.20/juham_automation/automation/heatingoptimizer.py +957 -0
  13. juham_automation-0.2.20/juham_automation/automation/leakdetector.py +162 -0
  14. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation/automation/watercirculator.py +1 -20
  15. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation/japp.py +0 -2
  16. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation/ts/electricityprice_ts.py +1 -1
  17. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation/ts/energycostcalculator_ts.py +3 -1
  18. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation/ts/log_ts.py +19 -16
  19. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation/ts/power_ts.py +17 -14
  20. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation/ts/powermeter_ts.py +3 -2
  21. juham_automation-0.2.20/juham_automation/ts/powerplan_ts.py +64 -0
  22. {juham_automation-0.0.31 → juham_automation-0.2.20/juham_automation.egg-info}/PKG-INFO +86 -40
  23. juham_automation-0.2.20/juham_automation.egg-info/SOURCES.txt +86 -0
  24. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation.egg-info/entry_points.txt +0 -1
  25. juham_automation-0.2.20/juham_automation.egg-info/requires.txt +5 -0
  26. {juham_automation-0.0.31 → juham_automation-0.2.20}/pyproject.toml +10 -14
  27. juham_automation-0.2.20/tests/__pycache__/__init__.cpython-312.pyc +0 -0
  28. juham_automation-0.2.20/tests/__pycache__/test_japp.cpython-312-pytest-9.0.1.pyc +0 -0
  29. juham_automation-0.2.20/tests/__pycache__/test_japp.cpython-312.pyc +0 -0
  30. juham_automation-0.2.20/tests/automation/__pycache__/__init__.cpython-312.pyc +0 -0
  31. juham_automation-0.2.20/tests/automation/__pycache__/test_energybalancer.cpython-312-pytest-9.0.1.pyc +0 -0
  32. juham_automation-0.2.20/tests/automation/__pycache__/test_energybalancer.cpython-312.pyc +0 -0
  33. juham_automation-0.2.20/tests/automation/__pycache__/test_energycostcalculator.cpython-312-pytest-9.0.1.pyc +0 -0
  34. juham_automation-0.2.20/tests/automation/__pycache__/test_energycostcalculator.cpython-312.pyc +0 -0
  35. juham_automation-0.2.20/tests/automation/__pycache__/test_heatingoptimizer.cpython-312-pytest-9.0.1.pyc +0 -0
  36. juham_automation-0.2.20/tests/automation/__pycache__/test_heatingoptimizer.cpython-312.pyc +0 -0
  37. juham_automation-0.2.20/tests/automation/__pycache__/test_juham.cpython-312-pytest-9.0.1.pyc +0 -0
  38. juham_automation-0.2.20/tests/automation/__pycache__/test_juham.cpython-312.pyc +0 -0
  39. juham_automation-0.2.20/tests/automation/__pycache__/test_leakdetector.cpython-312-pytest-9.0.1.pyc +0 -0
  40. juham_automation-0.2.20/tests/automation/__pycache__/test_leakdetector.cpython-312.pyc +0 -0
  41. juham_automation-0.2.20/tests/automation/__pycache__/test_spothintafi.cpython-312-pytest-9.0.1.pyc +0 -0
  42. juham_automation-0.2.20/tests/automation/__pycache__/test_spothintafi.cpython-312.pyc +0 -0
  43. juham_automation-0.2.20/tests/automation/__pycache__/test_watercirculator.cpython-312-pytest-9.0.1.pyc +0 -0
  44. juham_automation-0.2.20/tests/automation/__pycache__/test_watercirculator.cpython-312.pyc +0 -0
  45. {juham_automation-0.0.31 → juham_automation-0.2.20}/tests/automation/test_energybalancer.py +2 -2
  46. juham_automation-0.2.20/tests/automation/test_energycostcalculator.py +272 -0
  47. juham_automation-0.2.20/tests/automation/test_heatingoptimizer.py +479 -0
  48. juham_automation-0.2.20/tests/automation/test_leakdetector.py +123 -0
  49. juham_automation-0.2.20/tests/automation/test_watercirculator.py +131 -0
  50. juham_automation-0.2.20/tests/ts/__pycache__/__init__.cpython-312.pyc +0 -0
  51. juham_automation-0.2.20/tests/ts/__pycache__/test_electricityprice_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  52. juham_automation-0.2.20/tests/ts/__pycache__/test_electricityprice_ts.cpython-312.pyc +0 -0
  53. juham_automation-0.2.20/tests/ts/__pycache__/test_energybalancer_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  54. juham_automation-0.2.20/tests/ts/__pycache__/test_energybalancer_ts.cpython-312.pyc +0 -0
  55. juham_automation-0.2.20/tests/ts/__pycache__/test_energycostcalculator_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  56. juham_automation-0.2.20/tests/ts/__pycache__/test_energycostcalculator_ts.cpython-312.pyc +0 -0
  57. juham_automation-0.2.20/tests/ts/__pycache__/test_forecast_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  58. juham_automation-0.2.20/tests/ts/__pycache__/test_forecast_ts.cpython-312.pyc +0 -0
  59. juham_automation-0.2.20/tests/ts/__pycache__/test_log_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  60. juham_automation-0.2.20/tests/ts/__pycache__/test_log_ts.cpython-312.pyc +0 -0
  61. juham_automation-0.2.20/tests/ts/__pycache__/test_power_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  62. juham_automation-0.2.20/tests/ts/__pycache__/test_power_ts.cpython-312.pyc +0 -0
  63. juham_automation-0.2.20/tests/ts/__pycache__/test_powermeter_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  64. juham_automation-0.2.20/tests/ts/__pycache__/test_powermeter_ts.cpython-312.pyc +0 -0
  65. juham_automation-0.2.20/tests/ts/__pycache__/test_powerplan_ts.cpython-312-pytest-9.0.1.pyc +0 -0
  66. juham_automation-0.2.20/tests/ts/__pycache__/test_powerplan_ts.cpython-312.pyc +0 -0
  67. juham_automation-0.2.20/tests/ts/test_electricityprice_ts.py +70 -0
  68. juham_automation-0.2.20/tests/ts/test_energybalancer_ts.py +103 -0
  69. juham_automation-0.2.20/tests/ts/test_energycostcalculator_ts.py +75 -0
  70. juham_automation-0.2.20/tests/ts/test_forecast_ts.py +90 -0
  71. juham_automation-0.2.20/tests/ts/test_log_ts.py +84 -0
  72. juham_automation-0.2.20/tests/ts/test_power_ts.py +78 -0
  73. juham_automation-0.2.20/tests/ts/test_powermeter_ts.py +83 -0
  74. juham_automation-0.2.20/tests/ts/test_powerplan_ts.py +85 -0
  75. juham_automation-0.0.31/juham_automation/automation/heatingoptimizer.py +0 -551
  76. juham_automation-0.0.31/juham_automation/automation/powermeter_simulator.py +0 -139
  77. juham_automation-0.0.31/juham_automation/automation/spothintafi.py +0 -140
  78. juham_automation-0.0.31/juham_automation/ts/powerplan_ts.py +0 -45
  79. juham_automation-0.0.31/juham_automation.egg-info/SOURCES.txt +0 -45
  80. juham_automation-0.0.31/juham_automation.egg-info/requires.txt +0 -5
  81. juham_automation-0.0.31/tests/automation/test_energycostcalculator.py +0 -118
  82. juham_automation-0.0.31/tests/automation/test_heatingoptimizer.py +0 -134
  83. juham_automation-0.0.31/tests/automation/test_spothintafi.py +0 -67
  84. juham_automation-0.0.31/tests/ts/test_energycostcalculator_ts.py +0 -14
  85. juham_automation-0.0.31/tests/ts/test_forecast_ts.py +0 -14
  86. juham_automation-0.0.31/tests/ts/test_log_ts.py +0 -14
  87. juham_automation-0.0.31/tests/ts/test_power_ts.py +0 -14
  88. juham_automation-0.0.31/tests/ts/test_powermeter_ts.py +0 -14
  89. juham_automation-0.0.31/tests/ts/test_powerplan_ts.py +0 -14
  90. {juham_automation-0.0.31 → juham_automation-0.2.20}/LICENSE.rst +0 -0
  91. {juham_automation-0.0.31 → juham_automation-0.2.20}/MANIFEST.in +0 -0
  92. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation/py.typed +0 -0
  93. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation/ts/__init__.py +0 -0
  94. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation/ts/energybalancer_ts.py +0 -0
  95. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation/ts/forecast_ts.py +0 -0
  96. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation.egg-info/dependency_links.txt +0 -0
  97. {juham_automation-0.0.31 → juham_automation-0.2.20}/juham_automation.egg-info/top_level.txt +0 -0
  98. {juham_automation-0.0.31 → juham_automation-0.2.20}/setup.cfg +0 -0
  99. {juham_automation-0.0.31 → juham_automation-0.2.20}/tests/__init__.py +0 -0
  100. {juham_automation-0.0.31 → juham_automation-0.2.20}/tests/automation/__init__.py +0 -0
  101. {juham_automation-0.0.31 → juham_automation-0.2.20}/tests/automation/test_juham.py +0 -0
  102. {juham_automation-0.0.31 → juham_automation-0.2.20}/tests/test_japp.py +0 -0
  103. {juham_automation-0.0.31 → juham_automation-0.2.20}/tests/ts/__init__.py +0 -0
@@ -1,80 +1,78 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: juham-automation
3
- Version: 0.0.31
3
+ Version: 0.2.20
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.6
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``:
62
- - **spothintafi**: Acquires electricity prices in Finland.
38
+
39
+ This folder contains automation classes that listen to Juham™ MQTT topics and control various home automation tasks.
40
+
63
41
  - **watercirculator**: Automates a water circulator pump based on hot water temperature and motion detection.
64
42
  - **heatingoptimizer**: Controls hot water radiators based on temperature sensors and electricity price data.
65
43
  - **energycostcalculator**: Monitors power consumption and electricity prices, and computes the energy balance in euros.
66
44
  - **energybalancer**: Handles real-time energy balancing and net billing.
67
45
 
68
46
  ``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.
47
+
48
+ This folder contains time series recorders that listen for Juham™ topics and store the data in a time series database for later inspection.
49
+
50
+ - **electricityprice_ts** : publishes electricity prices to timeseries database.
51
+ - **energybalancer_ts**: for monitoring the operation of energy balancer.
52
+ - **energycostcalculator_ts**: publishes actualized energy prices per hour and per day.
53
+ - **forecast_ts**: publishes the forecast datat to timeseries database.
54
+ - **log_ts**: Writes log events to timeseries datbase.
55
+ - **powerplan_ts**: publishes power plan data to timeseries database, when relays are planned to be switched on/off.
56
+ - **powermeter_ts**: publishes powermeter data to timeseries database.
57
+
70
58
 
71
59
  Project Status
72
60
  --------------
73
61
 
74
- **Current State**: **Pre-Alpha (Status 2)**
62
+ **Current State**: **Beta (Status 4)**
63
+
64
+ All classes have been tested to some extent, and no known bugs have been reported.
65
+
75
66
 
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.
67
+ Project Links
68
+ -------------
77
69
 
70
+ - **Source code:** https://gitlab.com/juham/juham/juham-automation
71
+ - **Issue tracker:** https://gitlab.com/juham/juham/juham-automation/-/issues
72
+ - **Documentation:** https://juham-automation-c6383e.gitlab.io
73
+ - **PyPI page:** https://pypi.org/project/juham-automation
74
+
75
+
78
76
 
79
77
  Features
80
78
  --------
@@ -150,3 +148,51 @@ Features
150
148
  :width: 400px
151
149
 
152
150
  The operation of the relays for diagnosis.
151
+
152
+
153
+ Installing
154
+ ----------
155
+
156
+ Juham™ ships with a minimal yet fully functional home automation application that can be found in the **examples** folder.
157
+ It creates a **PowerMeterSimulator** and **ShellyMotionSimulator** objets to generate simulated motion sensor and power meter readings.
158
+ Later, you can replace it with your actual power meter, as well as plug in other input sensors to read and relays to control.
159
+
160
+ 1. Set up a Mosquitto MQTT broker service. For more information read the manuals.
161
+
162
+ .. code-block:: bash
163
+
164
+ sudo apt install mosquitto mosquitto-clients
165
+
166
+ 2. Configure Juham to talk to Mosquitto.
167
+
168
+ In ``PahoMqtt.json``:
169
+
170
+ .. code-block:: json
171
+
172
+ {"paho_version" : 2}
173
+
174
+ In ``Juham.json``:
175
+
176
+ .. code-block:: json
177
+
178
+ {"mqtt_class_id": "PahoMqtt", "mqtt_root_topic": "myapp", "mqtt_host": "localhost", "mqtt_port": 1883}
179
+
180
+ In ``Timeseries.json``:
181
+
182
+ .. code-block:: json
183
+
184
+ {
185
+ "token": "your-influx-token",
186
+ "org": "your-organization",
187
+ "host": "https://us-east-1-1.aws.cloud2.influxdata.com",
188
+ "database": "your-database"
189
+ }
190
+
191
+ 3. In the ``juham/examples`` folder, run:
192
+
193
+ .. code-block:: bash
194
+
195
+ python3 myapp.py
196
+
197
+ The application will start and time series data will show up in your InfluxDB database,
198
+ which you can then visualize with tools such as Grafana.
@@ -1,28 +1,52 @@
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``:
10
- - **spothintafi**: Acquires electricity prices in Finland.
12
+
13
+ This folder contains automation classes that listen to Juham™ MQTT topics and control various home automation tasks.
14
+
11
15
  - **watercirculator**: Automates a water circulator pump based on hot water temperature and motion detection.
12
16
  - **heatingoptimizer**: Controls hot water radiators based on temperature sensors and electricity price data.
13
17
  - **energycostcalculator**: Monitors power consumption and electricity prices, and computes the energy balance in euros.
14
18
  - **energybalancer**: Handles real-time energy balancing and net billing.
15
19
 
16
20
  ``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.
21
+
22
+ This folder contains time series recorders that listen for Juham™ topics and store the data in a time series database for later inspection.
23
+
24
+ - **electricityprice_ts** : publishes electricity prices to timeseries database.
25
+ - **energybalancer_ts**: for monitoring the operation of energy balancer.
26
+ - **energycostcalculator_ts**: publishes actualized energy prices per hour and per day.
27
+ - **forecast_ts**: publishes the forecast datat to timeseries database.
28
+ - **log_ts**: Writes log events to timeseries datbase.
29
+ - **powerplan_ts**: publishes power plan data to timeseries database, when relays are planned to be switched on/off.
30
+ - **powermeter_ts**: publishes powermeter data to timeseries database.
31
+
18
32
 
19
33
  Project Status
20
34
  --------------
21
35
 
22
- **Current State**: **Pre-Alpha (Status 2)**
36
+ **Current State**: **Beta (Status 4)**
37
+
38
+ All classes have been tested to some extent, and no known bugs have been reported.
39
+
23
40
 
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.
41
+ Project Links
42
+ -------------
25
43
 
44
+ - **Source code:** https://gitlab.com/juham/juham/juham-automation
45
+ - **Issue tracker:** https://gitlab.com/juham/juham/juham-automation/-/issues
46
+ - **Documentation:** https://juham-automation-c6383e.gitlab.io
47
+ - **PyPI page:** https://pypi.org/project/juham-automation
48
+
49
+
26
50
 
27
51
  Features
28
52
  --------
@@ -98,3 +122,51 @@ Features
98
122
  :width: 400px
99
123
 
100
124
  The operation of the relays for diagnosis.
125
+
126
+
127
+ Installing
128
+ ----------
129
+
130
+ Juham™ ships with a minimal yet fully functional home automation application that can be found in the **examples** folder.
131
+ It creates a **PowerMeterSimulator** and **ShellyMotionSimulator** objets to generate simulated motion sensor and power meter readings.
132
+ Later, you can replace it with your actual power meter, as well as plug in other input sensors to read and relays to control.
133
+
134
+ 1. Set up a Mosquitto MQTT broker service. For more information read the manuals.
135
+
136
+ .. code-block:: bash
137
+
138
+ sudo apt install mosquitto mosquitto-clients
139
+
140
+ 2. Configure Juham to talk to Mosquitto.
141
+
142
+ In ``PahoMqtt.json``:
143
+
144
+ .. code-block:: json
145
+
146
+ {"paho_version" : 2}
147
+
148
+ In ``Juham.json``:
149
+
150
+ .. code-block:: json
151
+
152
+ {"mqtt_class_id": "PahoMqtt", "mqtt_root_topic": "myapp", "mqtt_host": "localhost", "mqtt_port": 1883}
153
+
154
+ In ``Timeseries.json``:
155
+
156
+ .. code-block:: json
157
+
158
+ {
159
+ "token": "your-influx-token",
160
+ "org": "your-organization",
161
+ "host": "https://us-east-1-1.aws.cloud2.influxdata.com",
162
+ "database": "your-database"
163
+ }
164
+
165
+ 3. In the ``juham/examples`` folder, run:
166
+
167
+ .. code-block:: bash
168
+
169
+ python3 myapp.py
170
+
171
+ The application will start and time series data will show up in your InfluxDB database,
172
+ which you can then visualize with tools such as Grafana.
@@ -0,0 +1,204 @@
1
+ Changelog
2
+ =========
3
+
4
+
5
+ [0.2.10] - December 3 2025
6
+ --------------------------
7
+
8
+ - Error logging improved for timeseries database writes.
9
+ - Dependencies to the recent masterpiece releases updated
10
+
11
+
12
+ [0.2.9] - December 1 2025
13
+ -------------------------
14
+ - 'spothintafi.py' removed and implemented as separate 'juham-spothintafi' plugin
15
+
16
+
17
+ [0.2.8] - December 1 2025
18
+ -------------------------
19
+ - LeakDetector migrated from juham-watermeter
20
+ - Obsolete debug logging removed from the LeakDetector
21
+
22
+
23
+ [0.2.6] - November 30 2025
24
+ --------------------------
25
+
26
+ - More agressive spot sensitivity.
27
+
28
+
29
+
30
+ [0.2.5] - 2025-11-21
31
+ --------------------
32
+
33
+ - Project development status elevated to **Beta**.
34
+ - Added an electricity-forecast–aware heating algorithm:
35
+ If today's electricity price is high and tomorrow's is lower, the system
36
+ automatically reduces heating today to optimize cost.
37
+ - Introduced **SupervisorThread**, responsible for:
38
+ - Detecting and listing crashed threads
39
+ - Logging failures
40
+ - Automatically restarting affected threads
41
+ - Added a significant number of new unit tests to improve stability and
42
+ coverage.
43
+ - Extracted **powermeter_simulator.py** into a separate simulation plugin
44
+ for cleaner architecture and modularity.
45
+
46
+
47
+
48
+ [0.1.13] - Nov 15, 2025
49
+ -----------------------
50
+
51
+ - Installation instructions added into README.rst
52
+ - Failure in **ts/log_ts.py** logging method logged the failure, leading to Infinite logging loop. Fixed.
53
+
54
+
55
+ [0.1.11] - Nov 11, 2025
56
+ -----------------------
57
+
58
+ - New heating plan attributes published to timeseries
59
+ - Heating plan now includes flags indicating whether temperature and solar power forecasts were used.
60
+ - Min and max temperature limits published with the powerplan.
61
+ - Minor issues in docstrings fixed.
62
+ - Unit tests updated to reflect new heating plan attributes.
63
+
64
+
65
+ [0.1.5] - Nov 07, 2025
66
+ ----------------------
67
+
68
+ - Heating plan optimization logic improved to better account for temperature and solar power forecasts.
69
+ - Unit tests added for significantly higher coverage.
70
+ - Documentation updated to reflect changes in temperature and solar power forecast handling.
71
+ - SolarForecast and TemperatureForecast fields added to PowerPlan time series.
72
+
73
+
74
+
75
+ [0.1.3] - Nov 01, 2025
76
+ ----------------------
77
+
78
+ - Added support for arbitrary energy balancing intervals in the automation module.
79
+ - Default energy balancing interval changed from 1 hour to 15 minutes to comply with the new EU energy market directive.
80
+ - Updated energy cost calculator and heating optimizer components to work with configurable intervals.
81
+ - Improved unit tests to validate behavior across various interval lengths.
82
+
83
+
84
+
85
+ [0.1.1] - Oct 28, 2025
86
+ ----------------------
87
+
88
+ - Project status elevated from Pre-Alpha to Alpha.
89
+ - The default energy balancing interval for **HeatingOptimizer** is now 15 minutes.
90
+ - Added "converage" package to [project.optional-dependencies] in pyproject.toml
91
+
92
+
93
+
94
+ [0.0.73] - Aug 30, 2025
95
+ -----------------------
96
+
97
+ - Default boiler temperature limits adjusted.
98
+
99
+
100
+ [0.0.34] - May 02, 2025
101
+ -----------------------
102
+
103
+ - Weight attribute added to heatingoptimizer. Determines how large a share of the time slot
104
+ a consumer receives compared to others.
105
+
106
+
107
+
108
+ [0.0.33] - May 01, 2025
109
+ -----------------------
110
+
111
+ - Workaround to Sphinx issue with multiply defined instance variables.
112
+
113
+
114
+ [0.0.32] - April 27, 2025
115
+ -------------------------
116
+
117
+ * **HeatingOptimizer** single minimum and maximum temperature attributes replaced by a montly limits.
118
+
119
+ .. code-block:: python
120
+
121
+ pip install masterpiece_plugin
122
+ boiler.temperature_limits = {
123
+ 1: (50, 68), # January: colder, need hotter heating water
124
+ 2: (50, 68), # February
125
+ 3: (50, 68), # March
126
+ 4: (40, 68), # April
127
+ 5: (30, 68), # May
128
+ 6: (30, 68), # June: warmer, need less heating
129
+ 7: (30, 68), # July
130
+ 8: (30, 68), # August
131
+ 9: (40, 68), # September
132
+ 10: (50, 68), # October
133
+ 11: (50, 68), # November
134
+ 12: (50, 68), # December
135
+ }
136
+
137
+ * **HeatingOptimizer** class attributes documented.
138
+
139
+
140
+
141
+ [0.0.31] - April 21, 2025
142
+ -------------------------
143
+
144
+ * EnergyBalancer and EnergyBalancerTs classes improved. There is now two MQTT sub-topics: status,
145
+ for controlling consumers, and diagnostics for monitoring the operation of the energy balancer.
146
+
147
+
148
+ [0.0.29] - April 20, 2025
149
+ -------------------------
150
+
151
+ * Bug fixes to EnergyBalancer.
152
+ * PriceForecast class updated (not there yet)
153
+
154
+ [0.0.28] - April 20, 2025
155
+ -------------------------
156
+
157
+ * EnergyBalancer logic improved. Instead of activating all consumers at the same time, it now activates them one at a time
158
+ in a serialized manner to minimize the maximum power (and fuse capacity, which affects the energy bill) required
159
+ during balancing cycles.
160
+
161
+
162
+ [0.0.27] - April 16, 2025
163
+ -------------------------
164
+
165
+ * CI pipeline unification.
166
+ * EnergyBalacing features isolated from the HeatingOptimizer and implemented as a separate energybalancer module.
167
+
168
+
169
+
170
+ [0.0.23] - April 04, 2025
171
+ -------------------------
172
+ * The HotWaterOptimizer class has been renamed to HeatingOptimizer to better reflect its general-purpose nature.
173
+ * Added test_energybalancer.py
174
+ * Added publish_diagnostics() method to track energy balance driven heating.
175
+ * Added heatingoptimizer_ts module to support time series recording.
176
+ * Fixed bug in net-energy balancing system.
177
+ * Removed redundand dependencies in ``pyproject.toml``.
178
+ * Enabled net energy balance feature.
179
+
180
+
181
+ [0.1.12] - March 03, 2025
182
+ -------------------------
183
+
184
+ * Updated for the new modularized ci-templates and docs
185
+ * New unit tests written, for better coverage. Not nearly there yet.
186
+
187
+
188
+ [0.1.8-10] - February 23, 2025
189
+ ------------------------------
190
+
191
+ * Support for grid (network) prices and tax added.
192
+
193
+ * Bug fix in the computation of the utilization optimization index: solar power was previously
194
+ given in kW, while radiator power was in W, which underestimated the effect of available solar power.
195
+
196
+ * New attribute added to time series: GridCost (cost and tax per kWh)
197
+
198
+
199
+
200
+ [0.1.7] - February 08, 2025
201
+ ---------------------------
202
+
203
+ Initial release for GitLab. Pre-alpha!
204
+
@@ -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
+