Viessmann API binding for 3.3.x [3.3.0;3.4.0)

Hi there,

Thanks for the feedback on the instructions. I now see that they are wrong - I will fix them for the next release.

The binding only supports 3.3.x, I suspect you have 3.2 installed - the core library interface is different and that’s what causes the exceptions and missing values.

Rob.

1 Like

thanks, upgrading my openhab did indeed fix the issue!

Any idea when we can enjoy the next release?

I think my issue is that the binding is always in unknown state, therefore i am not able to access the /vicare/setup page.

I have now tried both http / https within the developer portal but without success

Please check your openhab.log file. You don’t need the setup page in the list of redirect URIs, only the authCode page.

Whether it’s https or http depends on what you are already accessing OpenHAB with.

It sounds like something else is probably stopping the binding from working as I think you would get a different error status than Unknown

My house has installed heating system based on Viessmann Vitodens 200W.

Some questions:

  1. Checked twice and can not find possibility to read current temperature from sensor mounted inside my room. Overlooked something or it’s not mapped in 3.3.5?
    Previously I’ve used bindings based on php scripts GitHub - thetrueavatar/Viessmann-Api: Api pour récupérer les infos de chaudière exposées par le service Viessmannn and could read specified room temperature:
    function getRoomTemperature($circuitId = NULL): string
    {
        return $this->viessmannFeatureProxy->getEntity($this->buildFeature($circuitId, self::SENSORS_TEMPERATURE_ROOM))->getProperty("value")["value"];
    }

If the feature is really not present in current version, could you add this? This is quite useful to make more automatics :wink:

  1. Could someone paste an example of working bindings configuration for heating device (Thing/Channel) in *.things file? When I’m adding from GUI based on Inbox notifier, then works great. However when copy settings into *.things then still I have some issues: HANDLER_INITIALIZING_ERROR. Pretty sure I have to add more properties, but for first view I can not find what it can be.

Example config created from GUI:

UID: vicare:heating:vicare_bridge:vitodens200w
label: Vitodens 200W
thingTypeUID: vicare:heating
configuration: {}
bridgeUID: vicare:bridge:vicare_bridge

And here my manually created file where still I got HANDLER_INITIALIZING_ERROR:

Bridge vicare:bridge:vicare_bridge "Viessmann API Bridge" [
  pollingInterval=90,
  iotServerUri="https://api.viessmann.com/iot/v1/",
  responseCapture=false,
  clientId="<<myID>>",
  accessServerUri="https://iam.viessmann.com/idp/v2/token",
  useLimitedEncryption=false ]
{
    Thing vicare:heating:vicare_bridge:vitodens200ws "Vitodens 200W" [] 
    {
    
    }
}

Hi hawix,

  1. heating.circuits.N.sensors.temperature.room isn’t currently supported as I’ve yet to encounter an installation which has it. If you send me your API response JSON (as documented elsewhere in this forum), I can add support for it.

  2. At the moment I don’t support creation of things from files as the binding creates various properties in the Thing and Channels but you can’t specify these in the config file, you can only specify configuration parameters (which are not the same thing). These are derived from what the API returns and aren’t documented because I might change them in future (and OpenHAB doesn’t even let you see the ones on the channels in the UI).
    Also the channel types may change in future - I am currently working on dynamically creating channel types from templates, as the number of different properties and installations makes it difficult to cater for everything. It will also allow (eventually) some of the info from the API to appear in things such as UI controls e.g. limits for temp settings, which can only be exposed via the channel type. Having channels hard-coded in user’s .thing files would make this difficult to support.

Hello!

Need to some if possible - I got stuck at the following point:

I had problems with the bridge in “unknown” state so I removed the Viessmann API binding. Then I also deleted the client on the Viessmann developer page. Stopped openHAB, cleaned cache and restarted openHAB.
I have then re-installed the Viessmann API binding. When I open /vicare/setup it still says binding is “AUTHORISED” and even shows me two two devices. When I click on “Authorise ViCare Binding” then I get the message “error:Client not registered”.

viessmannapi

Then I add the Viessmann API Bridge via openHAB-UI and enter the current Client ID of Viessmann client. Thing gets created (stays in UNKNOWN state) and throws an error in log:

12:09:31.280 [WARN ] [icare.internal.VicareDiscoveryService] - Unexpected error occurred scanning Viessmann API
java.lang.NullPointerException: null
at java.util.Objects.requireNonNull(Objects.java:221) ~[?:?]
at java.util.ImmutableCollections$MapN.(ImmutableCollections.java:827) ~[?:?]
at java.util.Map.of(Map.java:1399) ~[?:?]
at com.qubular.openhab.binding.vicare.internal.VicareDiscoveryService.discoverHeating(VicareDiscoveryService.java:146) ~[?:?]
at com.qubular.openhab.binding.vicare.internal.VicareDiscoveryService.lambda$scanJob$0(VicareDiscoveryService.java:104) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]

Not sure how to get that solved. I have tried to remove the binding so many times and reinstalled it. Is there still something left somewhere which I can delete manually? Or any other idea of what to do in order to get rid of the UNKNOWN state?

Using OH 3.3 Stable and latest Viessmann API binding 3.3.5.

If you “deleted” the client on the Viessmann site ( how?), I’d suspect you can’t connect via the binding nor via ViCare. Or am I missunderstanding what you actually did?

Sorry, I should have mentioned that I created a new client on Viessmann’s page and used the new client ID when creating the Bridge thing.

…plus, on the developer portal page of Viessmann I see that the section “Use of the API transaction” increases the number of transactions constantly meaning the binding is connected.

How to deleted the client ID? Look here:

I think something from the installations JSON is not populated which is expected. Can you please do the following:

In the API Bridge Thing, enable advanced options, enable “Response Capture Debug”.

and find in the userdata/cache/org.eclipse.osgi//data folder the installationsResponseCapture.json file and PM it to me.

I think possibly there is a model ID or something that is not set on your boiler. In which case the binding may need a bug fix.

When enabling the “Response Capture Debug” I don’t see a file with extension “.json”. I even did a restart of openHAB.

/userdata/cache/org.eclipse.osgi there are only many subfoldes with increasing numbers containing a data folder each. No one contains a file with anything like “capture”.

In userdata/cache there is a LOG file containing:

!ENTRY org.eclipse.osgi 4 0 2022-11-29 20:29:14.411
!MESSAGE Error stopping the framework.
!STACK 0
org.osgi.framework.BundleException: Could not lock the system bundle state for shutdown.
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:230)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:226)
at java.base/java.lang.Thread.run(Thread.java:834)

!ENTRY org.apache.karaf.log.core 4 0 2022-11-29 20:29:30.248
!MESSAGE FrameworkEvent ERROR
!STACK 0
java.lang.IllegalStateException: Configuration Admin service has been unregistered
at org.apache.felix.cm.impl.ConfigurationAdminImpl.getConfigurationManager(ConfigurationAdminImpl.java:325)
at org.apache.felix.cm.impl.ConfigurationAdminImpl.getConfiguration(ConfigurationAdminImpl.java:156)
at org.apache.karaf.log.core.internal.LogServiceImpl.getConfiguration(LogServiceImpl.java:121)
at org.apache.karaf.log.core.internal.LogServiceImpl.setLevel(LogServiceImpl.java:103)
[…]

Does this mean anything? If not, is the binding not able to even write the debug into a file?

Yesterday after my post I did a clean-cache in OH3 and restarted it.
Now there is no new LOG file created in userdata/cache but also no installationsResponseCapture.json…

What still wonders me:
if I delete the things and uninstall the binding, do a clean-cache and restart OH23… when installing the Viessmann binding again and go to http://xxxxxx/vicare/setup, why does it immediately show me the two entries again? Is there a way to really delete the information related to the Viessmann binding?

I don’t think that log message is specifically related to the Viessmann binding. If you have authorised the binding, and go to the setup page and it renders the list of connected devices (as in your screenshot), if you have set the REsponse Capture Debug option when it shows the page, it will definitely create the capture file, you just need to find it. just type something like

find . -name *.json
it will be in there.

Regardless, you’ll need to wait for the next release for a fix.

No, for sure there is no json file. I did run a search already in the past. Even did not just search within cache folder.

image

Let’s see if the next release will fix it.

Regardless of whatever the reason is, thank you for your replies and trying to help!! Very much appreciated!!!

Log in openhab:

2022-12-04 09:43:06.436 [WARN ] [care.internal.VicareDiscoveryService] - Authentication problem scanning Viessmann API:Unable to authenticate: No valid access token and no refresh token.

Status of binding:

i am not able to identify any other errors related to the vicare binding.

Any other idea?

Did you manage to get to the /vicare/setup page and authorise the binding? Does it show a list of your heating installations?

No, that is still the point where i’m struggeling.
I am not able to access http://openhabip/vicare/setup nor https://openhabip/vicare/setup

image

Hi,
I’m new in this round and have the same issue.
But maybe I can help a little bit to find the root cause.
As mentioned I have the same issue in my configuration, but when I’m deleting the my Heating-System out of the VICare App, the openhab Bridge will change directly into “online”.
Maybe you can check this also on your side and hopefully we are than one step further :wink:
BTW … after adding the system in the VICare app again and restarting the raspi, the ViCare bridge was shifting back to state “unkown”

Hi,
I installed V3.3.4 some weeks ago, but I saw that there is V3.3.5 now. How can I update the binding in OH3?
Thanks.