ESP Conrol Brinks WTW

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
sincze
Normal user
Posts: 28
Joined: 15 Jul 2016, 12:54

ESP Conrol Brinks WTW

#1 Post by sincze » 19 Aug 2018, 13:24

As you can see with the amount of posts in this forum I just started using ESPEasy. :D .
I have to admit I've created some nice things already. This time for my neighbour he wanted to control his Renovent HR Medium/Large - Brink Climate Systems.
In his house there is only 1 switch in the Kitchen, so if you want to turn it on in the bathroom... your are out of luck. To have it turn on by iteself if the humidity is to high.. That would be ideal.

I've figured out the solution some time ago using Mysensors. But for him I wanted to create a small and easy solution.
https://forum.mysensors.org/topic/7180/ ... te-systems

This is what I started with:
Image

Basically you need WEMOS D1 mini, combo board and a relais for ESPEasy to make it work.
The relais (if enabled) should 'connect' the wires to switch on WTW Speed 3. If disabled the WTW will run at is default speed of 1.

As it needed to be cheap... You can figure out where the housing came from..
Housing
Housing
renovent-esp.jpg (29.73 KiB) Viewed 1355 times
Within the rules you need: (So you can control the relais via HTTP)

Code: Select all

on wtw_on do
    gpio,5,1
endon

on wtw_off do
    gpio,5,0
endon
The relais can be controlled by:

Code: Select all

Can be controlled by:
http://<your_ip_here>/control?cmd=event,wtw_Off
http://<your_ip_here>/control?cmd=event,wtw_On
Keep in mind that GPIO 5 is default connected to SCL within ESPEasy so you might have to free that one up from within menu 'ESPEasy -> Hardware'.

Next stop will be the filter indicator.
Image

I have that working in domoticz. However it will need some additional hardware to make it work with ESPEasy. (If the filter is full it will generate 24v... so you'll have to bring that down to 3,3v as an input for the ESP to read it as a digital 1).

ESPHA
Normal user
Posts: 2
Joined: 13 Jan 2021, 12:20

Re: ESP Conrol Brinks WTW

#2 Post by ESPHA » 13 Jan 2021, 13:52

Thank you for the inspiration sincze! I have made my own iteration based on yours for a Brink renovent 300/400 excellent, ESP8266 and home assistant integration. I will post some snippets, mainly because the color coding was somewhat confusing as many wires have different colors than yours.

I used an RJ12 cable and splitter so that my Brink RF transmitter can stay in place and also copied your idea for the filter indicator.
RJ12.JPG
RJ12.JPG (9.98 KiB) Viewed 160 times
The RJ12 pinout is as follows (see p. 28 in the installation guide https://www.brinkclimatesystems.nl/docu ... 054-en.pdf)
Pin 1: 24V (not connected but could theoretically be used as a power supply)
Pin 2: GND
Pin 3: Position 0/sleep mode (not connected in my case
Pin 4: position 2, to enable connect to ground with relay (~13 V to ground)
Pin 5: position 3, to enable connect to ground with relay (~13V to ground)
Pin 6: Filter indicator (gives off 24V to GND when filter needs cleaning/replacement).

Note that:
- the Brink defaults to position 1 and that it is capable of handling two inputs simultaneously as it is made to handle multiple switches (e.g. 2 RF modules). Nevertheless I 'interlocked' both relays in ESPhome.
- I'm not yet sure what's current is drawn if the filter indicator is on. Might need a heat sink for the voltage regulator.
- I connected a 5V microUSB power supply to my ESP8266 in order to supply the necessary 5V to the relays.

My wiring:
Wiring.JPG
Wiring.JPG (76.34 KiB) Viewed 137 times
In ESPhome I configured it as follows:

Code: Select all

switch:
  - platform: gpio
    name: "position 3"
    id: relay1
    pin: D7
    interlock: [relay2]
  - platform: gpio
    name: "position 2"
    id: relay2
    pin: D8
    interlock: [relay1]
  - platform: template
    name: "position1"
    id: "position1"
    turn_on_action: 
     - switch.turn_off: relay1
     - switch.turn_off: relay2
     - switch.turn_off: position1
     
binary_sensor:
  - platform: gpio
    device_class: problem
    pin: D6
    name: "Brink renovent filter indicator"
In home assistant I used this blueprint (https://community.home-assistant.io/t/t ... ine/255999) to automatically switch the fan to position3 based on the bathroom humidity.

Some (messy) pictures are included of the device and HA lovelace view.
20210113_120930.jpg
20210113_120930.jpg (3.34 MiB) Viewed 160 times
20210113_121046.jpg
20210113_121046.jpg (3.34 MiB) Viewed 159 times
HAbrink.JPG
HAbrink.JPG (19.96 KiB) Viewed 155 times

_Cyber_
Normal user
Posts: 31
Joined: 20 Oct 2019, 09:46

Re: ESP Conrol Brinks WTW

#3 Post by _Cyber_ » 14 Jan 2021, 22:17

here is another solution for brink units:

I have a wemos d1 with a dht22 in bathroom. it measures on 5 minutes basis the humidity and does a GET request to a raspberry.

this raspberry has a ebus connection to the brink unit and sets via ebusd the fan speed of stand 1 dynamically between 50m³/h and the configured maximum os stand 1 on basis of the measured humidity between 50% and 100%.

if someone is interested I can post php code of the relevant parts. :-)

ESPHA
Normal user
Posts: 2
Joined: 13 Jan 2021, 12:20

Re: ESP Conrol Brinks WTW

#4 Post by ESPHA » 15 Jan 2021, 15:37

_Cyber_ wrote: 14 Jan 2021, 22:17 here is another solution for brink units:

I have a wemos d1 with a dht22 in bathroom. it measures on 5 minutes basis the humidity and does a GET request to a raspberry.

this raspberry has a ebus connection to the brink unit and sets via ebusd the fan speed of stand 1 dynamically between 50m³/h and the configured maximum os stand 1 on basis of the measured humidity between 50% and 100%.

if someone is interested I can post php code of the relevant parts. :-)
Very interested yes. Also how did you make the ebusd connection? And how have you integrated the system? What were the costs? The RJ12 solution benefits from low cost (~15 eu including ESP module) and easy to connect.

_Cyber_
Normal user
Posts: 31
Joined: 20 Oct 2019, 09:46

Re: ESP Conrol Brinks WTW

#5 Post by _Cyber_ » 20 Jan 2021, 12:05

the ebus connection is done in my case with an ebus-usb-adapter. I soldered the one from here: https://www.mikrocontroller.net/topic/3 ... age=single
there are also other projects around how to make your own ebusd adapter, cheaper and direct with wifi, with a wemos D1. e.g. https://ebus.github.io/adapter/index.en.html

on the RPI I have configured ebusd and connected it with the USB adapter. for ebus-configuration, have a look at https://github.com/dstrigl/ebusd-config ... ellent-300

with this you can completely control the brink unit. You can read how long the filter will last, how much m³ Air is flowing, the different temperatures, etc. I wrote a munin plugin to graph this, it looks like this:
munin.png
munin.png (75.3 KiB) Viewed 58 times
the munin script is here:

Code: Select all

#!/usr/bin/php
<?php

if ($argc == 2) {
	if ($argv[1] == "config") {
		echo("graph_title Brink Renovent Excellent 300".PHP_EOL);
		echo("graph_vlabel Brink Parameter".PHP_EOL);
		echo("graph_category House".PHP_EOL);
		echo("Ventilatorstufe.label Ventilatorstufe".PHP_EOL);
		echo("Ablufttemperatur.label Ablufttemperatur".PHP_EOL);
		echo("Frischlufttemperatur.label Frischlufttemperatur".PHP_EOL);
		echo("Aussenlufttemperatur.label Aussenlufttemperatur".PHP_EOL);
		echo("TatsaechlicheZuluftmenge.label TatsaechlicheZuluftmenge".PHP_EOL);
		echo("TatsaechlicheAbluftmenge.label TatsaechlicheAbluftmenge".PHP_EOL);
		echo("IstwertZuluftdruck.label IstwertZuluftdruck".PHP_EOL);
		echo("IstwertAbluftdruck.label IstwertAbluftdruck".PHP_EOL);
		echo("FilterStatus.label FilterStatus".PHP_EOL);
		echo("TageMitFilter.label TageMitFilter".PHP_EOL);
		echo("TageMitFilter.draw LINE1".PHP_EOL);
		echo("StatusBypass.label StatusBypass".PHP_EOL);
		echo("StatusVorheizregister.label StatusVorheizregister".PHP_EOL);
		echo("LeistungVorheizregister.label LeistungVorheizregister".PHP_EOL);
		echo("EWTStatus.label EWTStatus".PHP_EOL);
		echo("EWTStatus.cdef EWTStatus,1,+,2,%".PHP_EOL);
		echo("BypassTemperatur.label BypassTemperatur".PHP_EOL);
		echo("BypassHysterese.label BypassHysterese".PHP_EOL);
		echo("EWTTug.label EWTTmin".PHP_EOL);
		echo("EWTTog.label EWTTmax".PHP_EOL);
		echo("LuftmengeStufe1.label LuftmengeStufe1".PHP_EOL);
	}
	exit;
}

function fetchjsonfromurl($url) {
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 6);
	curl_setopt($ch, CURLOPT_TIMEOUT, 9);
	$output = curl_exec($ch);
	curl_close($ch);
	return json_decode($output, true);
}

$fieldzero = array( "Ventilatorstufe", "Ablufttemperatur", "Frischlufttemperatur", "Aussenlufttemperatur", "TatsaechlicheZuluftmenge", "TatsaechlicheAbluftmenge", "IstwertZuluftdruck", "IstwertAbluftdruck", "FilterStatus", "TageMitFilter", "StatusBypass", "StatusVorheizregister", "LeistungVorheizregister", "EWTStatus" );
$fieldaktuell = array( "BypassTemperatur", "BypassHysterese", "EWTTug", "EWTTog", "LuftmengeStufe1" );

$fieldaktuellelements = array( "aktuell", "minimum", "maximum", "Schrittgroesse", "Werkseinstellung");

$kwlvalues = fetchjsonfromurl("http://localhost:8880/data?numeric&required");
foreach ($fieldzero as $key => $value) echo $fieldzero[$key].'.value '.$kwlvalues["kwl"]["messages"][$value]["fields"]["0"]["value"].PHP_EOL;
foreach ($fieldaktuell as $key => $value) echo $fieldaktuell[$key].'.value '.$kwlvalues["kwl"]["messages"][$value]["fields"]["aktuell"]["value"].PHP_EOL;

?>
changing the air volume is then only a matter of sending the desired value by MQTT to the ebus-daemon. it is then setting the m³/h direct on the unit.
this I have simply attached to a php script which is graphing also temperatures and humidity of some rooms with munin:

Code: Select all

function publishvalue($prefix, $param, $message) {
		$topic = $prefix.$param;
		$client = new Mosquitto\Client();
		//$client->setCredentials('S1','123456');
		$client->connect("localhost", 1883, 5);
		$client->publish($topic, $message, 1, 0);
		$client->disconnect();
		unset($client);
}

function evalkwlspeed($humidity) {
	$Ventilatorstufe = 1;
	$humi_max = 90;
	$humi_aim = 50;
	$Aussenlufttemperaturmax = 23;

	$EWTStatus = '';
	$Aussenlufttemperatur = '';
	$Luftmengemin = 50;
	$Luftmengemax = 160;
	$Luftmengestep = 5;
	$Luftmengecurrent = 50;

	$brinkData = fetchjsonfromurl('http://127.0.0.1:8880/data/kwl/EWTStatus?required');
	$EWTStatus = $brinkData['kwl']['messages']['EWTStatus']['fields']['0']['value'];
	$brinkData = fetchjsonfromurl('http://127.0.0.1:8880/data/kwl/data?numeric&required');
	$Aussenlufttemperatur = $brinkData['kwl']['messages']['Aussenlufttemperatur']['fields']['0']['value'];
	$Luftmengemin = explode(';', $brinkData['LuftmengeStufe'.($Ventilatorstufe-1)])[0];
	$Luftmengemax = explode(';', $brinkData['LuftmengeStufe'.($Ventilatorstufe+1)])[0];
	$Luftmengestep = explode(';', $brinkData['LuftmengeStufe'.($Ventilatorstufe)])[3];
	$Luftmengecurrent = explode(';', $brinkData['LuftmengeStufe'.($Ventilatorstufe)])[0];

	date_default_timezone_set("Europe/Vienna");
	$hour = date("H", time());
	if (!($hour > 6 && $hour < 21)) $Luftmengemax = 120;

	if ($humidity > $humi_max) $newval = $Luftmengemax;
	else if ($humidity <= $humi_max && $humidity > $humi_aim) $newval = $Luftmengestep * round(((($humidity - $humi_aim) * (($Luftmengemax - $Luftmengemin)/($humi_max - $humi_aim))) + $humi_aim)/$Luftmengestep);
	else $newval = $Luftmengemin;
	
	if ($EWTStatus == 'Enabled') {
		if ($Aussenlufttemperatur >= $Aussenlufttemperaturmax) {
			if ($hour > 6 && $hour < 21) $newval = $Luftmengemax;
		}
		if ($newval < ($Luftmengemax * 0.6)) $newval = ($Luftmengemax * 0.6);
	}
	publishvalue('brink/kwl/Luftmengestufe1/', 'set', $newval);
	//echo("set fanspeed to ".$newval);
}
With this function:
* I set the air volume to maximum, as soon as I start cooling with the brink unit (there is a heat exchanger in air supply, which switches on as soon as the outside air temperature is over 23°C)
* during day between the (on brink unit) configured maximum air volume of stage 1 (I use stage 1 as "automatic" adjusted) is used
* during night I limit it to 120m³/h (it cannot be heared in house if it is running at 120m³ or below)

the sensor in bathroom is a wemos D1 with a DHT-hat. it reports every 5 minutes temperature and humidity.

costs: I use a RPI1 which is "left over", the ebus USB adapter, some cables, ... I would guess everything in sum is below 30€.

but don't calculate the hours working time on it ... ;)

Have fun!

BR
Alois

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests