SmartHome/J Viessmann Binding for 4.0.x

These are two different bindings that access the same API. I don’t know how the binding from the marketplace works. I only use the version of the SmartHome/J project. You are welcome to try both out and leave feedback in this post.

This Binding ist not published in the OpenHAB community, so there is no topic here.

When this binding was created, community bindings did not yet exist. Therefore it was published in the SmartHome/J project.
Thanks to @J-N-K there is the possibility to install JSON third-party add-ons in OpenHAB

Maybe this helps: if you want to be able to set the heating curve (slope and level) via the binding, you have to use smarthomej. The other author claims that it must only be readable, although the Viessmann API allows to write it. And a smart home is about using sensors rather than some static curve, imho.

Are you sure that you cannot just create a genuine topic in this forum and point to it?
Otherwise linking from GitHub to a certain topic might do the job.
Or what about migrating the binding to the marketplace?

If the addon was not installed, is there anything else that one has to do except to drop the file into /openhab/addons? It is not listed after restarting openhab at bundle:list.

Check permissions.
How did you retrieve the addon file? If you download it through wget or curl you need to add ?raw=true to the download link

I did try the raw=true but since it did not work, I downloaded and copied manually. So that should be ok.

Permissions, the folders and files belong to openhab:openhab. That should also be ok.
grafik

grafik

The addons are listed but I cannot pick them:
grafik

If I click on the “+” in the things section, the binding is not listed.

I had the same problem with a different binding. Seems to be a bug. You still can add things through the developer side bar (“Add Thing (quick)”)

1 Like

That was it! Is the bug already reported?

I can add a thing but the login fails. When I set the log level to trace I see that the redirect URI is invalid. What I do not understand is that the redirect URI is not what I set in the developer portal.

http://localhost:8445/viessmann/authcode/

is what I set and in the log I see:
grafik

grafik

Which OH version are you using?
Which port do you use to access your openHAB?

Port 8445, that’s why I changed it.

runtimeInfo:
  version: 4.3.2
  buildString: Release Build
locale: de-DE
systemInfo:
  configFolder: /openhab/conf
  userdataFolder: /openhab/userdata
  logFolder: /openhab/userdata/logs
  javaVersion: 17.0.13
  javaVendor: Debian
  osName: Linux
  osVersion: 6.4.0-150600.23.33-default
  osArchitecture: amd64
  availableProcessors: 4
  freeMemory: 194579640
  totalMemory: 377487360
  uptime: 15450
  startLevel: 100
addons:
  - automation-jsscripting
  - binding-astro
  - binding-knx
  - binding-mqtt
  - binding-sonos
  - persistence-rrd4j
  - ui-basic
  - ui-habpanel
clientInfo:
  device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: true
    macos: false
    windows: true
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    os: windows
    pixelRatio: 1
    prefersColorScheme: dark
  isSecureContext: true
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 8
    language: de
    languages:
      - de
      - en-US
      - en
    onLine: true
    platform: Win32
  screen:
    width: 1920
    height: 1080
    colorDepth: 24
  support:
    touch: false
    pointerEvents: true
    observer: true
    passiveListener: true
    gestures: false
    intersectionObserver: true
  themeOptions:
    dark: dark
    filled: true
    pageTransitionAnimation: default
    bars: light
    homeNavbar: default
    homeBackground: default
    expandableCardAnimation: default
    blocklyRenderer: null
  userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101
    Firefox/134.0
timestamp: 2025-01-24T20:38:48.797Z

Can you reach openHAB with this URL
http://localhost:8082
?

If I use the server’s IP:8082 I can reach the http openhab.

I set the redirect URI to http://localhost:8082/viessmann/authcode/ and tried to start the binding from the https openhab UI (Pause icon), it failed.

Then I switched to the http openhab and it worked. After that I can also pause it from the https openhab and it comes back online after resuming.

Does that make sense to you?

Thanks for hinting me in the correct direction.

BTW: I had also tried https://localhost:8445 before.

The binding only access the redirect URI via http (without SSL) because it can cause certificate validation issues.
So you can’t use the SSL port 8445

So one cannot start the binding the first time from a https openhab?

I would have to try that again. Normally it should work the first time over https

Then it might have been the minute that passed between trying both. Maybe the Viessmann site was a bit slow accepting the changed URI.

That would definitely be a plausible explanation

Is there a way to access the compressor’s phase, i.e. preparing, heating, pause? This is available in the vicare binding and since both use the same API, I wonder how I can access it? Did I overlook some channel?