Binding request: Viessmann (API/ViCare - not vitotronic)

Getting temperature reading from a room is no problem within openHAB, however getting such a (non-Viessmann) reading into the heating-system would by nice. Although I doubt Viessmann will ever open such a door.

API documentation

https://htmlpreview.github.io/?https://raw.githubusercontent.com/thetrueavatar/Viessmann-Api/develop/docs/classes/Viessmann.API.ViessmannAPI.html

Seams the library from thetrueavatar has consumption tracking capabilites. Will try this week and revert.

I did a quick test drive, you can get gas consumption from thetrueavatar libraries

Here is what you get for a week

HotWater
array(8) { [0]=> int(1) [1]=> float(2.8) [2]=> float(1.5) [3]=> int(0) [4]=> int(0) [5]=> float(1.6) [6]=> float(2.9) [7]=> int(2) }
Heating
array(8) { [0]=> float(2.1) [1]=> float(6.5) [2]=> float(5.9) [3]=> float(7.3) [4]=> int(9) [5]=> float(9.1) [6]=> float(9.4) [7]=> float(9.7) }

If you need guidance on how to integrate this library in openhab see above post referencing

What I was referring to is Viessmann Smart Climate, where you have smart heating valves

image

I’m searching to get each valve data loaded in openhab for reporting, graphing, etc…

Exemple of one valve entity:

 [9]=>
            object(TomPHP\Siren\Entity)#1459 (6) {
              ["classes":"TomPHP\Siren\Entity":private]=>
              array(1) {
                [0]=>
                string(12) "model.device"
              }
              ["properties":"TomPHP\Siren\Entity":private]=>
              array(12) {
                ["gatewaySerial"]=>
                string(16) "<MASKED>"
                ["id"]=>
                string(23) "zigbee-ccccccfffe1f7c4b"
                ["boilerSerial"]=>
                NULL
                ["boilerSerialEditor"]=>
                NULL
                ["bmuSerial"]=>
                NULL
                ["bmuSerialEditor"]=>
                NULL
                ["createdAt"]=>
                string(24) "2021-02-04T18:57:12.507Z"
                ["editedAt"]=>
                string(24) "2021-02-04T18:57:12.507Z"
                ["modelId"]=>
                string(19) "E3_RadiatorActuator"
                ["status"]=>
                string(6) "Online"
                ["deviceType"]=>
                string(6) "zigbee"
                ["roles"]=>
                array(2) {
                  [0]=>
                  string(3) "trv"
                  [1]=>
                  string(12) "zigbeeDevice"
                }
              }
              ["links":"TomPHP\Siren\Entity":private]=>
              array(0) {
              }
              ["title":"TomPHP\Siren\Entity":private]=>
              NULL
              ["actions":"TomPHP\Siren\Entity":private]=>
              array(0) {
              }
              ["entities":"TomPHP\Siren\Entity":private]=>
              array(0) {
              }
            }

This is how to get valve temperature.

https://api.viessmann-platform.io/iot/v1/equipment/installations/<installationID>/gateways/<gatewayID>/devices/zigbee-<zigbeeID>/features/cs.sensors.temperature

Others of interest

cs.sensors.humidity
device.roomId
device.heatingCircuitId
device.power.battery

Does anyone got the PyViCare tool working on a Raspberry PI?

Not PyViCare but my openHAB instance is running on a RaspPi and I’m actually using the Viessmann API via rules:

Looked at the PyViCare code, at least the used settings for apiURLBase and redirect_uri are not looking as documented by Viessmann. Using this apiURLBase I was not able to send a command to my system, using the documented URL it worked.

Hi, everyone.

I have good news. A new binding for Viessmann is available in the SmartHomeJ project.

On oh3.2 there is a new way to install 3rd party addons. You just need to add this: https://download.smarthomej.org/addons.json

Then you can install the binding. It is currently still under development. If some features are not available please let me know.

Best regards,

Ronny

1 Like

Great news. Is there already any documentation ?

You can find the general documentation of the SmartHome/J project here: https://github.com/smarthomej/addons

and here:
https://docs.smarthomej.org/

or the documentation of the binding here on GitHub:
https://github.com/smarthomej/addons/tree/3.2.x/bundles/org.smarthomej.binding.viessmann

1 Like

Thank you! Great work!

With the new version of the binding the “viessmann device”-thing (Device Id = 0) does not get online.
Before it was working and I was able to read out the values of my heatpump.
Here is the error-message:

java.lang.IllegalArgumentException: Invalid Quantity value: 2094.4 null

viessmann.txt (3.2 KB)

Another question is:
Does the binding also support the control?
I could not get this working till now.

The version 3.2.10 is broken since support of uom.
A PR is with the fix is in progress. You can download the new version here:
https://jenkins.smarthomej.org/job/SmartHomeJ%203.2.x%20Snapshot/lastSuccessfulBuild/org.smarthomej.addons.bundles$org.smarthomej.binding.viessmann/artifact/org.smarthomej.addons.bundles/org.smarthomej.binding.viessmann/3.2.11-20220121.033935-9/org.smarthomej.binding.viessmann-3.2.11-20220121.033935-9.jar

You also have to download the commons JAR here: https://jenkins.smarthomej.org/job/SmartHomeJ%203.2.x%20Snapshot/lastSuccessfulBuild/org.smarthomej.addons.bundles$org.smarthomej.commons/artifact/org.smarthomej.addons.bundles/org.smarthomej.commons/3.2.11-20220121.033037-9/org.smarthomej.commons-3.2.11-20220121.033037-9.jar

At first deinstall the binding. After this put at first the commons jar into the addons folder. Wait 1-2 minutes and then put the binding into addons folder.

Never install two versions of a binding.

Yes it supports control. What do you want to control?
Maybe I can assist.

I get this error :

HANDLER_INITIALIZING_ERROR

Illegal character in query at index 104: https://iam.viessmann.com/idp/v2/authorize?response_type=code&client_id=xxxxxxxxxxxxxx&code_challenge=xxxxxxxxxxxxxx&redirect_uri=http://localhost:8080/viessmann/authcode/&scope=IoT%20User%20offline_access

where is the mistake??

I did. New addons are active:

openhab> la -l|grep smarthomej
296 x Active   x  80 x 3.2.11.202201210329     x file:/usr/share/openhab/addons/org.smarthomej.commons-3.2.11-20220121.033037-9.jar
297 x Active   x  80 x 3.2.11.202201210339     x file:/usr/share/openhab/addons/org.smarthomej.binding.viessmann-3.2.11-20220121.033935-9.jar

Bit still the samer error. Some data can not be parsed correctly…

Exception occurred while initializing handler of thing 'viessmann:device:96afd7d3df:0': Invalid Quantity value: 2098.1 null

@nikos7179
Everything seems right. Pleas PM me the complete log in TCRACE mode.

log:set TRACE org.smarthomej.binding.viessmann

@Tuny I‘ll check it later. I need some time. You‘ll get response soon

ok i found the mistake. i think it was wrong my Client ID.
now it is online but i have the same error like @Tuny

2022-01-21 18:19:24.566 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing ‘viessmann:device:acac21cdf6:0’: Invalid Quantity value: 11.4 null

java.lang.IllegalArgumentException: Invalid Quantity value: 11.4 null

Thank you. In my case the value shows the runtime of the compressor.
So maybe the channel “Compressor statistics (Circuit: 0) hours” is the problem?

Yes, thats right. The problem is the naming of the unit. Sometimes viessmann calls it hour or hours
I’am working on a fix for that issue.

I have fixed the issue. You can download the new version here: https://jenkins.smarthomej.org/job/SmartHomeJ%20PR%20Builds/693/org.smarthomej.addons.bundles$org.smarthomej.binding.viessmann/artifact/org.smarthomej.addons.bundles/org.smarthomej.binding.viessmann/3.2.10-SNAPSHOT/org.smarthomej.binding.viessmann-3.2.10-SNAPSHOT.jar

Please don’t be surprised about the version number, that’s correct, so the version number is smaller.

Please delete the old version before copying it to the addons folder.