I have a Zehnder WHR920 Plus as a ventilation unit and I found this useful thread about a month ago. My primary goal was to control the ventilation unit based on the CO2 level.
My setup:
- Zehnder WHR920 Plus L
- 2 RFZ Sender transmitters
- 1 CC Ease Control Unit
- Domoticz
- 1 Domoticz integratable CO2 meter (AurAir).
- Sapiens script as described in the first message of this thread and found here on Github:
https://github.com/AlbertHakvoort/Stork ... z-MQTT.git
- Raspberry PI Zero W hooked up to the serial port of the WHR920 via a USB to serial cable.
After making some changes to the original setup, my goal has been achieved! As a big thank you to Sapiens and the other folks on this thread, I decided to share my setup, hoping others benefit from this as well:
Problem: The script (whr930.py) effectively read some data, but the readings were odd and after some time the script errored in "division by zero" error. This thread contains some messages from people with similar experiences.
Analysis: The script assumed that it was the only "speaker" on the serial port, which is effectively so for anyone that does not have a CC Ease, but when a CC Ease is part of your setup, there is abundant communication between CC Ease and the WHR. The script that interprets the stream of data coming from the WHR has to make sure it filters out the communication between CC Ease and WHR! Serial communication can be thought of as:
1) script asks a question to WHR
2) WHR hopefully responds to question of step 1 while at the same time chatting constantly with CC Ease
3) script decodes messages and publishes MQTT messages (which are used for Domoticz)
Resolution: I changed the script so that step 3 is handled differently: The script now reads the first message from a queue and checks whether the message is the answer to the question of step 1 (this is a new check). If it is, business is as usual, ie publish MQTT messages, if it isn't, try the next message on the queue. Allow up to 9 consecutive messages to be scrutinized in this way. If after a total of 10 attempts no answer to the question was found, just give up and wait for the next cycle. I changed the default cycle time to 60 seconds (from 10 seconds).
Other changes: Another change is that the script now assumes two selectors to be present. The first selector is the existing one. The second selector is for display only purposes and makes sense in my particular setup where I control the desired fansetting based on the CO2 measured.
- 2020-03-03 13_55_37-Domoticz.png (37.28 KiB) Viewed 4061 times
.
If you don't control the fan in this way you could set the IDX of the sliders to be the same. If you do: I included my lua script (dzventz) as an attachment:
I also removed the part in the script that reported on FanlevelSpeed and RPM, because the readings I received from them where strange and I assessed that I would have to change the program in order for the readings to be logical but since those readings did not interest me in the first place I decided on removing that part.
The default IDX's at the top of the script reflect my own setup, but this is of no consequence because you were going to have to change that anyway.
You can find my modified version of Sapiens' script here:
https://gitlab.com/matthijs_rademakers/ ... z-MQTT.git