streumix / vcontrold-for-openwrt

Control Viessmann heating systems such as the Vitotronic 200 KW 2 from OpenWrt

Home Page:http://openv.wikispaces.com/vcontrold

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vcontrold-for-openwrt Build Status

Vitotronic 200 KW2 D-Link DIR 505

Control Viessmann heating systems such as the Vitotronic 200 KW2 from OpenWrt. I have successfully tested this on a D-Link DIR 505 running OpenWrt Barrier Breaker 14.07, but other systems with at least 8 MB flash ROM such as the TP-Link TL-WR710N should also be suitable.

See http://openv.wikispaces.com/vcontrold for more information.

deutsch Note for German readers: Anleitung auf Deutsch.

Downloading

Precompiled binaries for common architectures can be found on https://github.com/streumix/vcontrold-for-openwrt/releases - check the .travis.yml file to see how this is compiled on http://travis-ci.org automatically. Please file an issue if you need addional architectures and/or OpenWrt versions.

Building

To build, pull this repository into the package/ subdirectory in the OpenWrt SDK with git clone https://github.com/streumix/vcontrold-for-openwrt.git, then run ./scripts/feeds update ; ./scripts/feeds install -d m libxml2 and finally make V=s.

Using

First, you need to constuct a device that connects your OpenWrt system to your Viessmann heating system called an Optolink adapter. You can build one from very inexpensive parts (under 10 EUR) yourself following the instructions here.

  • 1x SFH487-2 infrared LED
  • 1x SFH309FA infrared phototransistor
  • 1x 100 Ohm or 330 Ohm (for operation at 5V) 1/4 W resistor
  • 3x 10k Ohm (for operation at 3.3V) or 15k Ohm (for operation at 5V) 1/4 W resistors
  • 1x 2N3906 PNP transistor
  • 1x BC547A NPN transistor
  • 4x jumpers (computer)
  • 1x 170 tie-point circuit test breadboard (eBay/China under 2 USD shipped)
  • 1x PL2303HX USB to RS232 TTL converter (most operate at 5V; eBay/China under 2 USD shipped)
  • Wires

opto_usb

Note that I used a 330 Ohm resistor instead of the 100 Ohm resistor in the picture; it is working for me. Also note that if you use 5V instead of 3.3V (some PL2303HX adaptors only have a 5V pin), then you should use three 15k Ohm resistors instead of the three 10k Ohm resistors in the picture (I have not verified this yet).

The whole electronics can be installed inside the original red cover of the Vitotronic 200 KW2, so that it becomes completely invisible:

3

Next, you need to install the USB-to-serial adaptor driver on your OpenWrt system. For Prolific-based adaptors like the PL2303HX used in the instructions, do

opkg update
opkg install kmod-usb-serial-pl2303

Now, edit /etc/vcontrold/vcontrold.xml so that it uses the correct serial port. If you have only one USB-to-serial adaptor connected to your OpenWrt system, this is usually /dev/ttyUSB0:

        <serial>
                <tty>/dev/ttyUSB0</tty>
        </serial>

Next, make sure that the correct device is selected, like <device ID="2098"/> of you have a Vitotronic 200 KW2.

Imporant security note: If you do not want your heating system to be accessible from the entire LAN, make sure that you remove the line <allow ip='192.168.1.0/24'/>.

Now, enable and start vcontrold with

/etc/init.d/vcontrold enable
/etc/init.d/vcontrold start

It will be started automatically on each boot.

Finally, you should be able to issue commands and get back responses from your Viessmann heating system:

root@OpenWrt:~# vclient -h 127.0.0.1:3002 -c getTempA
getTempA:
2.600000 Grad Celsius

GUI

There is a work-in-progress graphical user interface for OpenWrt. You can find it in the OpenWrt administration panel under "Heating".

luci gui

Help

Please file an issue if you would like to see functionality supported or have a question.

About

Control Viessmann heating systems such as the Vitotronic 200 KW 2 from OpenWrt

http://openv.wikispaces.com/vcontrold


Languages

Language:HTML 70.7%Language:Makefile 17.2%Language:Lua 10.6%Language:Shell 1.5%