Metadata-Version: 2.4
Name: juham-automation
Version: 0.1.7
Summary: Juha's Ultimate Home Automation Masterpiece
Author-email: J Meskanen <juham.api@gmail.com>
Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
License: LICENSE
        =======
        
        Copyright (c) 2024, Juha Meskanen
        
        Permission is hereby granted, free of charge, to any person obtaining
        a copy of this software and associated documentation files (the
        "Software"), to deal in the Software without restriction, including
        without limitation the rights to use, copy, modify, merge, publish,
        distribute, sublicense, and/or sell copies of the Software, and to
        permit persons to whom the Software is furnished to do so, subject to
        the following conditions:
         
        **The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.**
        
         
        ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
        EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
        MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
        IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
        CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
        TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
        SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **
        
        
Project-URL: Homepage, https://gitlab.com/juham/juham/juham-automation
Project-URL: Bug Reports, https://gitlab.com/juham/juham/juham-automationt
Project-URL: Funding, https://meskanen.com
Project-URL: Say Thanks!, http://meskanen.com
Project-URL: Source, https://gitlab.com/juham/juham/juham-automation
Keywords: home,automation,juham
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development
Classifier: License :: Public Domain
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.rst
Requires-Dist: juham_core>=0.1.6
Provides-Extra: dev
Requires-Dist: check-manifest; extra == "dev"
Requires-Dist: coverage>=7.0; extra == "dev"
Dynamic: license-file

Welcome to Juham™ - Juha's Ultimate Home Automation Masterpiece
===============================================================

Project Description
-------------------

This package provides home automation building blocks that address most common needs. 
It consists of two main sub-modules:

``automation``:

- **spothintafi**: Acquires electricity prices in Finland.
- **watercirculator**: Automates a water circulator pump based on hot water temperature and motion detection.
- **heatingoptimizer**: Controls hot water radiators based on temperature sensors and electricity price data.
- **energycostcalculator**: Monitors power consumption and electricity prices, and computes the energy balance in euros.
- **energybalancer**: Handles real-time energy balancing and net billing.

``ts``:

- This folder contains time series recorders that listen for Juham™ topics and store the data in a time series database for later inspection.


Project Status
--------------

**Current State**: **Alpha (Status 3)**

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. 


Project Links
-------------

- **Source code:** https://gitlab.com/juham/juham/juham-automation
- **Issue tracker:** https://gitlab.com/juham/juham/juham-automation/-/issues
- **Documentation:** https://juham-automation-c6383e.gitlab.io
- **PyPI page:** https://pypi.org/project/juham-automation

  

Features
--------

**HeatingAutomater** listens to the power meter to compute the net energy balance.

  .. image:: _static/images/juham_powermeter.png
     :alt: Powermeter
     :width: 400px

  Powermeter is needed to measure the real-time energy consumption


**Energy Revenue** is computed based on the electricity price and transmission costs. This is the total cost one has to pay for consuming energy.
  
  .. image:: _static/images/juham_energyrevenue.png
     :alt: Energy Revenue
     :width: 400px

  Energy revenue per hour and per day


**Real-time temperature** trends monitored by the **Shelly Plus Add-on** and **DS18B20** sensors
  
  .. image:: _static/images/juham_boilertemperatures.png
     :alt: Energy Revenue
     :width: 400px

  Temperature time series.


**Real-time humidity** trends monitored by the **Shelly Plus Add-on** and **DHT22** sensors
  
  .. image:: _static/images/juham_humiditysensors.png
     :alt: Energy Revenue
     :width: 400px

  Relative humidity time series.


  
**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.

  .. image:: _static/images/juham_uoi.png
     :alt: Power Plan
     :width: 400px

  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.


**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.

  .. image:: _static/images/juham_powerplan.png
     :alt: Power Plan
     :width: 400px

  Powerplan optimizing consumers to use the cheapest hours


**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.

  .. image:: _static/images/juham_automation_energybalancer.png
     :alt: Energy Balancer
     :width: 400px

  Energy balancer activating consumers based on the actual real-time net energy


**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.

  .. image:: _static/images/juham_automation_relays.png
     :alt: Relays
     :width: 400px

  The operation of the relays for diagnosis.
