Zehnder/Stork WHR Ventilation Unit

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.
Sappien
Posts: 200
Joined: Saturday 24 August 2013 9:59
Target OS: Linux
Domoticz version: beta
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by Sappien » Wednesday 10 August 2016 14:33

Which Linux Version and Python are you using?

Sappien
Posts: 200
Joined: Saturday 24 August 2013 9:59
Target OS: Linux
Domoticz version: beta
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by Sappien » Saturday 13 August 2016 20:51

Maybe I found the cause... I will post a adjusted Version soon

User avatar
bizziebis
Posts: 530
Joined: Saturday 19 October 2013 14:00
Target OS: Raspberry Pi
Domoticz version: 3.8337
Location: The Netherlands
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by bizziebis » Sunday 14 August 2016 11:34

Finally got some time to test the new script. For me it works without any problems.

Instead of adding 5 Push On buttons you can also make one selector switch:

Image

(The off button is not used in this case. I think it's a bug in the selector function that you cannot edit the 'off' name. Otherwise I would have called it 'Auto')

Sappien
Posts: 200
Joined: Saturday 24 August 2013 9:59
Target OS: Linux
Domoticz version: beta
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by Sappien » Sunday 14 August 2016 11:53

Good idea, didn't know that was possible ;)

tlpeter
Posts: 399
Joined: Wednesday 26 November 2014 19:43
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by tlpeter » Tuesday 16 August 2016 9:34

I use this switch too. I call a json command per switch which turns a scene on which turns on and off some switches.

maurino
Posts: 2
Joined: Tuesday 23 August 2016 12:04
Target OS: Raspberry Pi
Domoticz version: 3.4834
Location: Italy
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by maurino » Tuesday 23 August 2016 12:29

Great and interesting solution.

Do you know if it can works for a comfoair 160?

Comfoair 160 wiring schema: http://imgur.com/a/xUM61

Sappien
Posts: 200
Joined: Saturday 24 August 2013 9:59
Target OS: Linux
Domoticz version: beta
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by Sappien » Friday 26 August 2016 8:04

Do you have also a ComfoSense? ( I see a rs232 cable from the main board to additional board )

Sappien
Posts: 200
Joined: Saturday 24 August 2013 9:59
Target OS: Linux
Domoticz version: beta
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by Sappien » Friday 26 August 2016 8:23

The fanlevel function is a bit useless (it only displays the fan level when its adjusted by the script, and not when the bathroom button or C02 module been used.

But the supply Air level has different values (100=level3 75 =level2 etc) which can be used to set the selector switch

if Ventilation.supplyAirLevel == 100:
print "Fanlevel 100%"
url = "http://%s:%s/json.htm?type=command&param=udevice&idx=%s&nvalue=1&svalue=40" % (domoticzip, domoticzport, fanselect)
r = requests.get(url)
r.json()

if Ventilation.supplyAirLevel == 75:
print "Fanlevel 75%"
url = "http://%s:%s/json.htm?type=command&param=udevice&idx=%s&nvalue=1&svalue=30" % (domoticzip, domoticzport, fanselect)
r = requests.get(url)
r.json()


So when the bathroom button is pushed, the selector automatically goes to level3

maurino
Posts: 2
Joined: Tuesday 23 August 2016 12:04
Target OS: Raspberry Pi
Domoticz version: 3.4834
Location: Italy
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by maurino » Friday 26 August 2016 8:47

Sappien wrote:Do you have also a ComfoSense? ( I see a rs232 cable from the main board to additional board )
I don't have a comfosense but a CC 3V Control http://www.nestsystems.it/ita/prodotti/ ... ontrol.php

Sappien
Posts: 200
Joined: Saturday 24 August 2013 9:59
Target OS: Linux
Domoticz version: beta
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by Sappien » Friday 26 August 2016 11:45

When the RS232 port is free you can use it with this script.

domoticzcom1234
Posts: 14
Joined: Saturday 25 June 2016 17:21
Target OS: Raspberry Pi
Domoticz version: Stable
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by domoticzcom1234 » Sunday 04 September 2016 15:19

Lisa or Sapien,

Still the script and cable are not working. It must be a wiring issue but I cannot find it.

My questions:
- I now see 3 versions of the wiring. 1) the original post, 2) a post from bejdehanz on Monday 11 July 2016 19:11 and 3) a different one as posted as a photo by Lisa (
https://lh3.googleusercontent.com/EqB25 ... 0-h1080-no
). Which to choose? This has also NEVER be confirmed.
- Do I require the 12 volt on pin 1 or not? Using the wiring scheme as listed below, using the RJ45-to-RS232 cable, and this connected to my RS232-to-USB is not recognized by my PI. No ttyUSB0 device is available. With my RS232-to-USB only this cable is recognized by my PI but in combination the script from Sappien gives issues and also results in a NC error on my Comfosense (control unit in the living room).

I really would like to get this project to work but without any help I will not succeed.
Please respond.

On Thursday 11 August 2016 18:35 lisa wrote:
Cable wired like this:
rj45 pin 2 -> rs232 pin 3
rj45 pin 3 -> rs232 pin 2
rj45 pin 8 -> rs232 pin 5

Cable verified using multimeter, all connection are good.
Neither RS232 (plugged into MB rs232) nor Serial2USB is working.


Can anyone please help?

mauricehouben70
Posts: 5
Joined: Sunday 30 October 2016 16:09
Target OS: Raspberry Pi
Domoticz version: V3
Location: Netherlands
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by mauricehouben70 » Sunday 30 October 2016 16:22

Hi All,

I'm quite new on this forum and with Domoticz.
At this moment i'm running a Raspberry Pi 3b with Domoticz image, in combination with HUE lights and Toon Thermostat, so it's quite plyg and play.
I'm not familiar with programming or scripting...

I have a Zehnder WHR 930 ventilation unit and i would like to add it in Domoticz.
Is there someone Dutch on this topic who could tell me how to add scripts in Domoticz, and how to make the cables (RJ45 i know, RJ232 i dont..).

Thanks in advance,
Greetings Maurice

Jeff
Posts: 36
Joined: Tuesday 16 December 2014 0:39
Target OS: Windows
Domoticz version: 2.3674
Location: Weert, Netherlands
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by Jeff » Wednesday 21 December 2016 0:40

Hi,

Got it partly working for my WHR 930, The only part that doesn't work is the part where the commands in the scripts are being sent to the WHR.
The scripts are successfully executed by domoticz but at some point the whr unit doesn't recognize/understand the commands as it won't change the fan speed or display the temperature values.

When running the ventlevel.sh script in a terminal it returns the following error:

Code: Select all

[email protected]:/var/bin/ventilation# ./ventlevel.sh
Traceback (most recent call last):
  File "./ventlevel.sh", line 13, in <module>
    request = "Ventilation||SetLevel||%s" % (stand[1])
IndexError: list index out of range[
When running ventclient.sh nothing returns, same with ventserver.sh

When testing it with the 'Test script' from somewhere earlier in this post the command gets recognised and the WTW unit displays 'A' which i guess stands for automatic ?

RobD
Posts: 8
Joined: Friday 21 April 2017 15:17
Target OS: Windows
Domoticz version:
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by RobD » Friday 21 April 2017 15:46

Hi,

Maybe I am going to ask some stupid questions/observations so please bear with me.
1) My WHR 930 has a RS232 interface, does that mean that a Domoticz controller has a RS485, otherwise this conversion is obsolete.
or are you running Domoticz on a platform with a RS485 interface?
2) I run a Fibaro HC2 without R232 or 485. the HC2 has 2 USB ports but I doubt that I can access them.
3) I would really like to know the 4 temperatures from the WHR as input to my HC2 to controller to work with
4) and I would like to set the comfort tempearture to indirectly control the bypass.

5) I use a Qubino 0-10V actuator to steer the WHR 930. works like a charm.
6) @Sappien, thank you for sharing the protocol. I've searched everywhere for the WHR930 protocol but could not find it.

has anyone an idea how to connect the whr930 to my HC2?

Jeff
Posts: 36
Joined: Tuesday 16 December 2014 0:39
Target OS: Windows
Domoticz version: 2.3674
Location: Weert, Netherlands
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by Jeff » Saturday 22 April 2017 20:57

RobD wrote:Hi,

Maybe I am going to ask some stupid questions/observations so please bear with me.
1) My WHR 930 has a RS232 interface, does that mean that a Domoticz controller has a RS485, otherwise this conversion is obsolete.
or are you running Domoticz on a platform with a RS485 interface?
2) I run a Fibaro HC2 without R232 or 485. the HC2 has 2 USB ports but I doubt that I can access them.
3) I would really like to know the 4 temperatures from the WHR as input to my HC2 to controller to work with
4) and I would like to set the comfort tempearture to indirectly control the bypass.

5) I use a Qubino 0-10V actuator to steer the WHR 930. works like a charm.
6) @Sappien, thank you for sharing the protocol. I've searched everywhere for the WHR930 protocol but could not find it.

has anyone an idea how to connect the whr 930 to my HC2?
Hi Rob,

The domoticz controller (a raspberry pi, linux, cubietruck, or windows PC/server) does by default not have a R485 conversion.
To get this working you'll need a RS232 to USB converter as by default the WHR930 comes with a RJ45 RS232 connection socket and not the default RS232 socket.

For #2, #3 i dont think the HC2 is able to provide you with that kind of functionality.
#4 Setting the temperature and other functionalities would be more than usefull, as for now the v3 version of the control script doesn't have this included.

Jeff
Posts: 36
Joined: Tuesday 16 December 2014 0:39
Target OS: Windows
Domoticz version: 2.3674
Location: Weert, Netherlands
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by Jeff » Sunday 23 April 2017 20:40

Does anyone else notices strange temperature drops while the ventclient.sh script is running? Temperatures are regularly dropping to as low as -16 or as high as 101 degrees celcius ?!?.
i've noticed that when checking the temps on the whr itself all the value's are normal.
Image
running the script in the terminal gives the same result:

Code: Select all

[email protected]:/home/pi/domoticz/scripts/WHR# ./ventclient.sh
outsideyAirTemp = 15.5
supplyAirTemp = 21.0
returnAirTemp = 20.5
exhaustAirTemp = 99.5
returnAirLevel = 30
SupplyAirlevel = 35
FanLevel = Unknown

RobD
Posts: 8
Joined: Friday 21 April 2017 15:17
Target OS: Windows
Domoticz version:
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by RobD » Thursday 27 April 2017 12:38

Lisa wrote: 5) Only works on a WHR 930/950 Luxe version...
Yep thanks. I have a 930 Luxe, forgot to be explicit in my first mail.

RobD
Posts: 8
Joined: Friday 21 April 2017 15:17
Target OS: Windows
Domoticz version:
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by RobD » Thursday 27 April 2017 12:41

Jeff wrote:
Hi Rob,

The domoticz controller (a raspberry pi, linux, cubietruck, or windows PC/server) does by default not have a R485 conversion.
To get this working you'll need a RS232 to USB converter as by default the WHR930 comes with a RJ45 RS232 connection socket and not the default RS232 socket.

For #2, #3 i dont think the HC2 is able to provide you with that kind of functionality.
#4 Setting the temperature and other functionalities would be more than usefull, as for now the v3 version of the control script doesn't have this included.
Thanks Jeff, that helps a lot.

I think there is only one way to connect WHR930Luxe with a Fibaro HC:
step 1 connect a Pi to the WHR930 and use the script presented here to retrieve the required values
step 2 publish these values somewhere on a webpage. preferrably the Pi runs a webserver and you can publish the results on the PI's webserver
step 3 connect the HC2 with a virtual device to the webpage to import the values.

There is some work to do ...
first actions: order a starterkit for the PI ;) and a dependable RS232 => USB converter

By the way:
On my WHR930 controllerboard I have three RS232 interfaces (just like the connector board drawing in the "protocol beschreibung").
1) a screw terminal marked RS232-KFB (ComfoSense) with +12V, Rx, Tx and GND
2) a RJ45 terminal marked Ext. Comm.
3) a DB9 terminal marked RS232 - PC

I noticed that in the "Protocol bescheibung" the RJ45 is used. is there a difference between the three or are they exactly the same

RobD
Posts: 8
Joined: Friday 21 April 2017 15:17
Target OS: Windows
Domoticz version:
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by RobD » Monday 08 May 2017 21:55

Hi,

thank you for sharing all this information. it looks great.
I downloaded ventv03.zip, that is the latest version i think/

I am running ventserver on a Raspberry PI, connected a RS232 > USB converter and used dmesg to discover the device name (ttyUSB0) and modified ventserver.sh
I have checked the python-requests library and the latest version was installed.
so I give it a try. the result is

Code: Select all

XException in thread Thread-6:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "./ventserver.sh", line 87, in GetVentilationData
    if fanLevel != self.fanLevel and self.fanLevel != False:
UnboundLocalError: local variable 'fanLevel' referenced before assignment
if I check the code for " fanLevel " I find it in line 83 after the IF statement on line 80 and next on line 87.
if the IF (line 80) statement falses (and so skips the line where fanLevel is assigned, the program flow comes to line 87 where fanLevel is referenced in another IF statement.
it helps to define fanLevel at the beginning of the GetVentilationData function

Code: Select all

    def GetVentilationData(self):
        fanLevel                = 0
        # Obtain temperatures
        raw = self.SendSerialCommand('\x07\xF0\x00\x0F\x00\xBC\x07\x0F', ['07', '0f'])

but I'm not sure if that's the correct solution

regards

RobD
Posts: 8
Joined: Friday 21 April 2017 15:17
Target OS: Windows
Domoticz version:
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Post by RobD » Wednesday 10 May 2017 14:59

@ bizziebis
bizziebis wrote:Too bad I can't get it to work. Looks like I have no signal at the RS232 output from my WHR. When I measure, it only shows 0.7 volts on RX, and 0V on TX.
When I open up a serial connection nothing changes in the levels.
including your next post you say that you see
0.7 Volts on TX and 0 Volts on RX.

On my WHR930 Luxe I see
0.07 Volts on Tx and 0 Volts on Rx

but what is more important is the question what is the max level on Rx.
the RS232 specification says that the levels are between -12 and + 12 Volt where the range between -3 and +3 are undefined.
but other equipment uses RS232 over TTL levels

I did not use the RJ45 connector but in stead the terminals for the comfoSense and connected it to a ADAfruit serial to USB converter which uses TTL levels
Zehnder Netherlands told me that the terminal and the RJ45 are just parallel.

when I started ventserver I saw the Rx led on the converter blink once and after that nothing
so I uncommented the printstatement on line 49 to see what's going on.

so I started with a loopback test connecting the Tx to the Rx of my converter. The result is

Code: Select all

-12.5
Exception in thread Thread-265:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "./ventserver.sh", line 73, in GetVentilationData
    self.supplyAirTemp   = int(raw[8], 16) / 2.0 - 20
IndexError: list index out of range
Ok the USB converter works, and I can understand that if I feed the string
\x07\xF0\x00\x0F\x00\xBC\x07\x0F', ['07', '0f']
to the program, I get funny results.

If I leave the Rx line open of I connect the WHR the result is "False"

the only reason I can think of is that the WHR defines the 3.175 V on the Rx line as undefined.

Does anybody know the the WHR930 print uses TTL level or other levels?

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests