Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of Anker SOLIX Solarbank 2 E1600 AC #198

Open
3 tasks done
stelzerroland opened this issue Feb 5, 2025 · 24 comments
Open
3 tasks done

Support of Anker SOLIX Solarbank 2 E1600 AC #198

stelzerroland opened this issue Feb 5, 2025 · 24 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@stelzerroland
Copy link

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

I recently purchased the Anker SOLIX Solarbank 2 E1600 AC and tried integrating it with Home Assistant using the current version of this integration. However, only two devices are detected: System and Account—the Solarbank itself is not recognized.

I followed several tutorials where other versions of the Solarbank (non-AC models) are automatically detected without issues. Despite following the same steps, my AC version doesn’t show up, which leads me to believe that it is currently not supported.

Additionally, while the Anker app allows for dynamic power regulation, it requires both the Solarbank and my Shelly 3EM smart meter to be on the same Wi-Fi network, which isn’t possible in my setup. This makes it difficult to efficiently manage energy flow.

Describe the solution you'd like

I would love to see support for the Anker SOLIX Solarbank 2 E1600 AC added to the integration, with the following key features:

  • Device detection and monitoring, including battery status, power input/output, etc.
  • The ability to dynamically adjust the AC power output via Home Assistant, allowing me to automate energy management based on real-time data from my Shelly 3EM.

This would eliminate the need for both devices to be on the same Wi-Fi network and enable smarter energy control within Home Assistant.

Describe alternatives you've considered

  • Using the Anker app, but it requires both devices to be on the same Wi-Fi network, which isn’t feasible.
  • Network bridging to force both devices onto the same network, but this adds unnecessary complexity and reliability risks.
  • Custom API development, but this would require more technical effort and time than I can currently invest.

Additional context

  • I’m happy to provide API responses, debug logs, or assist with testing if needed.
  • My Shelly 3EM is already integrated into Home Assistant, and having the Solarbank supported would allow for advanced energy automation.
  • The AC version of the Solarbank has only been available for a few months, so this feature might benefit other users with similar setups.

Thank you for your hard work on this integration!

@thomluther
Copy link
Owner

Hi
This is in process and tracked already with issue Add Support for Usage Mode: Backup Power #175

@thomluther thomluther added enhancement New feature or request help wanted Extra attention is needed duplicate This issue or pull request already exists labels Feb 5, 2025
@thomluther
Copy link
Owner

While I implemented now all new AC values and mode switches, it appears that an output power change in manual mode is not really applied by the AC system that I can access.
But that systems seems to be in a weird state anyway. You will have to test whether output preset changes will be applied by your system once the new release is available.
If that won't work, you will need to dig into the Api and figure out what 'extra' calls or different paramters might be required to change the output preset in an AC schedule plan.

@thomluther
Copy link
Owner

thomluther commented Feb 5, 2025

If you want to manage preset monitoring by HA, you have to install a fast smart plug that can reliably report positive and negative power for the AC output.
Keep in mind, that the SB2 reports data only every 5 minutes into the cloud. So when you change the preset, it might be applied immediately, but you will not see any change in the power values until the SB2 send a new data update to the cloud, so in worst case it is 5-6 minutes delayed.
This is nothing you can use to automate a regulation. Beside fast Smart Meter sensors, you need fast sensors for what is being delivered (or charged) by your battery system...
The integration alone will not fulfill the solution that you have in mind. It can only act as interface to modify the output power as needed. But the needed power must be reliably calculated with a minimum time lag, otherwise your automation will fail before you even start with it...

@stelzerroland
Copy link
Author

Hi,
thank you so much for your quick and detailed response!

It’s great to hear that support for the AC version is already in progress and tracked under issue #175. And sorry, for not recognizing this before.

To give you more context about my setup:

  • I have a Shelly 3EM to monitor the overall household consumption/energy surplus.
  • I also have a Shelly 1PM connected to the Solarbank’s output, which provides real-time monitoring of the AC output.

Using these two data sources, I plan to calculate the optimal Solarbank output directly in Home Assistant. My idea is to:

  • Periodically average the power values from both smart meters.
  • Based on the calculated surplus or deficit, adjust the Solarbank’s output accordingly.
  • Implement logic to avoid unnecessary rapid changes, considering the delay in the Solarbank’s data updates (due to the 5-minute cloud reporting interval).

I fully understand that the integration’s role is to act as an interface for output adjustments, while Home Assistant handles the real-time data processing and automation logic.

Regarding testing: I’d be happy to test the output preset changes with my Solarbank once the new release is available to see if the behavior differs on my system. If there’s anything specific I can test—especially around API behavior or output changes—just let me know. I’d also be happy to capture API calls from the Anker app if that helps identify differences in parameter handling.

Thanks again for your support, and I’m looking forward to the next release!

@thomluther
Copy link
Owner

Regarding testing: I’d be happy to test the output preset changes with my Solarbank once the new release is available to see if the behavior differs on my system. If there’s anything specific I can test—especially around API behavior or output changes—just let me know. I’d also be happy to capture API calls from the Anker app if that helps identify differences in parameter handling.

If you can capture Api calls from the App, it will be helpful to know which endpoints are used when doing usage mode changes once a use time plan has been defined.
So toggling modes from/to use time plan may be play a role.
Also when you are in manual mode, what Api endpoints are used when doing only output changes in the active slot. (while there is a use time plan defined)
I think you cannot debug the payload since that is ECDH encrypted, so the parameters will remain unknown. But knowing the used endpoints would already help. This could be explored further via Api calls then.
It will also be usefull when the endpoints get_device_attrs and set_device_attrs are used, because their purpose is unclear and I have not found yet which attributes can be queried...
See Explore usage of new device_attrs endpoints in the Api library

@thomluther
Copy link
Owner

The 2.5.0 beta is available in the main branch.
You can update via the Action install update and selecting the Anker Solix update entity. For the version you need to specify 'main' as tag for the main branch.
Note: After installation and restart, HA will continue to report a repair action since it believes the available release version is newer than the installed 'main' version. Simple ignore that until the 2.5.0 has been released.
If you have any findings with the beta, please let me know. I don't plan code changes anymore, only documentation updates prior release next week.

@thomluther
Copy link
Owner

thomluther commented Feb 6, 2025

Here is an example extract of the SB2 AC fields from the Api cache.
New are the Inverter fields for Power and Limit. I saw another system that reported 800 W limit, but this one reports 0 W limit.
I wonder whether inverter fields do NOT refer to the internal inverter (since that is available also in other SB2 models and not used there), but they refer to the 'external' inverter that is plugged into the AC socket. So that 'inverter' power would be additional 'Solar' power coming from an external PV system and accumulates to the PV Channel power into the Solar Power of the device....
It looks like PV1 + PV2 + Inverter power is the Solar Power...
The would also explain why inverter limit can be different, e.g. 0 W is not limiting external inverter, but anything else is limiting it?

================================================================================
System         : Hammeke Base  (Site ID: ###masked###)
Type ID        : 11 (Solarbank)          Device models  : A17C2,A17X7
Cloud-Updated  : 2025-02-06 15:22:06     Valid Data     : YES (Requeries: 0)
SOC total      :   10 %                  Dischrg Pwr Tot:    0 W
Solar  Pwr Tot :   50 W                  Battery Pwr Tot:    0 W
Output Pwr Tot :   50 W                  Home Load Tot  :    0 W
Active Mode    : Smartmeter (1)          Heating        : OFF
Offgrid Alert  : OFF                     Inv. Pwr Exceed: OFF
--------------------------------------------------------------------------------
Device [A17C2] : Solarbank 2 E1600 AC    Alias          : Solarbank 2 E1600 AC
Serialnumber   : ###masked###            Admin          : NO
Wifi SSID      :                        
Wifi state     : Unknown                 Signal         :  --- % (--- dBm)
SW Version     : Unknown (Unknown)       Auto-Upgrade   : Unknown (OTA Unknown)
Cloud Status   : online                  Status code    : 1
Charge Status  : detection               Status code    : 0
State Of Charge:   10 %                  Min SOC        :   -- %
Battery Energy :  160 Wh                 Capacity       : 1600 Wh
Exp. Batteries :    0 Pcs                AC socket      :    0 W
Solar Power    :   50 W                  Output Power   :   50 W
Solar Ch_1     :   13 W                  Solar Ch_2     :   11 W
Other Input    :    0 W                  Heating Power  :    0 W
Inverter Power :   26 W                  Grid to Battery:    0 W
Inverter Limit :    0 W                  Low Limit      :    0 W
Battery charge :    0 W                 
Battery Power  :    0 W                  Device Preset  :    0 W
Home Demand    :  317 W                  SB Home Load   :    0 W  (-)
Smart Plugs    :  --- W                  Other (Plan)   :  317 W
Schedule  (Now): 15:25:18 UTC +0100      System Preset  :    0 W
--------------------------------------------------------------------------------
Device [A17X7] : Smart Meter             Alias          : Smart Meter
Serialnumber   : ###masked###            Admin          : NO
Wifi SSID      :                        
Wifi state     : Unknown                 Signal         :  --- % (--- dBm)
SW Version     : Unknown (Unknown)       Auto-Upgrade   : Unknown (OTA Unknown)
Cloud Status   : online                  Status code    : 1
Grid Status    : ok                      Status code    : 0
Grid Import    :  267 W                  Grid Export    :    0 W
================================================================================

@thomluther
Copy link
Owner

@stelzerroland
The 2.5.0 beta is available in the main branch.
You can update via the Action install update and selecting the Anker Solix update entity. For the version you need to specify 'main' as tag for the main branch.
Note: After installation and restart, HA will continue to report a repair action since it believes the available release version is newer than the installed 'main' version. Simple ignore that until the 2.5.0 has been released.
If you have any findings with the beta, please let me know. I don't plan code changes anymore, only documentation updates prior release next week.

@stelzerroland
Copy link
Author

That's great news, thank you!!! I'm on holidays right now, but I'll try it out as soon as I'm back home.

@distanzcheck
Copy link

The output limit can be set to 600 and 800 watts.

@thomluther
Copy link
Owner

The output limit can be set to 600 and 800 watts.

Correct, but is this the setting that will be presented in the Cloud value for Inverter limit?
Or is that value what is being applied to the external inverter as a limit (=>AC Input limit)?

@distanzcheck
Copy link

This is the setting for the AC appliance output 600 or 800 watts. AC Output limit,

@distanzcheck
Copy link

distanzcheck commented Feb 7, 2025

Image

Is it already possible to test 2.5.0? And if so, what do I have to do?
(In German would be better because then without translator).

@thomluther
Copy link
Owner

thomluther commented Feb 7, 2025

Is it already possible to test 2.5.0? And if so, what do I have to do?
(In German would be better because then without translator).

Please see former post

This is the setting for the AC appliance output 600 or 800 watts. AC Output limit,

From an App perspective yes, but from the cloud value perspective I'm not sure what this field represents, because it also showed 0 W on systems. An you cannot set 0 W in the App, or maybe the field was not used by the system.
I'm just telling that all cloud inverter fields could be related to the 'external' inverter that is connected to the AC input.

Otherwise it is not explainable how these values fit together:

Solar Power    :   50 W                  Output Power   :   50 W
Solar Ch_1     :   13 W                  Solar Ch_2     :   11 W
Other Input    :    0 W                  Heating Power  :    0 W
Inverter Power :   26 W                  Grid to Battery:    0 W
Inverter Limit :    0 W                  Low Limit      :    0 W

Solar power shows 50 W, but PW 1 + 2 only 24. So Inverter power must be the external inverter power 26 W going into the AC as well and counts towards the overall Solar Power of 50 W = 24 W internal plus 26 W external.
So 50 W incoming in total and all is bypassed to output of 50 W (No charge or discharge)

@distanzcheck
Copy link

About which action Update ? Where can I find it so that I can get the 2.5.0 ?

There is also a so-called 0Watt switch from Anker see link https://www.ankersolix.com/de/products/a17y0
Other Input could be AC Solarbank charge

@thomluther
Copy link
Owner

About which action Update ? Where can I find it so that I can get the 2.5.0 ?

Image

There is also a so-called 0Watt switch from Anker see link https://www.ankersolix.com/de/products/a17y0

This has nothing to do with AC model, that 0 W switch is only for SB1 and it does not report any values

Other Input could be AC Solarbank charge

That is a separate new field for AC model, shown as Grid to Battery: 0 W

@distanzcheck
Copy link

distanzcheck commented Feb 7, 2025

Are you on Discord ? We could write in German, which would be much easier for me. I think I've managed that now with the update. I would never have thought of that.

The update has worked and the correct battery charge is now also displayed and how many additional batteries are connected. If you still need values, please get in touch. I have only connected the Solarbak to AC, the inverters are connected directly to the grid in the garage. So the connection is only via the 230V grid. I have also registered a Shelly Pro 3EM in the SB AC.

@distanzcheck
Copy link

distanzcheck commented Feb 7, 2025

Unfortunately, the correct charge status of the batteries and how many additional batteries are connected is reset to <1600 Wh and A additional batteries to 0 after a short time. Only a restart of HA solves the problem.

Update:
Correction: I have to log in once with my main account in the app, then the data is correct again for a few minutes!

@thomluther
Copy link
Owner

Actually that was an issue only at the beginning of SB2. You can invite my account [email protected] to your system, then I can maybe check it later.

@distanzcheck
Copy link

Now nothing works with Anker in HA.
Setup error: Retries exceeded: (100053) Anker Api Error: Please try again in 24 hours.

@thomluther
Copy link
Owner

You got an IP ban. Probably switched too often between accounts and devices, causing more than 10 login errors due to deleted account token...
You can try reconnect you DSL router to get a new IP, then it works again

@thomluther
Copy link
Owner

Here is another example, showing also heating flag and power (first time I saw this used)

================================================================================
System         : Hammeke Base  (Site ID: ###masked###)
Type ID        : 11 (Solarbank)          Device models  : A17C2,A17X7
Cloud-Updated  : 2025-02-08 10:59:01     Valid Data     : YES (Requeries: 0)
SOC total      :   21 %                  Dischrg Pwr Tot:    0 W
Solar  Pwr Tot :  586 W                  Battery Pwr Tot:  481 W
Output Pwr Tot :    0 W                  Home Load Tot  :    0 W
Active Mode    : Smartmeter (1)          Heating        : ON
Offgrid Alert  : OFF                     Inv. Pwr Exceed: OFF
--------------------------------------------------------------------------------
Device [A17C2] : Solarbank 2 E1600 AC    Alias          : Solarbank 2 E1600 AC
Serialnumber   : ###masked###            Admin          : NO
Wifi SSID      :                        
Wifi state     : Unknown                 Signal         :  --- % (--- dBm)
SW Version     : Unknown (Unknown)       Auto-Upgrade   : Unknown (OTA Unknown)
Cloud Status   : online                  Status code    : 1
Charge Status  : detection               Status code    : 0
State Of Charge:   21 %                  Min SOC        :   -- %
Battery Energy :  672 Wh                 Capacity       : 3200 Wh
Exp. Batteries :    1 Pcs                AC socket      :    0 W
Solar Power    :  586 W                  Output Power   :    0 W
Solar Ch_1     :   37 W                  Solar Ch_2     :  189 W
Other Input    :    0 W                  Heating Power  :  105 W
Inverter Power :  360 W                  Grid to Battery:    0 W
Inverter Limit :  800 W                  Low Limit      :    0 W
Battery charge :  481 W                 
Battery Power  :  481 W                  Device Preset  :    0 W
Home Demand    :    0 W                  SB Home Load   :    0 W  
Smart Plugs    :  --- W                  Other (Plan)   :    0 W
Schedule  (Now): 10:58:59 UTC +0100      System Preset  :    0 W
================================================================================

So PV1 + PV2 + external inverter power => Solar Power
That means now when the heating power field is used, the Solar Power is really every input power.
Substracting the Heating power from Solar power then gives also the correct Charge power

@stelzerroland
Copy link
Author

stelzerroland commented Feb 9, 2025

First of all, huge thanks for your amazing work on this integration! 🙌

I’ve been using the integration successfully, but I ran into an issue:

  • At first, everything worked fine, including reading values and setting number.solarbank_2_e1600_ac_system_einspeisevorgabe.
  • Then, I got the error: "Retries exceeded: (100053) Anker Api Error: Please try again in 24 hours."
  • After waiting a day, I can now read all values again, but I can no longer set number.solarbank_2_e1600_ac_system_einspeisevorgabe.
  • There is no error message, but the new value does not get applied to the Solarbank (seonsor.solarbank_2_e1600_ac_einspeisevorgabe stays unchanged in Home Assistant).

Do you have any idea what might be causing this?

Thanks again for your great work, and I really appreciate any help! 😊

@thomluther
Copy link
Owner

Do you have any idea what might be causing this?

No, unfortunately not. I saw the same on the other AC that I can access and have no idea why the system does not apply the change.
When you open the App afterwards, it just says the previous configuration was not completed and you have to confirm the mode change again.
So I assume either a paramter is missing (but I don't know which that should be). There is also a command number which always was 17. Maybe the AC needs a different number, but I'm not going to test that on other systems.

So that is something you have to find out. Eventually there is another Api call required on top which I dont know (and which might be the reason why the App tells the configuration was not completed....
You would have to sniff the network of the App to see which Api endpoints are called when you do such changes. I have no capability or knowledge to test/debug this.

Once someone can tell me what to do via the Api, I can implement so. But so long, I guess manual preset with the AC is not working...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants