I was able to connect and control my viessmann boiler.
This interface gives you complete and full control of every parameter and all data the viessman heater has.
I have the feeling I read and write all parameters and all data.
In this item I want to give some directions on how it can be done.
Note: openhab looks like a good opensource alternative for loxone.
Note: all of this is a mixture of german and english, I did not translate everything (yet)
Why?
I have thermostats/temperature sensors in almost every room mostly via KNX but there are alternatives.
I have ways to detect presence in my house or some rooms.
I have magnetic contacts on most windows, so I know when it is open and the heating should be off.
When we leave home the alarm system is usually armed, so I know if there is nobody at home because the alarm system is on, ...
If the target temperature is reached in every room the heater is switched to "OFF" or"Warm Water only", if heating is required i switch to the operating mode "Heating + Warm Water". This is a way of controlling the circulator pump of the heating or the heater, viessmann does not allow direct control of this circulator pump.
If i am on holliday and forgot to switch the heater off I can switch the viessman off.
If i am on holliday and switched the heater completely off, I can switch it back on for the housekeeper/cleaning if they come during my holidays. (you can put your viessman in holiday mode, but not all days except tuesday)
It must be possible to make some economies by controlling the heater better, without losing any comfort.
There are plenty of ideas, I don't think there are limitations to this interface.
Hardware required:
- Raspberry pi 2 with an SD card with some space (16gb in my case, take a good one as they tend to fail over time just like with loxone). One can install this on a windows computer too I think.
- Optolink USB cable can be the original from Viessman but I used this one see http://openv.wikispaces.com/Bauanleitung+USB (there is an email adress there from someone who can make this for you, it costed me 43.99 including transport costs)
The total cost of this is at about100 euros
The communication is done using :
- vcontrold daemon, this program does the communication with the viessman heater, see http://openv.wikispaces.com/vcontrold
- vclient executable which is part of or comes with vcontrold daemon
- a bash shell script to upload the status to loxone (it is an modified version of a script written for openhab: see http://www.intranet-of-things.com/software/downloads). This script is in the crontab and runs every "5" minutes.
- a cgi script I wrote myself to send commands to the boiler, I could not pass commands via telnet, this uses http and works with loxone (theoretically telnet should work, but I could not make it work.
Installation vcontrold:
- install linux on the raspberry pi, I used Raspbian Jessie.
- install the vcontrold daemon: see http://openv.wikispaces.com/vcontrold+mit+Raspberry+Pi.
- you need to adapt the vcontrold.xml and the vito.xml. I could not make any version of them work completely for me. Details follow, my version of these files is attached.
There are some commands in the vcontrold.xml (setaddrTo0/1/2/3/4/5)
There are some extra commands in the vito.xml (setBetriebArtM1, ...)
- make sure the vcontrold daemon is running
Test it using "telnet raspberrypi 3002", or using "/usr/local/bin/vclient -h 127.0.0.1:3002 -c getBetriebArtM1"
(Note that you can change it using "/usr/local/bin/vclient -h 127.0.0.1:3002 -c 'setBetriebArtM1 WW'")
Installation script to update status in loxone:
-decide which statusses you need in loxone, put the corresponding commands in heating.getcommands (this is a list of vcontrold commands) and heating.tpl (this is the list of virtual inputs you will have in loxone).
test using this command: /usr/local/bin/vclient -h 127.0.0.1:3002 -f heating.getcommands -t heating.tpl
You should see the output of each comand.
- create a virtual input in loxone for each status they are named like this one "VIHeating_Temperature_Outdoor"
- run heating.bash to spot errors
- schedule it in chrontab (note the locking mechanism using flock to avoid starting it twice)
*/5 * * * * /usr/bin/flock -w 0 /home/pi/openvloxone/cronheating.lock /home/pi/openvloxone/heating.bash
Now you can see the status of your boiler in Loxone.
Installation cgi script to send commands to the viessman:
- add the cgi script to send commands from loxone to the viessman heater
- add any required commands to loxone as virtual output
you can test in a brower using "http://192.168.x.x/cgi-bin/cgi-vclient.sh?setBetriebsArtM1To5"
If you put these commands in a virtual output loxone can control your heater.
Issues:
strangely the getBetriebsArt and setBetriebsart do not use the same values
1-> '00' ='WW'
3 -> '01' ='RED'
4 -> '02' ='NORM'
2 -> '03' ='H+WW'
5 -> '03' ='H+WW'
0-> '05' ='ABSCHALT'
I have the feeling that the "RED" corresponds somehow to "ww only" and "norm" to "H+ww", but i did not find documentation on this yet.
Kommentar