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:

Zehnder/Stork WHR Ventilation Unit

Postby Sappien » Sunday 27 December 2015 19:05

I've hooked up my Zehnder WTW unit to Domoticz. (RJ45 -> RS232). This way it's possible to control the unit and to read all the temperatures

Image

Let me know if your interested, then I make a setup guide for it.
Attachments
Protocol.pdf
Zehnder Protocol
(172.69 KiB) Downloaded 372 times
Last edited by Sappien on Tuesday 29 December 2015 16:30, edited 1 time in total.

User avatar
ThinkPad
Posts: 1754
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Zehnder WHR Ventilation Unit

Postby ThinkPad » Sunday 27 December 2015 19:30

Always interesting to see how it works, so please explain :D (also as a backup for yourself, for later).
ThinkTheme - theme for Domoticz
My (Dutch) blog: http://thinkpad.tweakblogs.net - My Domoticz scripts: Bitbucket
I'm not (very) active anymore on this forum as i don't use Domoticz anymore.

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

Re: Zehnder WHR Ventilation Unit

Postby bizziebis » Sunday 27 December 2015 19:57

Does it work for a basic WHR 930?
I don't have anything fancy like ComfoSense..

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

Re: Zehnder WHR Ventilation Unit

Postby Sappien » Sunday 27 December 2015 23:58

Yes, comfosense is not requierd. I will post a manual tomorrow

Verstuurd vanaf mijn LG-D855 met Tapatalk

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

Re: Zehnder WHR Ventilation Unit

Postby Sappien » Tuesday 29 December 2015 11:34

Zehnder/Stork WHR status&control scripts version 0.01

(ventserver.sh is made by Shapeshifter @ tweakers.net)

1) Download the zip file and extract it on your linux server ( /var/bin/whr ? )

2) Add 4 dummy temperature sensors (Domoticz > Hardware > Create Virtual sensors)

3) Add 4 dummy Push On Buttons (speed 0 / speed 1 / speed 2 /speed 3)

4) Edit the 4 Push On buttons, and add the corresponding speed script

Image

5) Edit the ventserver.py and change the the serial port (line 13 port = '/dev/YPort')

6) Edit the status.sh and change the Domoticz idx id's and folder path.

7) Run the status.sh and check if your dummy device's are updated

8) Add a cronjob so the status.sh is executed every minute
Attachments
whr-status-control.zip
(3.09 KiB) Downloaded 203 times
Last edited by Sappien on Tuesday 29 December 2015 12:31, edited 1 time in total.

User avatar
ThinkPad
Posts: 1754
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Zehnder WHR Ventilation Unit

Postby ThinkPad » Tuesday 29 December 2015 12:01

Nice, thanks for sharing!

Instead of pasting in the 'On Action' 4 times, you could also create a Lua script that triggers when one of the 4 switches is being used.
Something like this:

Code: Select all

if devicechanged['Ventilation Speed 0'] or devicechanged['Ventilation Speed 1'] or devicechanged['Ventilation Speed 2'] or devicechanged['Ventilation Speed 3'] then
  if devicechanged['Ventilation Speed 0'] == 'On' then
  os.execute('speed0.py')
  end

  if devicechanged['Ventilation Speed 1'] == 'On' then
  os.execute('speed1.py')
  end
end

That will make it a bit more easier to backup (when backupping Domoticz, the On Action is easy to forget).
Instead of executing the speedX.py with os.execute maybe you can also directly execute the command that is in those Python scripts.
ThinkTheme - theme for Domoticz
My (Dutch) blog: http://thinkpad.tweakblogs.net - My Domoticz scripts: Bitbucket
I'm not (very) active anymore on this forum as i don't use Domoticz anymore.

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

Re: Zehnder WHR Ventilation Unit

Postby Sappien » Tuesday 29 December 2015 12:23

@Thinkpad,

It's a little bit dirty scripting at this moment ;) It needs some code cleaning and optimalization.

I'm gonna try your lua suggestion.

The required cable is a rj45 -> rs232

rj45 pin 2 -> rs232 pin 2
rj45 pin 3 -> rs232 pin 3
rj45 pin 8 -> rs232 pin 5

Image

Image

User avatar
ThinkPad
Posts: 1754
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Zehnder WHR Ventilation Unit

Postby ThinkPad » Tuesday 29 December 2015 13:45

With viewtopic.php?f=30&t=8505 you could hook it up to your network if you want. Makes you a bit more flexible in the placing of the Raspberry.
Communicating with the device is quite easy then, i think you can use something like 'nc' (netcat) to send the hex-commands to the unit.
ThinkTheme - theme for Domoticz
My (Dutch) blog: http://thinkpad.tweakblogs.net - My Domoticz scripts: Bitbucket
I'm not (very) active anymore on this forum as i don't use Domoticz anymore.

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

Re: Zehnder WHR Ventilation Unit

Postby Sappien » Tuesday 29 December 2015 13:55

I'm already using a rs232>network converter with socat ;)

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

Re: Zehnder WHR Ventilation Unit

Postby Sappien » Tuesday 29 December 2015 15:23

Using nc is working to send commands

(set whr to speed 0)

echo -e '\x07\xF0\x00\x99\x01\x01\x48\x07\x0F' | nc ipadres port

Also a idea to retrieve data after sending a command?

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

Re: Zehnder/Stork WHR Ventilation Unit

Postby bizziebis » Tuesday 29 December 2015 19:21

Thanks! I will open up my WTW tomorrow and will try it on my raspberry. I have to clean the unit anyway ;)

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

Re: Zehnder/Stork WHR Ventilation Unit

Postby bizziebis » Sunday 10 January 2016 18:50

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.

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

Re: Zehnder/Stork WHR Ventilation Unit

Postby bizziebis » Wednesday 27 January 2016 10:27

I got it to work after all. Seems like all I did was swap TX and RX, and now it's working :)

parador
Posts: 2
Joined: Wednesday 27 January 2016 22:53
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Postby parador » Wednesday 27 January 2016 22:56

Dear bizziebis,

do you couple the RS232 cable directly to the PI pins? Or do you use an interface in between?

Thanks for your answer!

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

Re: Zehnder/Stork WHR Ventilation Unit

Postby bizziebis » Thursday 28 January 2016 7:06

I used a RS232 to USB convertor. If you wire them directly you can destroy your PI if the power levels are not exactly right.

Marbaf
Posts: 16
Joined: Saturday 22 February 2014 17:15
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Postby Marbaf » Monday 07 March 2016 12:41

Hi all,
Happy to find this topic on domoticz, thanks for that!
As far as I can see, Sappien and ThinkPad, you are running domoticz on a Linux PC equipped with a RS232 plug and the connection to the ventilation unit is done thanks to a RJ45 to RS232 cable, am I right?

I'd like to plug my ComfoAir to a raspberry. I found a GPIO connection solution (raspiVMC) but I would be more confident in your solution bizziebis which is, please correct if I am wrong: RJ45 plug of ventilation unit -> RJ45-RS232 cable -> RS232-USB adapter -> one of USB plug of raspberry.

Did someone try this: http://www.fhemwiki.de/wiki/ComfoAir ?

Best Regards

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

Re: Zehnder/Stork WHR Ventilation Unit

Postby Sappien » Monday 07 March 2016 20:14

Hi Marbaf,

The wiring setup is right.

There's also a newer version of the server script, but I didn't had time to update the script.. maybe soon

Marbaf
Posts: 16
Joined: Saturday 22 February 2014 17:15
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Postby Marbaf » Tuesday 08 March 2016 14:00

Hello Sappien,

Do you mean ventserver.py by server script?
Are the author or where do you get it?
Is there any change in the protocol or is it a better interfacing?

Thanks.

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

Re: Zehnder/Stork WHR Ventilation Unit

Postby domoticzcom1234 » Saturday 25 June 2016 21:23

All,

Today I tried to connect my WHR 930 with a serial printboard using a serial to USB converter I bought at ebay. (Search on ebay for "USB 2.0 to RS232 Serial DB9 9 PIN Cable Adapter GPS PDA Converter", very cheap but should work)

I followed the instructions but running the status.sh only returned ONCE (out of many) a result in Domoticz but only with incorrect values (54 degrees outside temp. and more invalid information. The rest of the times it fails with the error message "integer expression expected". A reboot, disconnect cables, poweroff the WTW did not helped.

Update:
By running the following script I can change the speed:
-------------------------
#!/bin/sh
/bin/echo -e '\x07\xF0\x00\x99\x01\x01\x48\x07\x0F' > /dev/ttyUSB0
---------------------------

The script as posted gives a lot "integer expression expected" errors:
What could be the issue with the script? Please help.

Thanks in advance.

-----------------
ERROR CODES AFTER RUNNING STATUS.SH
-----------------
Ventserver not running..
./status.sh: line 50: [: : integer expression expected
Status WHR
{
"status" : "OK",
"title" : "Update Device"
}
{
"status" : "OK",
"title" : "Update Device"
}
{
"status" : "OK",
"title" : "Update Device"
}
{
"status" : "OK",
"title" : "Update Device"
}
./status.sh: line 70: [: : integer expression expected
./status.sh: line 78: [: : integer expression expected
./status.sh: line 86: [: : integer expression expected
./status.sh: line 94: [: : integer expression expected
----------------------------------------------------------------------------------------------------------------------------------------------

bejdehanz
Posts: 3
Joined: Monday 11 July 2016 19:04
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Zehnder/Stork WHR Ventilation Unit

Postby bejdehanz » Monday 11 July 2016 19:11

Hello domoticzcom1234,

I had the same issue, the problem is that the wiring instruction for the RJ45 to rs232 cable is wrong, it should be:

rj45 pin 2 -> rs232 pin 3
rj45 pin 3 -> rs232 pin 2
rj45 pin 8 -> rs232 pin 5


Return to “Show your projects”

Who is online

Users browsing this forum: No registered users and 2 guests