Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[Bug]: Battery wont charge - Caused by Huawei Dongle being present. #115

Closed
JohnMcLear opened this issue Aug 21, 2022 · 19 comments
Closed
Labels
bug Something isn't working

Comments

@JohnMcLear
Copy link
Contributor

System Health details

System Information

version core-2022.8.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.5
os_name Linux
os_version 5.15.55
arch aarch64
timezone Europe/London
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4778
Installed Version 1.26.2
Stage running
Available Repositories 1097
Downloaded Repositories 10
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 8.4
update_channel stable
supervisor_version supervisor-2022.08.3
agent_version 1.2.1
docker_version 20.10.14
disk_total 113.9 GB
disk_used 78.3 GB
healthy true
supported true
board odroid-n2
supervisor_api ok
version_api ok
installed_addons File editor (5.3.3), MariaDB (2.5.1), Let's Encrypt (4.12.6), Check Home Assistant configuration (3.11.0), Terminal & SSH (9.6.0), Zigbee2MQTT (1.27.0-1), Log Viewer (0.14.0), Mosquitto broker (6.1.2), ESPHome (2022.8.0)
Dashboards
dashboards 1
resources 1
views 7
mode storage
Recorder
oldest_recorder_run 12 July 2022 at 12:41
current_recorder_run 21 August 2022 at 19:01
estimated_db_size 7885.02 MiB
database_engine sqlite
database_version 3.38.5
Sonoff
version 3.1.0 (3871c0b)
cloud_online 43 / 183
local_online 1 / 1

Huawei Solar Setup

SDongle, Network @ 192

Describe the issue

First of, having the option to modify battery charging is amazing, thank you!

  1. When Battery Forcible charge power is changed the Logbook isn't updated. Is this expected UX? It makes it look as if the inputs aren't working. Numeric increments also do not update the Logbook. Selects and Checkboxes of other values do update the Logbook.
  2. When Battery Forcible charge power is changed the value doesn't appear to have any impact on actual charging of the battery.
  3. Thanks again!

Relevant debug logs

Logger: pymodbus.client.asynchronous.async_io
Source: /usr/local/lib/python3.10/site-packages/pymodbus/client/asynchronous/async_io/__init__.py:307
First occurred: 19:04:16 (70 occurrences)
Last logged: 19:16:44

    Failed to connect: Multiple exceptions: [Errno 111] Connect call failed ('::1', 502, 0, 0), [Errno 111] Connect call failed ('127.0.0.1', 502)
    Failed to connect: [Errno 111] Connect call failed ('10.0.0.106', 6607)
    Failed to connect: Multiple exceptions: [Errno 111] Connect call failed ('::1', 6607, 0, 0), [Errno 111] Connect call failed ('127.0.0.1', 6607)
    Failed to connect: [Errno 111] Connect call failed ('10.0.0.182', 6607)
    Failed to connect: Multiple exceptions: [Errno 111] Connect call failed ('10.0.0.134', 6607), [Errno 111] Connect call failed ('fdd2:b8b:5577::9bb', 6607, 0, 0)
@JohnMcLear JohnMcLear added the bug Something isn't working label Aug 21, 2022
@wlcrs
Copy link
Owner

wlcrs commented Aug 21, 2022 via email

@JohnMcLear
Copy link
Contributor Author

JohnMcLear commented Aug 21, 2022

Yea, but I'm not sure it would improve things. I like having the values visible so I can see their entity IDs 📦 I could 100% live with that change though!

Interestingly though calling from service was exactly what I did as a debug step to ensure the values are updated and while doing the call from service did work and the number did update, it was not reflected in Logbook or the Inverter hardware.

@dklemm
Copy link

dklemm commented Aug 24, 2022

I just wanted to let you know something I observered today related to this change.

I force charged my battery a few days ago, I think I used time based. Tonight my battery went to 0%, at this point it started to pull 1kw from the grid. Checking the settings it wa still mode: "Max self consumption", "Charge from grid" : true, and Forcible charge power : 1000w.

Toggling "Charge from grid" off then on seam to resolve. I was just a supprised this happened, I wonder if froce charge mode was still active and calling stop charge would have also had the same effect.

@wlcrs
Copy link
Owner

wlcrs commented Aug 25, 2022

@dklemm I'm not intimately familiar with what really happens when you start a force charge/discharge. I observed the behavior for a couple of minutes and documented that.

I haven't been actively using it myself, even though I started developing this integration in the first place because I wanted to actively manipulate my battery. However, preliminary results showed that the constant term of the inverter losses are just too big to bother with it, leading to round trip losses of >40% 😞

@dklemm
Copy link

dklemm commented Aug 25, 2022

40% thats really dissapointing. Its still benifical for me in the winter with my peak tarrif being 6 times more expensive.

At the moment I'm just using force charge to avoid using the battery off-peak , so I just trickle charge it at 100w. I do wonder if the losses are are greater using fast charge. My intention is to dynamily set the charge wattage and time to match my off-peak so the battery is charging at the lowest wattage for the full off-peak period rather than maxing it out.

@JohnMcLear
Copy link
Contributor Author

One thing we should document is that Battery Charging is a positive value and Discharging is a negative. It's obvious for the most part but worth documenting.

I gave up with trying to manage the settings using the integration and switched to using the smart meter provided by Huawei but I'm happy to keep trying to figure things out if it's useful to @wlcrs

@wlcrs
Copy link
Owner

wlcrs commented Aug 26, 2022

Thank you for your feedback.

What solution from Huawei did you switch to? I'm not sure by what you're referring to with "smart meter provided by Huawei"?

@JohnMcLear
Copy link
Contributor Author

Sorry I wasn't thorough. I'm using the DSU6664-H: https://support.huawei.com/enterprise/en/doc/EDOC1100020896

This "Smart Power Sensor" sends the usage of my load and what I'm sending to the grid and it's supposed to ensure the battery is filled up prior to sending back to the grid. It doesn't seem to be working properly though which is not ideal. In general I'm finding the comms to my battery being very unreliable, I doubt it's related to this integration though. I think it makes sense for me to make the "official method" stable then look to see if I can drop the official method and used to something more integration/software based.

@wlcrs
Copy link
Owner

wlcrs commented Aug 26, 2022

Ok, I assumed that every installation of a SUN2000+battery would always have such a "Smart Power Sensor" installed by default. That was why I thought you were referring to something else.

I initially had problems with my installation because:

  • for one of my phases the blue/white wires were connected to my DTSU-666H the wrong way;
  • for another of my phases the clamp was installed in the wrong direction

(Did the installer notice that he made an error installing the clamp and try to correct this by switching the wiring, alas doing it that on the wrong phase? I'll never know).

Also: the battery does not react instantaneously to spiky energy usage. I frequently see it lagging behind for a few seconds, for instance when I'm preparing a coffee with my bean machine.

@JohnMcLear
Copy link
Contributor Author

Ok, I assumed that every installation of a SUN2000+battery would always have such a "Smart Power Sensor" installed by default. That was why I thought you were referring to something else.

Yea, that makes sense. The problem is that the lead time on these is 6 months now so we might see some people installing other CT Clamps/energy usage sensors that tie into HA (IE Emporia) which could show "consumption" and more importantly, if feeding energy to the grid and battery is < 100% then you could have an automation to change the inverter to feed into the battery instead of the grid.

I only have a single phase and I triple checked the CT Clamp. This is the output of "Smart Meter > Active power".

Active Power

image

You can see I get a negative value over night when the solar is not providing any power. You can see I get a positive value in the day. This is expected.

You can see below that I get a large amount of energy exported to the grid despite the inverter being on "maximum-self-consumption" and the battery having an SOC of 2%.

Export

image

SOC

image

  1. Can you confirm that "Power Meter > Active Power" shows positive for you if you are exporting to the grid?
  2. Any thoughts where to check RE SOC / Lack of charging? I'm doing a force charge now just to see if keeping a higher minimum SOC will help.

@wlcrs
Copy link
Owner

wlcrs commented Aug 26, 2022

Yesterday my battery was depleted around 06:40 and fully charged again around 13:45:

image

image
image

Not a lot of suggestions I can make: check if you didn't change the regular "Battery maximum charging power" and "Battery maximum discharging power" settings? These are set to 2500W for my 5kWh battery in my case. Otherwise: contact your installer or Huawei for support.

@JohnMcLear
Copy link
Contributor Author

I'm the installer 📦, I'll keep grinding at it, I'm sure I'll get somewhere soon!

@JohnMcLear
Copy link
Contributor Author

JohnMcLear commented Aug 26, 2022

Oh just one final question (actually two).

  1. How often is your Battery State of Capacity updating?! For me it's like once every two hours or something really slow...
    It looks like yours is every 5 minutes or so...
  2. Are you RS485 or over TCP?

@wlcrs
Copy link
Owner

wlcrs commented Aug 26, 2022

  1. The SoC is reported in whole numbers. So the interval between changes depends on how fast the 50Wh has been drawn from/pushed into the battery.

  2. I personally use ModbusTCP via the SUN2000-<serial no> WiFi broadcasted by the inverter. I don't have a dongle.

@JohnMcLear
Copy link
Contributor Author

  1. Ack, thanks!
  2. I'm using a similar method but I also have a dongle. I assume without the dongle you can't use the official Huawei Fusion Web User Interface? I'm tempted to remove the dongle and restart the Inverter to see if the behavior changes because it does feel like many hands are interfering and I want HA to be priority..

@JohnMcLear
Copy link
Contributor Author

FWIW I disconnected the dongle about 30 mins ago so I'll monitor performance tomorrow and provide more information to this issue then. It's somewhat off-piste but it gives context at least...

@JohnMcLear
Copy link
Contributor Author

Disconnecting the dongle appears to be working... I'm going to monitor for 3-5 days and see if the results are correct then I can look to see if the changes here are taking effect.

@JohnMcLear
Copy link
Contributor Author

Further update, disconnecting the dongle is working and the battery is function very well..

image

I'm happy and confident it's working so my next step will be re-introducing the dongle to see if this issue is related to some sort of Fusion management conflict.

@JohnMcLear
Copy link
Contributor Author

JohnMcLear commented Sep 5, 2022

100% confirmed fitting the dongle causes an issue. This issue is resolved by removing the dongle and rebooting the inverter.

image

At ~14:30 I plugged in the dongle which forced a discharge (no obvious reason).
At ~15:40 I unplugged the dongle.
At ~15:53 I rebooted the inverter.

So..

  1. Any idea why the dongle/fusion management system might cause issues?
  2. Any idea how to ensure my devices firmware are up to date given that I don't have access to the fusion portal?

@JohnMcLear JohnMcLear changed the title [Bug]: Battery Forcible charge power UX and functionality. [Bug]: Battery wont charge - Caused by Huawei Dongle being present. Sep 5, 2022
Repository owner locked and limited conversation to collaborators Sep 5, 2022
@wlcrs wlcrs converted this issue into discussion #129 Sep 5, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants