Skip to main content

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

Project Description

Beyond its super-cool name, this package provides essential home automation building blocks that address most common needs.

It consists of two main sub-modules:

automation:

This folder contains automation classes that listen to Juham™ MQTT topics and control various home automation tasks.

  • 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.
  • charger: General purpose charger base class, for EV chargers etc.

ts:

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

  • electricityprice_ts : publishes electricity prices to timeseries database.
  • energybalancer_ts: for monitoring the operation of energy balancer.
  • energycostcalculator_ts: publishes actualized energy prices per hour and per day.
  • forecast_ts: publishes the forecast datat to timeseries database.
  • log_ts: Writes log events to timeseries datbase.
  • powerplan_ts: publishes power plan data to timeseries database, when relays are planned to be switched on/off.
  • powermeter_ts: publishes powermeter data to timeseries database.

Project Status

Current State: Beta (Status 4)

All classes have been tested to some extent, and no known bugs have been reported.

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.

Installing

Juham™ ships with a minimal yet fully functional home automation application that can be found in the examples folder. It creates a PowerMeterSimulator and ShellyMotionSimulator objets to generate simulated motion sensor and power meter readings. Later, you can replace it with your actual power meter, as well as plug in other input sensors to read and relays to control.

  1. Set up a Mosquitto MQTT broker service. For more information read the manuals.

    .. code-block:: bash

    sudo apt install mosquitto mosquitto-clients

  2. Configure Juham to talk to Mosquitto.

    In PahoMqtt.json:

    .. code-block:: json

    {"paho_version" : 2}

    In Juham.json:

    .. code-block:: json

    {"mqtt_class_id": "PahoMqtt", "mqtt_root_topic": "myapp", "mqtt_host": "localhost", "mqtt_port": 1883}

    In Timeseries.json:

    .. code-block:: json

    { "token": "your-influx-token", "org": "your-organization", "host": "https://us-east-1-1.aws.cloud2.influxdata.com", "database": "your-database" }

  3. In the juham/examples folder, run:

    .. code-block:: bash

    python3 myapp.py

The application will start and time series data will show up in your InfluxDB database, which you can then visualize with tools such as Grafana.

Metadata

Release files for juham-automation 0.2.38

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for juham-automation 0.2.38
File Size Uploaded
juham_automation-0.2.38.tar.gz 58.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for juham-automation 0.2.38
File Interpreter ABI Platform
juham_automation-0.2.38-py3-none-any.whl Python 3 none any Details

Total release size: 102.1 kB

Release files / juham_automation-0.2.38.tar.gz

Download URL juham_automation-0.2.38.tar.gz
Size 58.8 kB
Tags Source
SHA-256 checksum
How to use checksums
57d30528103e6aa81362e7d135a94542b71cd5b96e08beb95b8f89f4ce84add2
BLAKE2b-256 checksum
How to use checksums
0a48616342aa1a40207392eadc53916733b566cd2d027c5237d2ef8c76470eff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / juham_automation-0.2.38-py3-none-any.whl

Download URL juham_automation-0.2.38-py3-none-any.whl
Size 43.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b4d66275f6a7127918536eeba70e6a88888a2f4ff96e84bcb99c343e72173e2
BLAKE2b-256 checksum
How to use checksums
8c4423bdd1fa780d2f31379b3125071dd35009c2b957013e13fc5c83a2e3f8dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

This release

0.2.38 This release

2 release files

0.2.28

2 release files

0.2.26

2 release files

0.2.25

2 release files

0.2.23

2 release files

0.2.21

2 release files

0.2.20

2 release files

0.2.19

2 release files

0.2.18

2 release files

0.2.17

2 release files

0.2.16

2 release files

0.2.15

2 release files

0.2.14

2 release files

0.2.13

2 release files

0.2.12

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.9

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.35

2 release files

0.0.31

2 release files

0.0.30

2 release files

0.0.29

2 release files

0.0.28

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.19

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page