Contents

Integrate Solix in Homeassistant

Integrate Solix in Homeassistant

This describes how I added a system with solar panels and smart meter into Homeassistant.

Goals

  • achieve an accurate overview of the energy generated, stored and consumed
  • use existing hardware as much as possible

Possible Result

Should look like this:

../Screenshot_20250608_160507.png

Possibilities

These are possibilities in my environment without buying new stuff.

Drawbacks

  • ha-anker-solix uses anker cloud api, there is no local endpoint that can be used
    • needs a second anker account that gets invited to your family so that you do not get locked out of your main anker account
  • smart plugs can only cover a subset, thus leading to incomplete measurements.

Decision

Use Tom Luther’s Integration

Installation

Requirements

  • Homeassistant
  • HACS
  • all devices registered in the anker app using your main anker account
  • Second Anker Account (to be created)

Prepare Account

  • goto Anker Solix Homepage2
    • hover over the person icon in the upper right section and hit the Join Now Link
    • create an anker account with an email not already used for another anker account (that is in use with an app)
    • finish the creating with the link(s) you get via e-mail
    • invite the new account to your family using the account you manage your anker system with
    • accept the invitation to the family using the new account

Downloading Integration and Restart HA

The official Documentation is great, I’m just repeating the minimum steps to get it up and running.

You should read through it though to understand the implications and requirements i.e. a second anker account to use so that you do not lock yourself out of the app while creating a token to use for the Homeassistant integration.

In Homeassistant:

  • goto HACS
  • download Anker Solix
  • wait for Homeassistant to install the integration and finish restarting
  • you should now find the integration using the settings->devices & services section
    • looks like this:
    • ../Screenshot_20250608_155325.png
  • hitting the Devices button on the integration you should see your:
    • account abbreviated with *
    • Smart Meter if you have one
    • Solarbank
    • <your name of the system as shown in the anker app

If you are familiar with Homeassistant you can now build your dashboards using the existing sensors.

Integration Ideas

The anker sensors are not providing the correct units for the homeassistant energydashboard, so we need to create some integral sensors and if you also want to integrate the battery power flow we need some logic that splits positive and negative flows into different sensors.

In my case this looks like this:

../Screenshot_20250608_160800.png

For the integral sensors we are using the left riemann sum as discussed on github3.

For more comprehensive information about riemann sums, look at (german) heise+ articel about integrating smart plugs4

Sensor Overview

Integral Sensors

  • battery-input-sum
  • battery-output-sum
  • solar-grid-import-sum
  • solar-grid-export-sum
  • solar-pv1-sum
  • solar-pv2-sum
  • solar-pv3-sum
  • solar-pv4-sum

Template Sensors

  • battery-input
  • battery-output

Create Template Sensors

../Screenshot_20250608_162811.png

Important: You have to replace the part with the name of your own system in both lines.

# replace <system> with correct name so that this:
{% if states('sensor.system_<system>_sb_battery_power')|float <= 0 %}
        {{ states('sensor.system_<system>_sb_battery_power') |float |abs }}
        {% else %}
  0.0
        {% endif %}
# becomes this:
        {% if states('sensor.system_myname_sb_battery_power')|float <= 0 %}
        {{ states('sensor.system_myname_sb_battery_power') |float |abs }}
        {% else %}
  0.0
        {% endif %}

Battery-input

State template*

{% if states('sensor.system_<system>_sb_battery_power')|float >= 0 %}
  {{ states('sensor.system_<system>_sb_battery_power') |float |abs}}
{% else %}
  0.0
{% endif %}

Battery-output

State template*

{% if states('sensor.system_<system>_sb_battery_power')|float <= 0 %}
  {{ states('sensor.system_<system>_sb_battery_power') |float |abs }}
{% else %}
  0.0
{% endif %}

Create Integral Sensors

../Screenshot_20250608_163016.png

If you have created all the integral sensors from the list above, you can continue to energy dashboard and add all the sensors there

Configure Energy Dashboard

../Screenshot_20250608_163348.png

Links