Sonnen Battery Binding

@Heeman2424 Can you check this version? It contains the PowerMeter in the advanced options as well as the API V2 Calls

@corny It should be supported with the version 1.1 provided here in the marketplace

@Christian_Feininger
First big thank you for this binding!
Can you please add the Variable “SystemStatus” from /api/v2/status to see if the battery is On or OffGrid (to detect if the battery is in Backup Mode)?

Thank you!

Hello, thank you very much for your commitment. I have a SonnenBatterie sb10p with software version 1.10.7. Your binding basically works, but the value “consumption” that is most important to me is not evaluated. Only “null” is displayed. Can you help me?

Hey @marrxx
the problems are the “new” units of the different channels. The binding do not support this units. There is already a PR for that, but no one tested this until now: [sonnen] Fix channel types, Energy should be Power by lochmueller · Pull Request #15384 · openhab/openhab-addons · GitHub

This is the “workarround for me”. You will get the values via public IP from the battery and can handle the values by yourself. Example with HTTP binding (only get 3 values, but you can use all information out of the JSON):

UID: http:url:sonnen_batterie_http
label: Sonnen Batterie HTTP
thingTypeUID: http:url
configuration:
  authMode: BASIC
  ignoreSSLErrors: false
  baseURL: http://xxx.xxx.xxx.xxx/api/v2/status
  password:
  delay: 0
  stateMethod: GET
  refresh: 5
  commandMethod: GET
  timeout: 3000
  bufferSize: 2048
channels:
  - id: currentConsumption
    channelTypeUID: http:number
    label: Current consumption
    description: null
    configuration:
      mode: READONLY
      stateTransformation: JSONPATH:$.Consumption_W
  - id: currentBatteryLevel
    channelTypeUID: http:number
    label: Current battery level
    description: null
    configuration:
      mode: READONLY
      stateTransformation: JSONPATH:$.USOC
  - id: currentProduction
    channelTypeUID: http:number
    label: Current production
    description: null
    configuration:
      mode: READONLY
      stateTransformation: JSONPATH:$.Production_W

Regards,
Tim

Hello, that is not correct. The binding is supporting API V2 Here an evidence out of the source code:

image

Therefore, it should also work for @marrxx, unless something has been changed recently. At least I don’t see anything at sonnen.
@marrxx Please enter the following in your browser http://YourIP/api/v2/status and send me by private message times the output from the browser, then I look if something has changed here.

@iPanic I will include this in the next version of the probably over Christmas arises accordingly.

English please, this is an international community !

I already figured it out myself :wink:

1 Like

@ Christian_Feininger I currently have no option for a private message :confused: The FAQ says nothing about this. Is there another way?

Hello,
just for documentation purpose. The binding also supports SB10P. It was just a wrong setup of the item. @timl You may try this as well. If you go with Number:Power in the item definition for consumption it will work as expected.

Works great, thanks. But the PR is still right, isn’t? So the items are created in the right unit… [sonnen] Fix channel types, Energy should be Power by lochmueller · Pull Request #15384 · openhab/openhab-addons · GitHub

Yes the PR is still right. The Bug is actual only in the description file. Therefore the wrong semantic is suggested.

1 Like