Hot-water energy consumption and optimization potential

Over christmas, I assembled and programmed a little virtual device that allows me to integrate an Oekoboiler hot-water heat-pump boiler, the Oekoboiler’s electricity consumption read-out with a myStrom WiFi switch, and a Shelly UNI controlling the PV Ready function of the Oekoboiler into one virtual Shelly 1PM to be used in a SolarManager PV optimization system.

Hot-water energy consumption and optimization potential

Many individuals are uninformed about the energy consumption needed for water heating. Usually, 16% of a household’s energy usage is attributed to heating water, primarily for showering and bathing. In contrast, cooking and lighting account for about 5% of a household’s energy needs.1

We recently replaced an old, fully electrical hot water boiler with a much more energy efficient heat-pump based hot water boiler from Oekoboiler. While we’re only just starting to measure and compare the energy consumption, it is clear that the reduction will be substantial.2

This post, however, is about a small side-project I started over christmas, using a virtual Shelly device to monitor and optimize our Oekoboiler’s energy consumption with the SolarManager system for PV energy consumption optimisation.

I call this “ Oekoboiler Shelly”.

What is Oekoboiler Shelly, anyway?#

Oekoboiler Shelly is a versatile virtual device that emulates the functionality of a Shelly 1PM device, but with added capabilities for connecting to a Oekoboiler heat pump boiler via its cloud API. This allows for the retrieval of real-time data on water temperature, enabling external systems such as a Solar Manager to optimize PV power consumption by controlling the Oekoboiler’s PV Ready function through a PV relay ( Shelly 1 or Uni).

Oekoboiler Shelly also retrieves data about current power consumption from a Power Meter device and the current relay status from the PV relay device it controls.

This information is then used by the Solar Manager by configuring one or different Shelly 1/PM devices:

  • optimised heat pump control via the ”PV-Ready” or “SG-Ready” function (relay/0),
  • power consumption (meters/0), and
  • hot-water temperature readout (ext_temperature).

A typical use case might be hot water production via the Solar Manager’s Hot water / 1 Step ON / OFF device using a Shelly 1PM as ”Device (Relay)”.

This will then allow you to measure and optimize your Oekoboiler’s enerygy use. It will be displayed as follows, with the current water temperature, current and overall power consumption for the past 24h, and optimization control (”PV-function”).

Oekoboiler Readout

Typical readout#

Once properly configured, Solar Manager will hence display the current warm water temperature along with the detailed graphs for all the devices you have configured.

Oekoboiler Readout

Typical output generated by the virtual device at the /status endpoint looks as follows (simulating a Shelly 1PM):

  "time": "20:10",
  "has_update": false,
  "ram_total": 1513185280,
  "ram_free": 786624512,
  "uptime": 3988,
  "relays": [
      "ison": false,
      "has_timer": false
  "meters": [
      "power": 3.07,
      "is_valid": true
  "tmp": {},
  "ext_sensors": {
    "temperature_unit": "C"
  "ext_temperature": {
    "0": {
      "hwID": 0,
      "tC": 59,
      "tF": 138.2


It is essentially assumed that you know what you’re doing when using this software.

In terms of dependencies, you need

  • node (>=v16 will do) and yarn
  • a server to run the software on
  • a PV and heat pump boiler system to feed / control with this software


To run it, install the dependencies (running yarn will do, as does npm if you wish) and define the following five environment variables:

  • OB_USER_MAIL: your Oekoboiler E-Mail
  • OB_USER_PASSWORD: your Oekoboiler Password3
  • OB_DSN: The Device Serial Number (DSN) of your Oekoboiler4
  • OB_MYSTROM_METER: The MyStrom Switch used as a power meter for the Oekoboiler
  • OB_SHELLY_SWITCH: The Shelly 1 used to control the Oekoboiler’s PV function
  • OB_LISTEN_IP: The IP address to bind to. Useful if you plan to run multiple fake shellies on the same machine with multiple IP adresses

You can do so:

  • by putting them in a .env file whill will be loaded by dotenv, including its variations on how to get to the file,
  • by using the systemd service (with the provided .service file), and, if your systemd is recent enough (or backported), use it’s encryption capability,5
  • or simply by defining them in the shell environment, optionally using something like 1Password CLI to securely pass them to the script.

Once you’re set-up, just run the binary from the working directory to test it:


From there, include the appropriate device in Solar Manager, namely any of those that either measure tempeerature or power, or control a device via a 1 Step ON/OFF relay, based on the Shelly 1/PM devices, depending on your needs and use cases.

What is a heat-pump boiler, anyway?6#

A heat pump boiler is a type of boiler that uses a heat pump to generate heating energy. Instead of using a fossil fuel (such as gas or oil) to produce heat, a heat pump boiler uses electricity to power a heat pump. The heat pump then transfers heat from the surrounding air or ground to the water, which is used to heat the home. In this way, a heat pump boiler can be an energy-efficient alternative to a traditional boiler, as it can reduce the amount of fossil fuels that need to be burned in order to generate heat.

The ratio of electricity needed to the energy taken from the surrounding air or ground in a heat pump system is known as the coefficient of performance (COP). The COP is a measure of the efficiency of the heat pump. In general, the higher the COP, the more efficient the heat pump is. A heat pump with a high COP will use less electricity to generate a given amount of heat than a heat pump with a low COP. The COP of a heat pump can be influenced by a number of factors, including the temperature of the surrounding air or ground, the size and type of the heat pump, and the efficiency of the system components.


I am not affiliated to Oekoboiler, MyStrom, Shelly, or Solar Manager. This project was born out of necessity:

  • Our PV plant was not yet optimized for self consumption of PV power,
  • I knew Solar Manager could work with temperature, consumption, and the “PV function” of a heat-pump boiler ,
  • I had already used both a Shelly and a MyStrom device to partially use their information to control the Oekoboiler’s heating cycle when excess solar power was available, and
  • since the Oekoboiler uses a cloud service with a reasonably simple and publicly documented API, I could put together a small, prototype API client to read out the current temperature.

It stands on the shoulders of others, notably alexryd/fake-shelly, NorthernMan54/homebridge-connex as well as shawnjung/homebridge-plugin-dimplex-connex who all served as inspiration or provided critical pieces needed to stitch this together.

You use this software at your own risk.

  1. See for example the Amphiro FAQ ↩︎

  2. Oekoboiler’s have a phenomenal coefficient of performance (COP) of over 4.2. In comparison to our old, pure electrical hot water boiler, we need less than 20% of the energy needed previously. ↩︎

  3. If you are concerned about passing your Oekboiler credentials to the service, you can create another account with whom you share (read-only) access to the Oekoboiler data. ↩︎

  4. The DSN is displayed in the Oekoboiler App or you can run the example code in the Oekboiler API Repository↩︎

  5. In fact, I learned about many of sytemd’s capabilities, including System and Service Credentials, through this project when I was looking for a safe(r) way to provide the necessary credentials to the service. ↩︎

  6. Text written with the support of ChatGPT↩︎


No comments. Be the first to add one!
Add a comment.
We'll never share your email with anyone else. We use the Gravatar system to pull in pictures based on an anonymous hash.
Once you submit your comment, it will be moderated and then show up here shortly after.