Hi,
For a long time I used RWE / innogy smart home technology to control my underfloor heating.
Unfortunately RWE does not allow to include my gas central heating - definitely a main component of the overall heating system - in its set-up.
Approximately 1 year ago I run over “Controme Smart-Heat” which next to this possibility would also allow to include weather forecasts (e.g. heating is reduced already in the ramp-up phase if temperatures rise higher on the next day, presence detection, heat-pump control, solar heating, etc.) -> https://www.controme.com.
A feature which definitely convinced me to try it out is that this system uses next to a temperatur sensor in each room a temperature measurement of the reflow of each individual heating circuit to control the heating of each room.
My hardware set-up looks like this (one floor as an example):
The complete set-up is controlled by a mini-server based on a raspberrypi:
Controme has published an API (http://support.controme.com/api/) which does allow the implementation within OpenHAB.
In principle I have used the exec-binding to bind Controme to OpenHAB.
The set-up I have chooses is as follows:
One php-script to read the temperture data:
<?php
$Sensor = $argv[1];
$devicelist = json_decode(file_get_contents("[CONTROME_MINI_SERVER-IP]/get/json/v1/1/temps/"), true);
function search($array, $key, $value)
{
$results = array();
if (is_array($array))
{
if (isset($array[$key]) && $array[$key] == $value)
$results[] = $array;
foreach ($array as $subarray)
$results = array_merge($results, search($subarray, $key, $value));
}
return $results;
}
$key = search($devicelist,'beschreibung', $Sensor);
//print_r($key);
echo round(($key[0]['wert']), 2);
?>
where $argv[1] is the sensor name you have been configured in the Controme set-up. It will be later defined in the .item file. A second php-file to extract the set-tempertures:
<?php
$Raum = $argv[1];
$devicelist = json_decode(file_get_contents("[CONTROME_MINI_SERVER-IP]/get/json/v1/1/temps/"), true);
function search($array, $key, $value)
{
$results = array();
if (is_array($array))
{
if (isset($array[$key]) && $array[$key] == $value)
$results[] = $array;
foreach ($array as $subarray)
$results = array_merge($results, search($subarray, $key, $value));
}
return $results;
}
$key = search($devicelist,'name', $Raum);
//print_r($key);
$OffsetGeo = $key[0]['offsets']['geolocation']['raum'];
$OffsetWetter = $key[0]['offsets']['Wetter']['raum'];
$OffsetKal = $key[0]['offsets']['Jahreskalender']['raum'];
$OffsetZeit = $key[0]['offsets']['Zeitschalter']['raum'];
$OffsetTotal = $OffsetGeo + $OffsetWetter + $OffsetKal + $OffsetZeit;
$Solltemperatur = round(($key[0]['solltemperatur']), 2) + $OffsetTotal;
echo $Solltemperatur;
?>
And last but not least a php- and sh-file to control the set-temperatures:
<?php
$Raum = $argv[1];
$SollTemp = $argv[2];
$devicelist = json_decode(file_get_contents("http://[CONTROME_MINI_SERVER-IP]/get/json/v1/1/temps/"), true);
function search($array, $key, $value)
{
$results = array();
if (is_array($array))
{
if (isset($array[$key]) && $array[$key] == $value)
$results[] = $array;
foreach ($array as $subarray)
$results = array_merge($results, search($subarray, $key, $value));
}
return $results;
}
$key = search($devicelist,'name', $Raum);
$ID=($key[0]['id']);
shell_exec("/data/.apps/Controme/ContromeTempSet.sh '".$ID."' '".$SollTemp."'> /dev/null 2>&1");
?>
#!/bin/sh
url='http://[CONTROME_MINI_SERVER-IP]/set/json/v1/1/soll/'$1'/'
curl -X POST -F 'user=user' -F 'password=password' -F 'soll='$2 $url
The implementation within openHAB is - example for one room - as follows:
Number TemperaturBad "Bad [%.1f °C]" <TemperaturSensor> (Klima, Temperatur, Bad, Raeume) {exec="<[php /data/.apps/Controme/ContromeTemp.php RT_Bad:60000:REGEX((.*?))]"}
Number TemperaturBadRL "Bad RL [%.1f °C]" <TemperaturRL> (Klima, TemperaturRL, Bad, Raeume) {exec="<[php /data/.apps/Controme/ContromeTemp.php RL_Bad:60000:REGEX((.*?))]"}
Number TemperaturBadSoll "Bad Soll [%.1f °C]" <TemperaturSensor> (Klima, TemperaturSoll, Bad, Raeume) {exec="<[php /data/.apps/Controme/ContromeTempSoll.php Bad:60000:REGEX((.*?))]"}
Number TemperaturBadSollSet "Bad Soll Set [%.1f °C]" {exec="<[php /data/.apps/Controme/ContromeTempSoll.php Bad:5000:REGEX((.*?))] >[*:php /data/.apps/Controme/ContromeTempSet.php Bad %2$s]"}
String TempBad "Bad [%s]"
Text item=TempBad icon="TemperaturSensor" {
Frame label="Soll Temperatur Bad" {
Setpoint item=TemperaturBadSollSet step=0.5 minValue=15 maxValue=26 icon="TemperaturSensor"
}
}
Any feedback is highly welcome.
Cheers