Viessmann OpenV vcontrold Client (Optolink)

Great! Is that work in progress something that you could already start sharing on github?
What is the general idea of the integration? Are you building it as custom integration for HA directly or as a standalone service that will communicate via MQTT?
In my opinion the latter will be more flexible as not everyone has the HA server next to the heater. Also integrating with HA is very easy via MQTT and the autodiscovery. In essence there is no need for any configuration on HA side in such case.

I want to have at least a working kind of prototype before publishing to github.
But first I need to get familiar with everything :slight_smile:

I’m currently thinking of an custom integration, which communicates with a vcontrol daemon, which could be a RPi, or even a esp32 next to the heater itself.

1 Like

Cool. In case you would want to go the MQTT route I can try to help as I have an integration in python that communicates via MQTT and benefits from HA autodiscovery. It could be easily deployed on docker (today I just run it on a server as a daemon).

Hello, I also have Vcontrold running on a Raspberry PI. I used to have an ioBroker running, there is a plugin for Vcontrold. Maybe that helps.
Thanks that someone takes care of this topic, I will also gladly donate something to you via Github.
@adorobis : Yes that would be great.

Thanks a lot for your effort.

1 Like

Still tinkering around with the vcontrold part …

It’s all german stuff, thats not the big deal for me, cause I’m Austrian.
Thinking about translating all the commands, which are defined in the xml file to english, but not quite sure if this is just a time waster and hard to maintain in the future :man_shrugging: :thinking:

1 Like

Hello,

possibly this might be a good solution:

There is a python script based on Viessmann Vitosoft configuration files for reading data points via Optolink and publishing them to an MQTT broker.
Unfortunately, I can’t try it out by myself, because my Viessmann Vitodens 222 WS2 communicates using the older GWG protocol, which is not supported by Vitosoft and thus not by Viessmann2MQTT.

Best, Berny

2 Likes

It seems like this script would be the perfect solution.
I could test this, but have no clue about Python.
Except

Viessmann2MQTT.py A script to be run on e.g. a Raspberry Pi with Optolink. It polls a list of events (look at the source code - they need to be adopted to your heating unit!) and sends them via MQTT.

I found no further explanation.
That means I would need a manual first (installation and first steps for home-assistant) .
I already had Vitosoft and Viessdata v2.06 running over Optolink without any problems.
My system is a Vitodens 300-W B3HB-26 and uses the 300 protocol according to Viessdata or voIdent v1.5.

With greetings from Baden (Germany)

Hi all,

having the same issue - migrated from openHAB and currently looking for a Vitodens integration for HA.
The script seems to work - at least when reading sensor values. With a small fix also the error messages are passed as correct JSON: InsideViessmannVitosoft/Viessmann2MQTT.py at e502cae3ed1d50792f6de2378d43c94f9a3cd7f6 · Schm1tz1/InsideViessmannVitosoft · GitHub

Nevertheless if you want to send/write and having making use of existing configurations/developments using vcontrold as a gateway and MQTT would be nice.
Example for reading and publishing measurements:

vclient \
     --host localhost:3002 \
     --command getTempA,getTempWWist,getTempWWsoll,getBrennerStatus,getBrennerStarts,getBrennerStunden1,getTempAbgas,    getTempVListM1,getTempRL17A \
     --json-short \
     | mosquitto_pub -h <HOST> -p <PORT> -u <USER> -P <PW> -t Viessmann -s

The add-on GitHub - Alexandre-io/homeassistant-vcontrol: Vcontrol Home Assistant add-on repository is doing the same using templates. Any experience with this add-on? I will definitely give it a try - looks similar to what I have done in the past with openHAB.

Cheers,
Roman

Hi,

short update form my side - the custom addon works perfectly for getting and setting values in Viessmann devices: GitHub - Alexandre-io/homeassistant-vcontrol: Vcontrold Home Assistant add-on repository
Good this is that it is based on openv/vcontrol so there is still some work/developments going on and you can contribute some settings from your device to that project.

There are some configuration examples for HA in the issues part - works pretty nice out of the box:

@rene-bayer maybe also interesting for you !

1 Like

Hi,

but how can you use it if Home Assistant is running on a server (Proxmox) and vcontrold is installed on a Raspberry, which is connected to the heater in the boiler room and is only accessible via WLAN. I can currently only access it via ssh and then query the values there.

The addon only works if the adapter is connected directly via USB to the computer on which Home Assistant is running. Or am I wrong here?

This will be the case for most USERS.

In HA, a device with sensors and switches can be created directly via MQTT.

How hard is it to create a Python script that runs directly on the Raspberry on which vcontrold is installed and there every few seconds sends all data to the HA MQTT server, and certain values (operating mode, set temperature, etc.) queried and then set again by vcontrold.

Of course, you could also go via NodeRed, but the way listed above would be perfect, but unfortunately my Python knowledge is not sufficient here.

Hi,

good question. That is one thing I had in mind for a PR :wink: As a temporary workaround you could use some socat or ser2net-based approach, but basically you only need to change 2 config settings for vclient and add some config to the container.
Currently the add-on is running vcontrold and vclient in the same container so you need to have the optolink cable connected to the HA instance. It will pass though the ttyUSB and ttyACM devices to the container.
I’d like to add a “connect to remote” flag with a setting for Optolink/vcontrold host/port so you can deactivate the local vcontrold and connect to a remote server. I already created a branch in my form (GitHub - Schm1tz1/homeassistant-vcontrol at remote-vcontrold) and will have a look later tonight.

For the second part: Polling vcontrold can be done with vclient. The add-on does the same internally. You could just take the configs/template and use it for that purpose on your RPi but better to add that feature to the add-on. I did that for the last 5 years using vclient as a cron job but honestly from an operational perspective it’s better to use the add-on. You get alerten on errors and the watchog will restart if it fails. I think this is a feature that can be integrated in a few days.

Hello Roman,

if this would work via host/port, that would be a dream.

As already written, unfortunately I lack the experience with Python for this.

Gaining more experience with Python is on my todo list for this year.

I can only contribute by offering to test it and report back.

Thanks a lot.

Hi Thomas,
that was rather simple to integrate. It does work very well in my setup (RPi and VM on PVE), created a PR (Added feature to switch to remote vcontrold by Schm1tz1 · Pull Request #10 · Alexandre-io/homeassistant-vcontrol · GitHub) and hope that Alexandre will find some time to have a look so we can merge the PR soon.
It you’d like to test, you can use my fork: GitHub - Schm1tz1/homeassistant-vcontrol at remote-vcontrold
As the new docker image is not yet created and uploaded before the release is created, you can check out the repo, copy the vcontrold directory into your addons folder and comment out the image line (70) in config.yaml so the new docker image will be created upon installation.

Config example:
This is the configuration to connect to a remote VControld running on 192.168.178.42:3002

1 Like

Hello Roman,

thank you very much, it works.

I will now test everything a few days and then here for my heater Viessmann V200KW1 ID=2094 protocol:KW the Vito.xml and vcontrold.xml are available here, as well as the configruation for all sensors, etc…

I have made a few adjustments to the config.yaml, here is a list with all the points that are queried for my heater. Whether the set works I must still test.

  commands:
    - getDevType:STRING
    - getTempA:FLOAT
    - getTempAtp:FLOAT
    - getTempAged:FLOAT
    - getTempWWist:FLOAT
    - getTempWWsoll:FLOAT
    - getTempKist:FLOAT
    - getTempKsoll:FLOAT
    - getTempVListM2:FLOAT
    - getTempKol:FLOAT
    - getTempSpu:FLOAT
    - getTempRaumNorSollM1:FLOAT
    - getTempRaumRedSollM1:FLOAT
    - getTempAbgas:FLOAT
    - getTempKtp:FLOAT
    - getBrennerStufe:FLOAT
    - getBrennerStarts:FLOAT
    - getBrennerStunden1:FLOAT
    - getBrennerStunden2:FLOAT
    - getLeistungIst:FLOAT
    - getBetriebsstunden:FLOAT
    - getNeigungM1:FLOAT
    - getNiveauM1:FLOAT
    - getPumpeStatusM1:FLOAT
    - getPumpeStatusM2:FLOAT
    - getPumpeStatusSp:FLOAT
    - getPumpeStatusZirku:FLOAT
    - getMischerM1:FLOAT
    - getBetriebArtM1:STRING
    - getBetriebSparM1:FLOAT
    - getBetriebPartyM1:FLOAT
    - getTempPartyM1:FLOAT
    - getTimerM1Mo:STRING
    - getTimerWWMo:STRING
    - getTimerM1Di:STRING
    - getTimerWWDi:STRING
    - getTimerM1Mi:STRING
    - getTimerWWMi:STRING
    - getTimerM1Do:STRING
    - getTimerWWDo:STRING
    - getTimerM1Fr:STRING
    - getTimerWWFr:STRING
    - getTimerM1Sa:STRING
    - getTimerWWSa:STRING
    - getTimerM1So:STRING
    - getTimerWWSo:STRING
    - getStatusStoerung:FLOAT
    - getError0:STRING
    - getError1:STRING
    - getError2:STRING
    - getError3:STRING
    - getError4:STRING
    - getError5:STRING
    - getError6:STRING
    - getError7:STRING
    - getError8:STRING
    - getError9:STRING
    - setNeigungM1:FLOAT
    - setNiveauM1:FLOAT
    - setBetriebArtM1:STRING
    - setBetriebSparM1:FLOAT
    - setBetriebPartyM1:FLOAT
    - setTempRaumNorSollM1:FLOAT
    - setTimerM1Mo:STRING
    - setTimerWWMo:STRING
    - setTimerM1Di:STRING
    - setTimerWWDi:STRING
    - setTimerM1Mi:STRING
    - setTimerWWMi:STRING
    - setTimerM1Do:STRING
    - setTimerWWDo:STRING
    - setTimerM1Fr:STRING
    - setTimerWWFr:STRING
    - setTimerM1Sa:STRING
    - setTimerWWSa:STRING
    - setTimerM1So:STRING
    - setTimerWWSo:STRING

I will use this as a template for sensors etc., but some things have to be adjusted.

Thanks a lot Thomas

Hi Thomas,

very nice, happy to see that it works for you !
Concerning the set-commands some seem to be not correct for my device but that is probably related to openv and/or the vito.xml (e.g. set for party mode not working with my device but working for Björn who did the example you are referring to). One way to get some more commands would be by installing the Viessmann tool and extracting the xml files as described here so one can add them to vito.xml.

Cheers,
Roman

Hello Roman,

I will have a look at the Viessmann tool. With the set commands I do not get along also yet.

What I would actually wish (wish):

It takes a long time until all values are queried. It would be great if the query of the commands were divided into, for example, three areas, of which you can set the interval for the query for each. In the respective area you then put the commands that should be queried with the interval for this area.

A device is created via MQTT that then contains all sensors and switches. Here I still have to read up on how this works manually. Currently, the sensors are only in the entities.

I saw a video on Twitch at the beginning of last year, where a programmer started to program what runs directly on the Raspberry on the Vcontrold. That has all the get Commandos then sent directly to the MQTT server of HA and there was created a device with all the sensors, switches, etc… (the same way I would like to see the MQTT device created with the commands contained in the Vito.xml).
I have written to the programmer, but unfortunately I have received as an answer only that he makes it only for himself.

Hey there,

@Schm1tz1 thanks for your work for the remote setup.

I have a RPi Zero W, running vcontrold, with the official Optolink-USB cable connected to my Vitodens 200-W from 2008

And connecting vcontrold via your hassio-addon to mqtt.

image

Here is my example as an Screenshot:

The Statistic Card is on developing :relaxed:

Does anybody know, who I can remove the zero peaks in my Table?
I have tried with an availability_template

availability_template: >-
      {{ states('sensor.warmwasser_ist_temperatur') not in ['unknown', 'unavailable', '0', '0.0']}}

But this doesn’t work.

1 Like

maybe this will work?

@NightWatcher - very nice!
Having the same issues with the zero values which are returned when actual NULL values were returned from vcontrold. I remember I had that issue some years ago when writing my openHAB scripts for that job - by that time I checked for numeric values: openHAB Scripts to get vcontrold values and push via REST API · GitHub

That would be something worth integrating and testing - but as far as I remember that doesn’t work with the templates in vclient