Zehnder/Stork WHR Ventilation Unit
Moderator: leecollings
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Zehnder/Stork WHR Ventilation Unit
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
Let me know if your interested, then I make a setup guide for it.
----- update 14-01-2019
I've made a new script, check
https://github.com/AlbertHakvoort/Stork ... oticz-MQTT
Let me know if your interested, then I make a setup guide for it.
----- update 14-01-2019
I've made a new script, check
https://github.com/AlbertHakvoort/Stork ... oticz-MQTT
- Attachments
-
- Protocol.pdf
- Zehnder Protocol
- (172.69 KiB) Downloaded 1387 times
Last edited by Sappien on Monday 14 January 2019 10:03, edited 2 times in total.
-
- Posts: 890
- Joined: Tuesday 30 September 2014 8:49
- Target OS: Linux
- Domoticz version: beta
- Location: The Netherlands
- Contact:
Re: Zehnder WHR Ventilation Unit
Always interesting to see how it works, so please explain (also as a backup for yourself, for later).
I am not active on this forum anymore.
- bizziebis
- Posts: 182
- Joined: Saturday 19 October 2013 14:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8805
- Location: The Netherlands
- Contact:
Re: Zehnder WHR Ventilation Unit
Does it work for a basic WHR 930?
I don't have anything fancy like ComfoSense..
I don't have anything fancy like ComfoSense..
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder WHR Ventilation Unit
Yes, comfosense is not requierd. I will post a manual tomorrow
Verstuurd vanaf mijn LG-D855 met Tapatalk
Verstuurd vanaf mijn LG-D855 met Tapatalk
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder WHR Ventilation Unit
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
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
(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
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 618 times
Last edited by Sappien on Tuesday 29 December 2015 11:31, edited 1 time in total.
-
- Posts: 890
- Joined: Tuesday 30 September 2014 8:49
- Target OS: Linux
- Domoticz version: beta
- Location: The Netherlands
- Contact:
Re: Zehnder WHR Ventilation Unit
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:
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.
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
Instead of executing the speedX.py with os.execute maybe you can also directly execute the command that is in those Python scripts.
I am not active on this forum anymore.
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder WHR Ventilation Unit
@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
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
-
- Posts: 890
- Joined: Tuesday 30 September 2014 8:49
- Target OS: Linux
- Domoticz version: beta
- Location: The Netherlands
- Contact:
Re: Zehnder WHR Ventilation Unit
With http://domoticz.com/forum/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.
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.
I am not active on this forum anymore.
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder WHR Ventilation Unit
I'm already using a rs232>network converter with socat
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder WHR Ventilation Unit
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?
(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?
- bizziebis
- Posts: 182
- Joined: Saturday 19 October 2013 14:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8805
- Location: The Netherlands
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
Thanks! I will open up my WTW tomorrow and will try it on my raspberry. I have to clean the unit anyway
- bizziebis
- Posts: 182
- Joined: Saturday 19 October 2013 14:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8805
- Location: The Netherlands
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
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.
When I open up a serial connection nothing changes in the levels.
- bizziebis
- Posts: 182
- Joined: Saturday 19 October 2013 14:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8805
- Location: The Netherlands
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
I got it to work after all. Seems like all I did was swap TX and RX, and now it's working
-
- Posts: 2
- Joined: Wednesday 27 January 2016 21:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
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!
do you couple the RS232 cable directly to the PI pins? Or do you use an interface in between?
Thanks for your answer!
- bizziebis
- Posts: 182
- Joined: Saturday 19 October 2013 14:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8805
- Location: The Netherlands
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
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.
-
- Posts: 9
- Joined: Saturday 22 February 2014 16:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
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
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
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
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
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
-
- Posts: 9
- Joined: Saturday 22 February 2014 16:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
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.
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.
-
- Posts: 19
- Joined: Saturday 25 June 2016 17:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
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
----------------------------------------------------------------------------------------------------------------------------------------------
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
----------------------------------------------------------------------------------------------------------------------------------------------
-
- Posts: 3
- Joined: Monday 11 July 2016 19:04
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
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
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
Who is online
Users browsing this forum: No registered users and 1 guest