Custom Integration: Sonnenbatterie

Thanks. You mentioned manual mode earlier in the thread. What does the system do in that mode? I have the Hybrid 9.53 and I can see the difference between Time of Use and Automatic/self-consumption but not manual.

hello to everyone.

Why in my HACS i can’t find sonnnenbatterie?

Hi giakko1982,
welcome to the community :slight_smile:
how did you add the repository to hacs? Did you add it at all?
If not, despite mentioned in the readme, try https://hacs.xyz/docs/faq/custom_repositories

Ok, ive solved. Custom componenti are ready and working.

Now i want transform Power in kWh but out data are different from in data.

450w => 0,003kwh

Anyone can help me?

You need to use a Riemann integration sensor to add up energy over time unit.

Something like this in your configuration.yaml file:

  - platform: integration 
    source: sensor.sonnenbatterie_xxxxx_meter_consumption_4_2_w_total 
    name: PowerConsumption
    unit_prefix: k
  - platform: integration
    source: sensor.sonnenbatterie_xxxxx_meter_production_4_1_w_total
    name: PowerProduction
    unit_prefix: k
  - platform: integration 
    source: sensor.sonnenbatterie_xxxxx_state_grid_input
    name: GridInput
    unit_prefix: k
  - platform: integration 
    source: sensor.sonnenbatterie_xxxxx_state_grid_output
    name: GridOutput
    unit_prefix: k
  - platform: integration 
    source: sensor.sonnenbatterie_xxxxx_state_battery_input
    name: BatteryInput
    unit_prefix: k
  - platform: integration 
    source: sensor.sonnenbatterie_xxxxx_state_battery_output
    name: BatteryOutput
    unit_prefix: k

This may help →

1 Like

I also added a wiki entry some time ago with more explanation:
Home · weltmeyer/ha_sonnenbatterie Wiki · GitHub :slight_smile:

I did some tests on my system but sensor sensor.sonnenbatterie_xxxxx_meter_production_4_1_w_total seems to be always Zero. what about yours ? any suggestion ?

Did some investigation and getting this dump from my system for PowerMeter parameter. As you can see on Production there is an error = 3.
Sonnen official app provides to me the production value, also I try to call API like http://SYSTEM-IP/api/v2/latestdata and http://SYSTEM-IP/api/v2/status and I get the production value. What is the URL of the API called by this custom addons ? Any suggestion on how to fix it ?

APPLICATION DUMP
powermeter [{‘a_l1’: 0, ‘a_l2’: 0, ‘a_l3’: 0, ‘channel’: 1, ‘deviceid’: 4, ‘direction’: ‘production’, ‘error’: 3, ‘kwh_exported’: 0, ‘kwh_imported’: 0, ‘v_l1_l2’: 0, ‘v_l1_n’: 241.1999969482422, ‘v_l2_l3’: 0, ‘v_l2_n’: 0, ‘v_l3_l1’: 0, ‘v_l3_n’: 0, ‘va_total’: 0, ‘var_total’: 0, ‘w_l1’: 0, ‘w_l2’: 0, ‘w_l3’: 0, ‘w_total’: 0}, {‘a_l1’: 10.956000328063965, ‘a_l2’: 0, ‘a_l3’: 0, ‘channel’: 2, ‘deviceid’: 4, ‘direction’: ‘consumption’, ‘error’: 0, ‘kwh_exported’: 0, ‘kwh_imported’: 3963.39990234375, ‘v_l1_l2’: 0, ‘v_l1_n’: 241.1999969482422, ‘v_l2_l3’: 0, ‘v_l2_n’: 0, ‘v_l3_l1’: 0, ‘v_l3_n’: 0, ‘va_total’: 2642.39990234375, ‘var_total’: -180.89999389648438, ‘w_l1’: -2636.300048828125, ‘w_l2’: 0, ‘w_l3’: 0, ‘w_total’: -2636.300048828125}

CURL DUMP CALL API STATUS
Apparent_output : 533
BackupBuffer : 0
BatteryCharging : True
BatteryDischarging : False
Consumption_Avg : 196
Consumption_W : 176
Fac : 49,95868682861328
FlowConsumptionBattery : False
FlowConsumptionGrid : False
FlowConsumptionProduction : True
FlowGridBattery : False
FlowProductionBattery : True
FlowProductionGrid : True
GridFeedIn_W : 363
IsSystemInstalled : 1
OperatingMode : 2
Pac_total_W : -3498
Production_W : 4036
RSOC : 80
RemainingCapacity_Wh : 13628
Sac1 : 533
Sac2 :
Sac3 :
SystemStatus : OnGrid
Timestamp : 2022-05-16 12:53:28
USOC : 78
Uac : 235
Ubat : 52
dischargeNotAllowed : False
generator_autostart : False

Anyone know installer password?

1 Like

Just figured out installing this with HACS as I’m hoping to have solar panels and a 7.5kWh Sonnen Hybrid 9.53 installed soon. Seems like others in the thread have it working with this version of the battery already.

HI Bruce

I have exactly same problem - have you been able to get past the login screen?

Has anyone with the Hybrid system getting the House consumption to show up? I’ve tried all the available sensors in the integration but none show this value. Everything else works fine otherwise thanks.

I am not getting consumption through the integration, so I set up a webhook to get “live” values.

Are you able to share how you did this or point me in the right direction? I’m slowly learning how to do things in HA and have managed with help on a previous post to change my system from Automatic to TimeofUse using NodeRed which has been great for setting charging events.

And that’s actually wrong, it’s the production values I am not getting, sorry!

No problemo. Thanks for the reply.

I just found this link, I am pretty sure this is the description I used for setting up the webhooks.

Thanks. Ive been checking it out and it looks like it will send through the right info. Just need to figure out how to set it all up.

Could anyone share the installer password with me please? Thanks a lot.