juham-automation 0.0.12__py3-none-any.whl → 0.2.8__py3-none-any.whl

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.
@@ -0,0 +1,199 @@
1
+ Metadata-Version: 2.4
2
+ Name: juham-automation
3
+ Version: 0.2.8
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,25 @@
1
+ juham_automation/__init__.py,sha256=Y_fUDerXnXFkv1z2p7FeqKQlJ2EuIDY6AEK7xVQ1tXE,914
2
+ juham_automation/japp.py,sha256=L2u1mfKvun2fiXhB3AEJD9zMDcdFZ3_doXZYJJzu9tg,1646
3
+ juham_automation/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
4
+ juham_automation/automation/__init__.py,sha256=0FYYSo2qSMMibH5YHIFgdT6gc5Cmf8XlpQHFSrswE5I,500
5
+ juham_automation/automation/energybalancer.py,sha256=Kw0Czah4JLOgDVAx6ca4nJpFpfZa9LXmv6pr612f-Fg,11473
6
+ juham_automation/automation/energycostcalculator.py,sha256=96pidMxi4tK9g8iLepn9XuTeauZhxi74qGXvvQJe-6s,13023
7
+ juham_automation/automation/heatingoptimizer.py,sha256=AO1VHBHfgQJ8kENsgZH3O3GHZjSksQx_CrsdZZoxjoM,39038
8
+ juham_automation/automation/leakdetector.py,sha256=Q-3X0NOFJf0C5MlR7R_QQp8yw5XvTt85oduuTRYIu_0,6003
9
+ juham_automation/automation/spothintafi.py,sha256=cZbi7w2fVweHX_fh1r5MTjGdesX9wDQta2mfVjtiwvw,4331
10
+ juham_automation/automation/watercirculator.py,sha256=QcLAP9oLA-tYYRH2SjnPT6_kIOdiQbOSf2tQPMitEN0,5471
11
+ juham_automation/ts/__init__.py,sha256=kTEzVkDi6ednH4-fxKxrY6enlTuTXmSw09pPAQX3CMc,612
12
+ juham_automation/ts/electricityprice_ts.py,sha256=kRIewAAtTPi5JvHLEgGGVp_28LkWyB6lGyUH_2dKqBQ,1677
13
+ juham_automation/ts/energybalancer_ts.py,sha256=XHl56G5fBjJOCSIJtdjzGpSTMAQN1xsnXpC4Ipl7ynw,2585
14
+ juham_automation/ts/energycostcalculator_ts.py,sha256=ceYvZOvpXftJmAMW7bb33zI1lh1o0nf71XBJGuijD0s,1296
15
+ juham_automation/ts/forecast_ts.py,sha256=Gk46hIlS8ijxs-zyy8fBvXrhI7J-8e5Gt2QEe6gFB6s,3158
16
+ juham_automation/ts/log_ts.py,sha256=GLOqnwmk2cJdoWPWlrC3XAADp-N1JdfZ407YNQxnxhA,1901
17
+ juham_automation/ts/power_ts.py,sha256=_i_mBPtaVFfH9ycv426uQ4VtSzHacLJB6mEApe26fhE,1571
18
+ juham_automation/ts/powermeter_ts.py,sha256=a4sVERj7k397QlJF_VFg-S7DXSg8oAanPcxdYQBzN4w,2218
19
+ juham_automation/ts/powerplan_ts.py,sha256=TXD4aI8TAv2oGrbHZRjxkhrWkOubJ4Lq3sdotsgAn2Q,2358
20
+ juham_automation-0.2.8.dist-info/licenses/LICENSE.rst,sha256=QVHD5V5_HSys2PdPdig_xKggDj8cGX33ALKqRsYyjtI,1089
21
+ juham_automation-0.2.8.dist-info/METADATA,sha256=swuuGZKrrFBlQCoJDqOUkPJVGJ5wqPOgk2OK-NcmOQs,7620
22
+ juham_automation-0.2.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
+ juham_automation-0.2.8.dist-info/entry_points.txt,sha256=h-KzuKjmGPd4_iX_oiGvxx4IEc97dVbGGlhdh5ctbpI,605
24
+ juham_automation-0.2.8.dist-info/top_level.txt,sha256=jfohvtocvX_gfT21AhJk7Iay5ZiQsS3HzrDjF7S4Qp0,17
25
+ juham_automation-0.2.8.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.2)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,8 +1,10 @@
1
1
  [juham.plugins]
2
2
  electricityprice_plugin = juham_automation:ElectricityPriceTs
3
+ energybalancer_plugin = juham_automation:EnergyBalancer
4
+ energybalancerts_plugin = juham_automation:EnergyBalancerTs
3
5
  energycostcalculator_plugin = juham_automation:EnergyCostCalculator
4
6
  forecast_plugin = juham_automation:ForecastTs
5
- hotwateroptimizer_plugin = juham_automation:HotWaterOptimizer
7
+ heatingoptimizer_plugin = juham_automation:HeatingOptimizer
6
8
  logts_plugin = juham_automation:LogTs
7
9
  powerplan_plugin = juham_automation:PowerPlanTs
8
10
  powerts_plugin = juham_automation:PowerTs