at first - thank you for this great integration of vcontrold into the ha environment. I am really happy to have the possibility to include the data from my heating as well. My optolink cable is connected locally and since my heating has a different device ID and command addresses I wanted to change those data in the vito/vcontrold.xml.
Now my query is, where I can find both files that are used from the addon?
I have tried to put them into ha /etc/vcontrold path, which was not working. With changed device id the addon did not start with the error message:
Error loading /etc/vcontrold/vcontrold.xml, terminating
[08:18:07] WARNING: Halt add-on with exit code 1
@CM000n , unfortunately I don’t know the internal electronic parts of the original cable.
The LED and photo transistor should fit but the resistors may not fit cause USB uses 5V and the ESP uses 3.3V.
I just ordered my D1 Mini and the resistors + LED’s. I am already looking forward to the tinkering project.
I still have one question @jota29 : How do I get the addresses for the sensors. Is that visible in the log? Is there possibly an overview for this?
Unfortunately, this is not so easy for me to see in your pull request.
@CM000n, the addresses for the sensors depend on the type of the Vitotronic controlling unit of your boiler. It’s best to start without any sensor configuration with just the component initialization:
optolink:
protocol: P300
device_info: Device Info
state: Component state
Eventually replace P300 with KW (this also depends on your boiler type).
If your DIY adapter works correctly, you should see a sensor “Device Info” in Home Assistant or the web interface of your ESP. The device info (4 digit-letter-combination) must match to one value in the line “Gerätekennung” of the table at Adressen · openv/openv Wiki · GitHub. If a value matches you find valid addresses for more sensor configurations in the lines below.
Be aware: the table has more columns than you see in the first moment. Scroll horizontally to see all devices.
Good luck!
I can’t get it to work, unfortunately, and I don’t know if it’s my pathetic soldering skills or if one of the LEDs or resistors is defective.
I have already checked my solder joints and the correct position of the anodes/cathodes and collectors/emitters several times (I don’t see any IR signal through my smart phone camera).
Unfortunately I can’t get a device_info read out. Both with KW, and with P300 protocol. And with different positions of the LEDs on the Viessmann connector.
Unfortunately I am at my wit’s end and do not know how I can debug it further better. :-/ Eventually I wait and hope until there maybe the first pre-mounted read heads available.
With the smart phone camera I could now also see that the SIR 204 EVL is sending a signal. But the SFH 309 FA seems to receive no signal when I look at the ESP logs. I will now order a new SFH 309 FA and try it again.
Maybe this approach is also helpful for someone else to debug.
Perhaps we should also create a separate thread for OpenV with ESP Home @jota29 ? So that it is better known and we do not spam everything here.
Had an opportunity to try this out with a Viessman optolink. It is very good at getting values, but I haven’t had success in setting values. There also is a disparity in the get & set on the mode control in particular. This is what my mqtt/select looks like:
- name: "Viessmann Operating Mode"
unique_id: "vcontroldgetOperatingMode"
state_topic: "openv/getBetriebArt"
icon: mdi:water-boiler
device:
identifiers: vcontrold
manufacturer: Viessmann
command_topic: "openv/setBetriebArt"
options:
- "Heating & Domestic Hot Water"
- "Domestic Hot Water"
- "Reduced"
- "Normal"
- "Antifreeze"
- "Shutdown"
command_template: |-
{% if value == 'Heating & Domestic Hot Water' %}
H+WW
{% elif value == 'Domestic Hot Water' %}
WW
{% elif value == 'Reduced' %}
RED
{% elif value == 'Normal' %}
NORM
{% elif value == 'Antifreeze' %}
H+WW FS
{% elif value == 'Shutdown' %}
ABSCHALT
{% endif %}
value_template: |-
{% if value == 'H+WW' %}
"Heating & Domestic Hot Water"
{% elif value == 'WW' %}
"Domestic Hot Water"
{% elif value == 'RED' %}
Reduced
{% elif value == 'NORM' %}
Normal
{% elif value == 'H+WW FS' %}
Antifreeze
{% elif value == 'ABSCHALT' %}
Shutdown
{% endif %}
This is based off the example (and translated to English) here.
Unfortunately, it does nothing. I also noticed that there is a disparity in the vito.xml in regards to setBetriebArt. There is “setBetriebArtM1” and also a “getBetriebArtM2” and “getBetriebArt”, but no “getBetriebArtM1”. Unfortunately, modifying my select to use “getBetriebArt” and “setBetriebArtM1” still has no effect on changing the mode of the Viessmann.
It would be nice if someone adapted the Vicare Integration to use vcontrold and optolink. The Vicare API has been notoriously unreliable for me. Right now it can’t connect at all, and of course, I hate using the cloud altogether.
I did not dig through the whole thread but wanted to share my solution, maybe it helps someone. In my configuration, the vcontrold service runs on a different machine and HASSOS is running in a VM. At the time when implementing, I did not know how to use the vclient executable, so I wrote a python wrapper connecting via the network (currently only readout):
File: /config/python_scripts/gastherme.py
#!/usr/bin/python3
import sys
import telnetlib
import re
#start telnet to vcontrold
tn = telnetlib.Telnet("192.168.10.2",3002)
tn.read_until(b">")
value = 128.5
while value==128.5:
tn.write(sys.argv[1].encode('ascii') + b"\n")
value = round(float(re.findall('^(?!\s)-?\d+\.?\d*', (tn.read_until(b'vctrld>', timeout=5).decode('ascii')))[0]),1)
if value < 100:
print(value)
tn.write(b"quit\n")
This seems to be a very interesting solution. Especially since it allows to set individual scan intervals (in seconds?). Could you also expand your script on the set commands? I’m still looking for a solution to set heating schedules.
I am not a programmer, but the ‘vctrld>’ reads out the values, definied in the vito.xml?
Would it also be possible to read not only float values but also string values?
I have a similar configuration to yours. I use a Raspberry Pi in the heating room to retrieve data from the Vitodens 333 using vcontrold. Home Assistant on my server then fetches the data.
Hi @SSX ,
currently I do not plan to improve my python script although would also like to get more values and set things. As I said, before investing more time into this I will try the addon. IMHO it makes more sense if people focus on one working solution
supports remote vcontrold like your setup.
Anyway, for your questions:
Yes, that’s in seconds
In principle, could be done. I would probably write a new python file just to send commands.
My guess is that this would work with the integration but I did not dig into this. Important is to set the payload correctly: like setTimerWWDi 06:10 9:30 17:30 20:40
That is part of the response when you connect. For debugging, you can just connect with telnet to the port, for example on your rpi:
# telnet localhost 3002
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
vctrld>getTempWWist
40.5 Grad Celsius
vctrld>
So, the program first reads until > which is after the initialization of the connection. Then sends the command and reads until the next line “vctrld>” The value itself is extracted via regex: regex101: build, test, and debug regex
Yes, the regex needs to be adjusted accordingly. Easiest might be another python script which gets the string values. Use the telnet console to get your original readback, paste that into the regex101 website and adjust your regex until you have the correct output.
@steini86
Thank you for the response.
Yes, the adapter is working as expected. However, I wish it had an option for integrating that scan_interval feature.
The payload for the heating timer doesn’t work at all. I.e. this
sends only the first “on”-time in the string “06:30”. It doesn’t send the other values.
Anyway, I hope that there will be a solution for that at some point as well.
I am currently (still) using the official Vitoconnect Hub, as we live here with my parents-in-law and my father-in-law would like to continue using the Viessmann app instead of Home Assistant. Some functions, such as setting timers for the heating circuit pumps, for example, cannot be implemented in Home Assistant or can only be implemented with difficulty.
However, it basically worked and I could read out the data. The problem for me was simply my Wemos D1 Mini. It just wouldn’t work with it. After I switched to a NodeMCU instead, it worked without any problems.
Unfortunately, after starting the update, the process reports errors as below.
I will add that Optolink is still working (fortunately) and the update of the second ESP responsible for the DSC alarm went without a problem.