Zehnder/Stork WHR Ventilation Unit
Moderator: leecollings
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
I'm working on a new script, hope to finish it next week
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
The new version is working much better (also checking on faulty values etc)
This weekend some last testing..
This weekend some last testing..
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
version 0.3 is ready for testing!
Check/install if you have the python-requests module (apt-get install python-requests)
You need the following dummy devices in Domoticz
outsideairtemp
supplyairtemp
returnairtemp
exhaustairtemp
returnairlevel (dummy type text)
supplyairlevel (dummy type text)
fanlevel (dummy type text)
also add 5 On Push buttons (for controlling the fan level)
Level 0 = Auto --> (On Action) script:///var/bin/vent/ventlevel.sh 0
Level 1 = Away --> (On Action) script:///var/bin/vent/ventlevel.sh 1
Level 2 = Low --> (On Action) script:///var/bin/vent/ventlevel.sh 2
Level 3 = Middle --> (On Action) script:///var/bin/vent/ventlevel.sh 3
Level 4 = High --> (On Action) script:///var/bin/vent/ventlevel.sh 4
Put the files on your server and change the settings as listed below:
##### ventserver.sh
change the serialport (line 124)
##### ventclient.sh
enter Domoticz ip/port (line 11/12)
change the idx of the dummy devices (line 16-22)
when ventserver is running on different server you must change ip/port (line 44)
##### ventlevel.sh
when ventserver is running on different server you must change ip/port (line 11)
Add a cronjob for the ventserver and ventclient
@reboot /var/bin/vent/ventserver.sh
* * * * * /var/bin/vent/ventclient.sh
And the result :
ToDo List
- Check if ventserver is running
- Check if Domoticz is running
- FanLevel status (It's working but only when changed by the script.. Not with a remote)
- Add more data from the unit
Check/install if you have the python-requests module (apt-get install python-requests)
You need the following dummy devices in Domoticz
outsideairtemp
supplyairtemp
returnairtemp
exhaustairtemp
returnairlevel (dummy type text)
supplyairlevel (dummy type text)
fanlevel (dummy type text)
also add 5 On Push buttons (for controlling the fan level)
Level 0 = Auto --> (On Action) script:///var/bin/vent/ventlevel.sh 0
Level 1 = Away --> (On Action) script:///var/bin/vent/ventlevel.sh 1
Level 2 = Low --> (On Action) script:///var/bin/vent/ventlevel.sh 2
Level 3 = Middle --> (On Action) script:///var/bin/vent/ventlevel.sh 3
Level 4 = High --> (On Action) script:///var/bin/vent/ventlevel.sh 4
Put the files on your server and change the settings as listed below:
##### ventserver.sh
change the serialport (line 124)
##### ventclient.sh
enter Domoticz ip/port (line 11/12)
change the idx of the dummy devices (line 16-22)
when ventserver is running on different server you must change ip/port (line 44)
##### ventlevel.sh
when ventserver is running on different server you must change ip/port (line 11)
Add a cronjob for the ventserver and ventclient
@reboot /var/bin/vent/ventserver.sh
* * * * * /var/bin/vent/ventclient.sh
And the result :
ToDo List
- Check if ventserver is running
- Check if Domoticz is running
- FanLevel status (It's working but only when changed by the script.. Not with a remote)
- Add more data from the unit
Last edited by Sappien on Friday 22 July 2016 22:29, edited 2 times in total.
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
I see 5 downloads, but no comments yet... Everything is working fine I hope?
- 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 will check it in a couple of days. The previous version is running fine at the moment with some minor adjustments.
You talk about an On action pointing to "setlevel.sh". Did you mean "ventlevel.sh"? That file is in the zip, the other isn't.
You talk about an On action pointing to "setlevel.sh". Did you mean "ventlevel.sh"? That file is in the zip, the other isn't.
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
You're Right.. wrong filename used with the dummy buttons
-
- Posts: 3
- Joined: Monday 11 July 2016 19:04
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
I installed version 0.3 yesterday with the server and client on different servers.
The only issue I have is that the temperature values are not correct all the time, they fluctuate between -20 and 100.
The only issue I have is that the temperature values are not correct all the time, they fluctuate between -20 and 100.
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
When you run the vent.sh in the console, are the values also incorrect?
Are you able to change the fan speed?
Is the unit directly connected to your server (or with a lan2serial?)
On my own server it's running stable for 3 weeks now..
Are you able to change the fan speed?
Is the unit directly connected to your server (or with a lan2serial?)
On my own server it's running stable for 3 weeks now..
-
- Posts: 3
- Joined: Monday 11 July 2016 19:04
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
I have domoticz and the ventclient running on my synology NAS. The ventserver is running on a RPI connected to the WHR with an USB to serial converter.
When run in the console I only got values for the Airlevels, the temperatures showed no data. Changing the fanspeed was possible all the time.
After a reboot of the RPI yesterday evening everything worked okay again. This morning it was still okay, hope it stays that way.
When run in the console I only got values for the Airlevels, the temperatures showed no data. Changing the fanspeed was possible all the time.
After a reboot of the RPI yesterday evening everything worked okay again. This morning it was still okay, hope it stays that way.
-
- Posts: 19
- Joined: Saturday 25 June 2016 17:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
Hi bejdehanz. In return to your message of » Monday 11 July 2016 19:11 i would like to mention that my setup uses a rs323 to USB converter. So not a RJ45 connector. The WHR930 Luxe only offers a rs232 connection in my case.
-
- Posts: 19
- Joined: Saturday 25 June 2016 17:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
Sappien: I have installed your script and followed your instructions. Somehow It keeps failing on my RPI.
By running my own (simple script) I can change the speed of the WHR930 in domoticz:
----simple script-------
#!/bin/sh
/bin/echo -e '\x07\xF0\x00\x99\x01\x01\x48\x07\x0F' > /dev/ttyUSB0
---------------------------
The push as described in your instruction button on the other hand does not respond. Also sending the command using the commandline does somehow fails. Very frustrating. When running /scripts/wtwunitwhr930/ventlevel.sh 2 for example I do not get a response.
When running /home/domoticz/domoticz/scripts/wtwunitwhr930/ventclient.sh I once received the following response:
No outsideAirTemp Data
No supplyAirTemp Data
No returnAir Data
No exhaustAir Data
No returnAirlevel Data
No supplyAirlevel Data
FanLevel = Unknown
I simpy cant get it working. Could this be caused by the Comfocontrol Ease controler? If yes this would be strange as the unit, as mentioned, is able to receive instructions from the script. Anyone an idea?
By running my own (simple script) I can change the speed of the WHR930 in domoticz:
----simple script-------
#!/bin/sh
/bin/echo -e '\x07\xF0\x00\x99\x01\x01\x48\x07\x0F' > /dev/ttyUSB0
---------------------------
The push as described in your instruction button on the other hand does not respond. Also sending the command using the commandline does somehow fails. Very frustrating. When running /scripts/wtwunitwhr930/ventlevel.sh 2 for example I do not get a response.
When running /home/domoticz/domoticz/scripts/wtwunitwhr930/ventclient.sh I once received the following response:
No outsideAirTemp Data
No supplyAirTemp Data
No returnAir Data
No exhaustAir Data
No returnAirlevel Data
No supplyAirlevel Data
FanLevel = Unknown
I simpy cant get it working. Could this be caused by the Comfocontrol Ease controler? If yes this would be strange as the unit, as mentioned, is able to receive instructions from the script. Anyone an idea?
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
Could you start the vent server&client in separate console's and check if they give any (error) message?
Otherwise edit the ventserver.sh and remove # on line 49
print self.outsideAirTemp
Then start the ventserver (not the client) and after max 60 seconds the outside air temp should be displayed.
Otherwise edit the ventserver.sh and remove # on line 49
print self.outsideAirTemp
Then start the ventserver (not the client) and after max 60 seconds the outside air temp should be displayed.
-
- Posts: 19
- Joined: Saturday 25 June 2016 17:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
Thanks for your reply. Much appreciated. I followed your instructions and added some extra information.
root@domo:/dev# lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 005: ID 0658:0200 Sigma Designs, Inc.
------------------------
So again FYI the WTW unit changes the speed with below script.
----simple script-------
#!/bin/sh
/bin/echo -e '\x07\xF0\x00\x99\x01\x01\x48\x07\x0F' > /dev/ttyUSB0
--------
However I'm (almost) sure I already added the root user to the dialout group to get the appropriate rights using the /dev/ttyUSB0 device I executed the following command:
sudo usermod -a -G dialout root
I get some the results, see below:
---------------------------
root@domo:/home/domoticz/domoticz/scripts/wtwunitwhr930# ./ventserver.sh
Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "./ventserver.sh", line 82, in GetVentilationData
self.supplyAirLevel = int(raw[14], 16)
IndexError: list index out of range
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "./ventserver.sh", line 96, in GetVentilationData
self.highTime = int(''.join(raw[24:27]), 16)
ValueError: invalid literal for int() with base 16: ''
-------------------------------
root@domo:/home/domoticz/domoticz/scripts/wtwunitwhr930# ./ventclient.sh
outsideyAirTemp = 22.5
Traceback (most recent call last):
File "./ventclient.sh", line 128, in <module>
r.json()
TypeError: 'dict' object is not callable
root@domo:/home/domoticz/domoticz/scripts/wtwunitwhr930# ./ventclient.sh
outsideyAirTemp = -20.0
Traceback (most recent call last):
File "./ventclient.sh", line 128, in <module>
r.json()
TypeError: 'dict' object is not callable
-----------------
Now I edit the ventserver.sh and remove # on line 49 print self.outsideAirTemp
The string is found on line 60 and not line 49.
----------------
When executing ./ventserver.sh I receive the following:
----------------
root@domo:/home/domoticz/domoticz/scripts/wtwunitwhr930# ./ventserver.sh
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "./ventserver.sh", line 67, in GetVentilationData
raw = self.SendSerialCommand('\x07\xF0\x00\x0F\x00\xBC\x07\x0F', ['07', '0f'])
File "./ventserver.sh", line 50, in SendSerialCommand
serialConnection = serial.Serial(port = self.port, baudrate = 9600, bytesize = serial.EIGHTBITS, parity = serial.PARITY_NONE, stopbits = serial.STOPBITS_ONE, timeout = self.timeout)
File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 260, in __init__
self.open()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 276, in open
raise SerialException("could not open port %s: %s" % (self._port, msg))
SerialException: could not open port /dev/ttyUSB0: [Errno 5] Input/output error: '/dev/ttyUSB0'
------------------
This keeps me busy..... many errors. What could be wrong?
root@domo:/dev# lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 005: ID 0658:0200 Sigma Designs, Inc.
------------------------
So again FYI the WTW unit changes the speed with below script.
----simple script-------
#!/bin/sh
/bin/echo -e '\x07\xF0\x00\x99\x01\x01\x48\x07\x0F' > /dev/ttyUSB0
--------
However I'm (almost) sure I already added the root user to the dialout group to get the appropriate rights using the /dev/ttyUSB0 device I executed the following command:
sudo usermod -a -G dialout root
I get some the results, see below:
---------------------------
root@domo:/home/domoticz/domoticz/scripts/wtwunitwhr930# ./ventserver.sh
Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "./ventserver.sh", line 82, in GetVentilationData
self.supplyAirLevel = int(raw[14], 16)
IndexError: list index out of range
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "./ventserver.sh", line 96, in GetVentilationData
self.highTime = int(''.join(raw[24:27]), 16)
ValueError: invalid literal for int() with base 16: ''
-------------------------------
root@domo:/home/domoticz/domoticz/scripts/wtwunitwhr930# ./ventclient.sh
outsideyAirTemp = 22.5
Traceback (most recent call last):
File "./ventclient.sh", line 128, in <module>
r.json()
TypeError: 'dict' object is not callable
root@domo:/home/domoticz/domoticz/scripts/wtwunitwhr930# ./ventclient.sh
outsideyAirTemp = -20.0
Traceback (most recent call last):
File "./ventclient.sh", line 128, in <module>
r.json()
TypeError: 'dict' object is not callable
-----------------
Now I edit the ventserver.sh and remove # on line 49 print self.outsideAirTemp
The string is found on line 60 and not line 49.
----------------
When executing ./ventserver.sh I receive the following:
----------------
root@domo:/home/domoticz/domoticz/scripts/wtwunitwhr930# ./ventserver.sh
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "./ventserver.sh", line 67, in GetVentilationData
raw = self.SendSerialCommand('\x07\xF0\x00\x0F\x00\xBC\x07\x0F', ['07', '0f'])
File "./ventserver.sh", line 50, in SendSerialCommand
serialConnection = serial.Serial(port = self.port, baudrate = 9600, bytesize = serial.EIGHTBITS, parity = serial.PARITY_NONE, stopbits = serial.STOPBITS_ONE, timeout = self.timeout)
File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 260, in __init__
self.open()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 276, in open
raise SerialException("could not open port %s: %s" % (self._port, msg))
SerialException: could not open port /dev/ttyUSB0: [Errno 5] Input/output error: '/dev/ttyUSB0'
------------------
This keeps me busy..... many errors. What could be wrong?
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
Maybe you're Missing some Python modules.. I'll Make a list which modules I have installed
-
- Posts: 19
- Joined: Saturday 25 June 2016 17:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
That would be great.... waiting for it. tnx
-
- Posts: 19
- Joined: Saturday 25 June 2016 17:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
Searched on the internet but it seems to be an unsolved raspberry debian python issue. Issue is listed on any sites but there is no solution for now. On a default debian distribution the scripts should work. Agree?
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
I've got a pi somewhere.. Let me try it out..
-
- Posts: 19
- Joined: Saturday 25 June 2016 17:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
Can't wait to get the test results....
-
- Posts: 114
- Joined: Saturday 24 August 2013 9:59
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
On my Pi no issue....
I'm running with Python 2.7.3 / 4.4.16-v7+ / Raspian Wheezy
Do you've got a spare SD card? Try a fresh installation
I'm running with Python 2.7.3 / 4.4.16-v7+ / Raspian Wheezy
Do you've got a spare SD card? Try a fresh installation
-
- Posts: 19
- Joined: Saturday 25 June 2016 17:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Contact:
Re: Zehnder/Stork WHR Ventilation Unit
Complete new install unfortunately with the following (different) response:
root@raspberrypi:/home/pi/wtwunitwhr930# ./ventserver.sh
Exception in thread Thread-3:
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
root@raspberrypi:/home/pi/wtwunitwhr930# ./ventclient.sh
No outsideAirTemp Data
No supplyAirTemp Data
No returnAir Data
No exhaustAir Data
No returnAirlevel Data
No supplyAirlevel Data
FanLevel = Unknown
What could be wrong? Do you have a confo control installed in your livingroom to control the fan speed? Could this interfere with this serverscript?
I also tried the "simple script" and again I can control the fanspeed. This is only transmitting a command. Receiving/reading the values from the WHR to the Raspberry seems to be an issue.
In my current setup I have my serial rs232 to USB directly connected to the rs232 connector on the WHR930 board and my RPI.
setup: WHR rs232 connector <--> rs232 to USB cable <--> RPI
So not with a RJ45 connector from the WHR to a rs232 connector.
Tomorrow I will try this setup again using the cable I created using the instructions of user : bjdehanz
( rj45 pin 2 -> rs232 pin 3 , rj45 pin 3 -> rs232 pin 2 , rj45 pin 8 -> rs232 pin 5 )
WHR RJ45 <--> RJ45 to rs232 <--> rs232 to USB cable <--> RPI
The problem is that when I connect to the RJ45<->rs323 and this to the rs323<-->USB cable the /dev/ttyUSB0 device on my RPI is no longer available. Looks like there is no power from the WHR RJ45 connector towards the rs232 USB cable? Strange.
Any ideas left?
root@raspberrypi:/home/pi/wtwunitwhr930# ./ventserver.sh
Exception in thread Thread-3:
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
root@raspberrypi:/home/pi/wtwunitwhr930# ./ventclient.sh
No outsideAirTemp Data
No supplyAirTemp Data
No returnAir Data
No exhaustAir Data
No returnAirlevel Data
No supplyAirlevel Data
FanLevel = Unknown
What could be wrong? Do you have a confo control installed in your livingroom to control the fan speed? Could this interfere with this serverscript?
I also tried the "simple script" and again I can control the fanspeed. This is only transmitting a command. Receiving/reading the values from the WHR to the Raspberry seems to be an issue.
In my current setup I have my serial rs232 to USB directly connected to the rs232 connector on the WHR930 board and my RPI.
setup: WHR rs232 connector <--> rs232 to USB cable <--> RPI
So not with a RJ45 connector from the WHR to a rs232 connector.
Tomorrow I will try this setup again using the cable I created using the instructions of user : bjdehanz
( rj45 pin 2 -> rs232 pin 3 , rj45 pin 3 -> rs232 pin 2 , rj45 pin 8 -> rs232 pin 5 )
WHR RJ45 <--> RJ45 to rs232 <--> rs232 to USB cable <--> RPI
The problem is that when I connect to the RJ45<->rs323 and this to the rs323<-->USB cable the /dev/ttyUSB0 device on my RPI is no longer available. Looks like there is no power from the WHR RJ45 connector towards the rs232 USB cable? Strange.
Any ideas left?
Who is online
Users browsing this forum: Google [Bot] and 0 guests