Yes. As far as I know at least.
Hi all,
I have the SUN2000-10KTL-M1 installed, in combination with the SDongle.
I used this integration the passed year and it was very stable and useful.
I recently purchased a Flexbox from Lifepowr (only used in Belgium), which is a system that will dynamically charge/discharge my battery. It checks variables as projected sun hours and cost of electricity and can then make decisions on what is best.
For this system to work, it needs to read from the Huawei Inverter. This connection is now using the modbus connection through the SDongle. I needed to disable the HA Huawei integration for it to work.
This confirms that multiple systems cannot read modbus from a single Inverter. I created a ticket for this, and it was also confirmed by Huawei support.
I am now looking for a way to still get the Huawei Solar info into my HA.
Does anybody have any experience with this? It would be grately appreciated.
Some scenarios to maybe research are:
- using Sdongle Modbus for Flexbox and try Internal AP connection with HA.
- using Sdongle Modbus for Flexbox and try RS485 connection with HA.
On Wlcrsās github it states that this causes unstability, but maybe this was the case with
older firmwares ?
I would look into running a Modbus proxy like GitHub - Akulatraxas/ha-modbusproxy: Hassio Addon packaging modus-proxy and connecting both the integration and your 3rd party device through there. That way you have only one Modbus connection with the inverter.
I currently trying to use this integration and I am facing same issue as @MirceaD above. Was wondering whether anyone has found a solution or whether @MirceaD managed to solve the issue.
Add double quotes to the ābelowā and remove the value_template.
below: "50"
Iām wanting to make use of capacity control so that I never pull more than 4kW from the grid (we have a tarif which limits us to this, any more and the power meter will cut our power!).
Iād also like to take advantage of periods of cheap power overnight, to charge the battery and flatten our usage curve (and minimise our electricity bill!).
My question is if I set a capacity control period for 24/7 with a limit of 3900W, can I also let the battery charge with a limit of 4kW and trust the inverter to keep the total power drawn from the grid to the limit of 3900W?
In testing so far, this doesnāt seem to have worked, but I wondered if others have had better luck.
Also, does anyone know how to properly pass multiple lines into the set_tou_periods service? Iāve tried a variety of formats but Iām struggling!
service: huawei_solar.set_tou_periods
data:
periods: 00:00-01:59/1234567/-
periods: 02:00-04:59/1234567/+
periods: 05:00-23:59/1234567/-
device-id: c462283aeff083125abdba712ee38510
After upgrade to release 1.2.4 my Huawei Solar integration stopped working.
It says āFailed to Connectā.
I am accessing to the inverter (SUN2000-5KTL-L1) via wifi without dongle. I have tried with ports 502 and 6607 but no success. I have activated (I guess) the O&M option in the Conection to Router Setting page of the Fusion Solar Application. No success.
I have power off and power on the inverter, no success.
I donāt know what to do. Any ideas please?
same for me, fw 125, O&M activated, no success connecting to the inverter wifi (not the 200.1 one)
Thanks, that has done the trick. Itās frustrating when the UI canāt create an automation properly!
Not had an issue here, no changes to the ports should have happened with a version update. Can you ping the IP of the inverter? 192.168.100.1 by default, I think.
I find a reboot can sometimes cause the wifi to lose connection, so best to start with the basics!
Today, our electricity provider needed to stop the main in our small countryside area. I decided to take the opportunity to try the āOff Gridā mode of the inverter (yes, I did carefully switch off our connection to the provider before doing anything).
I tested this for a short period of time (worked fine) but I noticed that while the Huawei App (connected to the inverterās wifi) continued to work flawlessly, the home-assistant integration fails when the inverter is working in āOff Gridā modeā¦ I activated the debug mode on the log, I assume that some ModBus registers have unexpected values and the process fails overall. The integration it self display āCould not update HV20A0038813 valuesā. Here is what the log showed, repeatedly (each time the integration tries to start over):
2023-02-14 12:50:40.791 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 43006
2023-02-14 12:50:40.914 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 47000
2023-02-14 12:50:41.037 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 30000
2023-02-14 12:50:41.203 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 30071
2023-02-14 12:50:41.384 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37200
2023-02-14 12:50:41.510 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37100
2023-02-14 12:50:41.633 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 47000
2023-02-14 12:50:41.756 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 47089
2023-02-14 12:50:42.026 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 47954
2023-02-14 12:50:42.181 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
and then it stopsā¦ but all sensors report āunavailableā. Restarting the integration produces the exact same behavior.
I donāt expect to use my inverter in this mode, but it would be nice to have the integration work even in such ādegradedā mode.
AFAIK the inverter forcibly closes the Modbus connection after a few seconds when in Off-grid mode. The integration is thus unable to poll all the Modbus registers to update the state of the sensors in HA. It will periodically retry to connect and request all the necessary registers.
Until such a polling is successful, the correct state for each sensor is āUnavailableā: the integration is unable to communicate with the inverter and cannot establish the latest values. This can be caused by network problems, the inverter being off-grid, etc. No way of knowing what exactly causes the problems.
Thanks Thijs your the super quick reaction.
I will possibly try one of these days (using your huawei-solver python package :-)). I would tend to think the ModBus connection is still alive. The HA extension does say it read registersā¦ and then gets stuck. What I suspect is that some registers become unaccessible/generate error. If we could identify which ones are off, it would probably remain possible to keep updating the remaining measures. Well, thatās only weird guesses.
I will report if/when I try this.
Thomas
Couldnāt resist having a look. In off-grid mode, I looked into my Modbus RTU-to-TCP bridge statistics, and both the sent/received serial frames/byte count do increase. So, I tried the simple python code below (adapted from the README.md of the python package)
from huawei_solar import AsyncHuaweiSolar, register_names as rn
import asyncio
slave_id = 1
async def readfew():
client = await AsyncHuaweiSolar.create("192.168.xxx.xxxx", 8899, slave_id)
result = await client.get(rn.NB_PV_STRINGS, slave_id)
print("Number of PV strings: ", result.value)
results = await client.get_multiple([rn.LINE_VOLTAGE_A_B, rn.LINE_VOLTAGE_B_C, rn.LINE_VOLTAGE_C_A], slave_id)
print("A-B voltage: ", results[0].value)
print("B-C voltage: ", results[1].value)
print("C-A voltage: ", results[2].value)
asyncio.run(readfew())
And it does produce meaningful results:
Number of PV strings: 2
A-B voltage: 230.0
B-C voltage: 0.0
C-A voltage: 0.0
So, ModBus is working fine. If there is anything else I should try, just tell me.
@wlcrs I added some optimizers to my inverters and want to change config to also scan the optimizers. What is the proper way to do it in order to not loose all configuration I have done?
Want to remind you that I have 3 separate inverters so 3 separate instances of huawei-solar.
edit: never mind, just saw that optimizers were detected automatically after restarting integration. I didnāt expect that!
I tried the āhigh-levelā bridge interface:
from huawei_solar import HuaweiSolarBridge
import asyncio
async def highlevel():
bridge = await HuaweiSolarBridge.create(host="192.168.xxx.xxx", port=8899,slave_id = 1)
print(await bridge.update())
asyncio.run(highlevel())
and I just get:
Modbus client is not connected to the inverter.
NoneType: None
So, I imagine one of the āfailsafeā tests in the high-level layer of huawei-solar is too requiring.
I have experienced similar behavior and I use tcp modbus connection with dongle (port 502). I thought the problem was that the digital meter does not work (goes offline) when grid is off. But probably there are more issues. It would be great to fix this and see details when in off-grid mode.
Thanks, Panagiotis. Yes, the power meter effectively reports itās not there.
(await client.get(rn.METER_STATUS, slave_id)).value == rv.MeterStatus.NORMAL
does returns False
.
Thijs, I have identified at least one cause of the issue: in the āINVERTER_REGISTERSā list, the entry rn.DEVICE_STATUS generates an error:
Traceback (most recent call last):
File āhuawei_solar/registers.pyā, line 92, in decode
result = self.unit[result]
Looking into DEVICE_STATUS_DEFINITIONS in register_values.py, there is no match for the returned code. I went to the modbus reference manual I mentioned above and there is a missing code in the DEVICE_STATUS_DEFINITIONS dictionary for off-grid mode.
I tried to submit a tiny merge request on GitLab
And changing this on the home assistant installed huawei_solar package does solve all issues: the extension now works in off-grid modeā¦
Hi Thomas,
Thank you for debugging this issue. Iāve never seen that stack trace showing the root issue before.
Iāve merged your request in the huawei-solar library and will do a proper release later this week.