-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add Support for AC model and Usage Mode: Backup Power #175
Comments
Hi, yes lots of various Api exports are needed to get all the new structures supported by AC model. Support for new features will require you to use newer versions of Api library for testing against your system and maybe re-run exports or test individual Api methods with the system before they can be added to the HA integration. Please have a look to the libary and the solarbank fields issue that is tracked there. Any exports can be uploaded there. |
Here is another library issue to track your request. |
@Vehekk did you create already an export from your SB2 AC in HA when using your main account? |
@thomluther not yet, i'm currently not able to access my system while on a work trip. Will report more information and possible a export next week. |
To my knowledge if you use Anker Smart Meter, then Anker SB2 AC automatically charge the battery with the power which otherwise goes to the grid. |
That makes sense of course. |
It's not working that well if you have several systems on different phases. A single E1600 "site" will take the entire meter; even if you could share it between devices you would not be able to balance across systems or return 800W per phase. The only thing you could do was adding one Anker power meter per inverter 👏👏👏. I'm happy to have one set of current transformers in the restricted space... The more flexible solution would be using a Shelly 3EM which is not yet supported by Anker for the E1600 AC. Right now it would be nice if the "System Einspeisevorgabe" slider was working with the current E1600 AC firmware instead of returning to 0. Unless Anker is adding another API variable to specify a charging rate (right now all you can do is turning on emergency mode which will cause the E1600 AC to suck as much energy as it can get from all bodily openings it has including the grid-directed inverter) this system will be not that useful as energy storage controlled by Home Assistant. |
Would full access to a system be useful? Right now mine is sitting in a corner collecting dust, waiting for Anker to integrate Shelly power meters. I'm going to reuse its batteries for an E1600 Pro so it's not that bad but right now it's a brick sitting in my guest room. |
If I get full Owner access to a AC System that might help testing against the API. But I cannot do anything before mid Jan. |
Let's return to it then. There seem to be a few more problems with the way the integration is using the API which is (as far as I have understood the support's replies) going to change with the next firmware release (which might "take a few weeks"). While the Anker app is always correctly reporting the charge level of the whole system the integration is reporting the charge of the inverter's built-in battery most of the time and I don't see any bug that would cause this in the source. And even the Anker app can't get the additional BP1600s to charge in "emergency mode"; if the built-in batteries are full the inverter is pulling 1.1kW from the grid and sending it into nowhere. 🤦 |
The Screenshot you show is a calculated entity by the library, based on battery packs and SOC. If that goes down to main device in between then the response may show no installed battery packs for any reason. You need to double check if battery pack count remains stable. If it does, there may be another bug in the library for new AC device type. |
@noseshimself actually I'm not sure how you can give me Owner access to your system, since you have to use an Anker account with password to create an owning system with your BT connected AC device. |
Relatively easy: I'll change the password and provide you with the credentials to it.. If you blow it up Anker will have to explain that to me. If you burn the house down I'll have an interesting discussion with the insurance. Right now it's completely useless to me; I can't even get it to return energy from the batteries any more -- it's resetting the output to 0 every time I use the slider. It's still not possible to connect the Shelly meter to the device either. I'm close to using it as just another PV system and get an SMA Sunny Boy Storage instead. More expensive but the software is doing everything in the manual. |
You can send me the credentials to [email protected]. If you have another account, you can share the system first with that account, then you can continue monitoring with shared account at least while I may utilizing the main account for Api work. Since I have no validation of what is really happening with the device (AC output or AC charge), I can only trust the values in the App/Api. I'm not going to stress it to the upper limit, but maybe testing the lower limits for AC output and AC charging... |
Sorry, no panels and I had to borrow one of the batteries now. The device is connected to grid power using its output connector (which will become an input in emergency mode). Anker told me NOT to connect the inverter input/emergency output to grid power; it might work but has no limiter in front of it, expecting that input can't exceed 800W. |
@noseshimself, if you send me your AC system account credentials to previous mail I can start looking into some Api queries. |
@noseshimself, @yhammeke, @Vehekk, |
I already sent you the account credentials to [email protected]. if you did not receive them I can resend them. |
That is weird, the email is correct but I have not received anything. Please resend it and you may also try to invite that email as member to your system. Then I also should receive an invite for shared access with my account, which I must test as well for possible monitoring capabilities without using owner account. |
Gargle isn't. I can't fix it right now and refuse to jump through hoops for them. I used an alternative way to provide the credentials. |
I got your system invitation and your file share invitation. Forget the access request I sent you, it was with my other google account. |
Hi @noseshimself, I created now a Tarifplan on your system to see how I can get and modify such a plan via Api. The other unknown thing is the Use Time mode. This can only be enabled when a Smartmeter is in the system. Can you add your Smartmeter into the system? You may need to update firmware if this is not working yet. Request this from Support if not provided automatically. |
I still can't. There is only sufficient space for one set of CTs and this has been filled by the Shelly 3EM. Which any other E1600 EXCEPT the AC can use. And there is no firmware yet (I'm annoying the Anker support about once a week). |
OK, To my knowledge, the 1.0.3.x FW will support same Smartmeters with the AC as with the other SB2 models. I haven't seen good documentation from Anker about how to configure such a meaningful tarif plan for Usage Time mode... Nevertheless, with the example plan I created on your system, I have now the structure and can translate all codes that are used in the plan. What I still miss is the integer code for the activated Usage Time mode. 1-3 are already used for the other modes, so could be 4 but Anker is so inconsistent in the Api that it could also be 99 |
BTW, the manual backup power is no separate usage mode, but seems to be an 'Option' only. |
Thx Thom for your effort!!! So Not so mamy API calls are needed. |
If I implement support for the very complex use time plan, I must support all possible options like for other schedule plan. That covers individual setting changes via entity for current interval (or create a valid default interval with defaults for all other required values not touched by the entity), and actions that allow to specify multiple fields at once, but also optionally. If Anker thinks a manual Plan is a useful implementation to support dynamic tariffs, I'm not going to improve that. |
I finally got it, and actually it is different as expected. While a member can see the 'normal' active mode (because the usage code is given in the scene_info Api response), this code does not change when backup interval starts...The member just can see the active mode, e.g. Smart Meter mode, but the solarbank may do AC charge from Grid with 1200 W because backup mode is used!!! Another general App limitation is during the use_time mode: You cannot recognize easily which tariff is actually in use without going into the plan looking at current time definition. |
I ran into other issues when trying to modify the usage code or something in the plan. The new schedule was accepted via Api, but was not applied (remained unchanged). When I went back to App as owner, I always got the message that previous setup was not completed, and I had to confirm again the usage mode setting to complete it. In other words, support for use time plan in the AC model is not going to come any time soon... |
Actually this statement may be wrong. Review of some exports shows a scene_mode number in scene info response. That seems to reflect the active usage mode number set in the schedule. But this also seems to show the missing 4 when the backup mode is running. For whatever reason this mode is not temporarily reflected in the schedule object... So why did I not see the active backup mode in the App as member? |
More testing showed that backup mode can be enabled and disabled via Api. The caveat is that it may take up to 5 minutes until the change is reflected in the Api response. However, the system itself reacts in few seconds if the backup mode is activated. |
To control backup mode with single Api call but multiple entities I plan to do following:
The only limitation with this approach is that background device detail run updates may reset the datetime changes. But that should be rare since only every 10 minutes by default, or when other schedule services are used by automations. |
I have seen this user interface bug in the APP too, whenever I switch from member to admin account. |
So it is Not independent of doing schedule changes via Api? |
I noticed that the App toggles the site price to use_plan automatically when Use Time mode is activated. The 2.5.0 beta is available in the main branch. Please report if the output power changes are accepted in your AC devices when manual power mode is active. Maybe there is still more investigation required by the community on what Api calls are done by the App when changing the AC usage modes... For convenience, the intergration allows to enable the backup mode immediately when switching to this mode or when enabling the backup switch entity...It will start now and run for an hour, which is typically enough to charge 1 battery by ~60%. If it is more convenient, the 1 hour backup duration could be increased to 2 hours per default, which should be sufficient to fully charge one battery from 10% to 100%. Let me know what better fits to the usage behavior and how longer backup windows behave with the following:
|
For discussions on the new AC fields / entities, please refer to issue 198 |
I can confirm this. It automatically disables the backup mode once reaching 100%.
|
OK. So what it probably does is simply deactivating the backup switch once it reached 100%. Therefore no automatic reenabling. So what is the impression for a meaningful default duration when the backup mode is enabled in HA without manual adjustment of the backup times?
If it switches off automatically, it should not matter to default for a longer interval. I also assume >95 % SOC it will charge slower... |
Checklist
Is your feature request related to a problem? Please describe.
I'd like to use my SB2 AC as a addon-battery for my already existing solar plant on my roof. I don't have additional solar panels connected to the SB2 AC, i just want to be able to charge surplus energy coming from my roof to the SB2. Preferably, I'd like it automated, when HA detects that I have surplus energy so it automatically switches the SB2 mode to "backup power" and charges it through the outlet.
Describe the solution you'd like
I'd like to request to add the "backup power" mode to usage modes for the AC model..
Describe alternatives you've considered
manually changing the mode in anker app.
Additional context
Do you need any info or log from the SB2 AC?
The text was updated successfully, but these errors were encountered: