rWCHCd - rPi Weather Compensated Heating Controller daemon

Presentation

rWCHCd is the software part of the rWCHC project aimed at implementing a versatile weather-compensatedcentral heating controller. The goal is to provide smart, accurate and optimal temperature control based on outdoor temperature variations, building structure and occupant habits, in order to maximize comfort and reduce power usage (minimize both the impact on the environment and the energy bill). The system is designed to be scalable and remote operable (via internet connection).

This project is composed of two parts: a custom-designed hardware module (documented here) to perform the actual power control on heating appliances, and a software module which is the topic of this page.

This software is typically meant to run on a Raspberry Pi host accompanying the rWCHC hardware module to perform all computations and enhanced logic control, but it can operate on any system that supports basic C-library programming interface. As this piece of software has eventually grown over 10,000 lines of (well documented) code and has become a standalone creation, it is now described separately here.

Licensing

This project falls under a different licensing scheme than the rest of this website. Please read this section carefully.

The hardware part (incl. firmware) of this project is currently all rights reserved.

The software part (excl. firmware) of this project is currently all rights reserved.

I am still considering suitable licensing schemes at this time. If you are interested in this project feel free to get in touch.

Design goals

My design goals are simple. The system should be:

Safe

Reliable

Versatile

Affordable

KISS design

This is reflected in the list of software features.

The system is geared toward a “set and forget” approach, only requiring some attention at initial setup time.

Software

The rWCHCd daemon – written in C and documented inline via doxygen – is the “brain” of the heating controller system.
By design, computations are performed in integer arithmetics to reduce the load on the host, to improve scalability, and to facilitate implementation on a scaled-down MCU if that ever becomes desirable.

In fact, while developed to manage the rWCHC hardware module from a Rasberry Pi, this control daemon is designed to be both hardware and platform independent:

A hardware abstraction layer allows for easy implementation of new hardware modules as “plugins”

The software’s only mandatory dependency is the C library

Features

Presently, the following features are implemented (non-exhaustive list):

Weather-compensated operation, with virtually unlimited number of building models:

Building temperature behavior modelling via inertia time constant

Per-model outdoor temperature source

Per-model evaluation of frost or summer conditions

Virtually unlimited number of heating circuits with any of the following features:

Water-based circuits with radiators are supported

Per-circuit, independent target ambient temperature

Per-circuit building model assignment

Direct heating circuits

Mixed heating circuits, with 3-way mixing valve:

Support for multiple types of valve control algorithms: bang-bang, successive approximations, PI controller

Support for temperature deadzone in all algorithms

Support for actuator deadband in all algorithms

Support for multiple types of heating curves (linear and bilinear approximations are implemented)

Support for ambient temperature modelisation in the absence of an ambient sensor

Support for accelerated cooldown and boost warmup transitions

Support for water temperature rate of rise control

Support for optional circuit ambient temperature sensor

Support for optional circuit water return temperature sensor

Support for automatic circuit turn-off based on outdoor temperature evolution

Support for presence indicators (e.g. sensors or IFTTT) to learn the occupants habits

Support for HomeKit integration

The daemon code is currently unreleased.

Proof-of-concept web application

A basic, proof-of-concept web interface has been developed in Python (relying on web.py framework), it allows
for setting various parameters and remote controlling the heating system (turning it off/on, setting heating mode, etc).
When using the rrdtool logging backend, a small CGI script is available to display historical graphs of various datapoints, see for instance: