I’ve seen today the wlcrs integration in HACS. What is better to use?
Should I change to this integration?
And how do you do this card whith all this icons and lines? could you share?
Thanks Rafal
Sorted now. I moved away from the router approach.
I had a raspberry pi running Octopi near a network switch so I changed it to connect to lan via ethernet and inverter network on it’s wifi. Then setup the NAT on it which is working fine. Well it did once I remembered to enable nat in the kernel config.
So working fine with raspberry pi doing NAT to inverter ssid and latest firmware on the inverter.
I used the “sun2000” app on Android from Huawei market place
I think I used this guide:
In the above guide is also an email address to Huawei support where you can request firmware if you don’t have it, it only took a couple of hours before they sent it to me.
Yes of course, sorry for the delay with my answer.
Configuration of openwrt to act as bridge connecting to the inverter AP:
1 - Connect to the inverter as client. Here the configuration wireless connections, you must access with “Mode Client” to the inverter AP network:
Here I show two rules, with the modbus port 502 for the case old inverter firmware and other rule with the new modbus port 6607, depend on which version you have.
To connect the HA integration to the SUN2000L inverter to set as “host” the LAN IP of the openwrt router and the correct port depend on the version of the inverter firmware ( port 502 or 6607)
I am using TOU and have set a schedule that allows charge during the night and discharge during the entire day (excess PV output gos to the battery). I will check back with the results of this behaviour.
I have struggled to be able to make it 100% dynamic based on the automations…
UPDATE - It seems to work fine, as long as you are fine with limiting yourself to charge-from-grid only at nighttime and hence not discharge the battery at night
I have two questions:
What Operating mode are you using on the Luna in order to fully automate the discharge/charge based on energy prices?
Has anyone set up a card like https://github.com/reptilex/tesla-style-solar-power-card that shows the current energy flows similar to what is shown in the fusionSolar App? I would particularly be interested in a blueprint of Template sensors that can support the different entities in the card, such as generation_to_grid_entity.
As to your first question: it’s very dependent on the country/location where you live which Operating mode makes most sense. Many of us are still experimenting with what mode makes most (economical) sense
@wlcrs I’m having some issues with the latest beta release (1.0.0a3).
2022-03-02 10:05:22 INFO (MainThread) [pymodbus.client.asynchronous.async_io] Connected to 192.168.8.1:502.
2022-03-02 10:05:23 INFO (MainThread) [custom_components.huawei_solar.config_flow] Successfully connected to inverter SUN2000-6KTL-M0 with SN HV1970006XXX
2022-03-02 10:05:23 INFO (MainThread) [pymodbus.client.asynchronous.async_io] Protocol lost connection.
2022-03-02 10:05:23 INFO (MainThread) [pymodbus.client.asynchronous.async_io] Protocol made connection.
2022-03-02 10:05:23 INFO (MainThread) [pymodbus.client.asynchronous.async_io] Connected to 192.168.8.1:502.
2022-03-02 10:05:25 WARNING (MainThread) [homeassistant.config_entries] Config entry 'SUN2000-6KTL-M0' for huawei_solar integration not ready yet: Could not update HV1970006XXX v
alues: Got error while reading from register 37760 with length 28: Exception Response(131, 3, IllegalAddress); Retrying in background
2022-03-02 10:05:25 INFO (MainThread) [pymodbus.client.asynchronous.async_io] Protocol lost connection.
It looks like it tries to read the register for the battery soc, but I don’t have a battery.
Quick update on the calculation of the daily PV yield based on the numbers which can be retrieved from the integration/Modbus TCP:
I have been in contact with Huawei support on how to calculate the PV yield to match the numbers in Fusionsolar. They have confirmed that the formula
PV yield = daily yield from inverter + battery day charge – battery day discharge
is correct to calculate the PV yield as a raw figure. However, the calculation of the PV yield in Fusionsolar is slightly different, because they also include the energy consumed by the inverter. So the Fusionsolar formula is:
PV yield = daily yield from inverter + battery day charge – battery day discharge – energy absorbed by inverter
Based on this I tried to reverse engineer the Fusionsolar numbers and found the following: The closest I get to the Fusionsolar numbers is by using the formula and when the PV is producing energy (and only then!) subtracting approx. 0.11 kWh per hour for the energy consumption of the inverter. The energy consumption of the system when the PV is not producing, is already covered by the fact that the battery discharge number is typically higher than the increase of the daily yield from the inverter, resulting in a negative PV yield number. So those negative PV yield numbers are correct from a total energy produced/consumed point of view. Of course, if you don’t like to see the negative values then just set the result to 0 whenever the calculation leads to a negative number. This is also how it’s done in Fusionsolar.
If replicating the Fusionsolar numbers is not that important, then just use the first formula to get the raw numbers and then the inverter consumption (during the times when the PV is producing energy) will be included in your total energy consumption.
Is there a way to shutdown the inverter and its battery when the benefice to keep it “ON” is lower than to switch it OFF?
E.g. :
Battery empty at the end of the day will increase you net consumption until next day (8PM to 8AM = 12 * 0.066kWh = 0.792kWh (often during winter days - 4 month a year ±96kWh )
0.66W is the power I can still see when all my house installation is switched off at the main breaker.
(Knowing that the battery cannot over discharge, what cannot happen in one night)
Battery charge is lower than Minimum Charge (E.g SOC 15%) + Solar installation self consumption (0.792kWh)
My installation has been placed a couple of months ago, the inverter has been replaced for commercial reasons. I have the feeling that when the first was installed, I had self consumption very limited (Total house consumption less than 10W) Would it be due to the use of another Firmware (updated to be able to use the Home Assistant ), due to a setting, or was it just a fake memory.?
Wow.
But, even after that, I couldn´t finish the config. I think I mislead something… and I broke openwrt.
when do you save and update the configuration?.
How do you connect the openwrt with the raspberry pi?
They have a bit more going on than that. Their figure is correct even if the battery is partially charged from grid with cheap energy, the formula would add that energy to pv yield.
I’ve tried using the FusinSolar kiosk with another integration but it only seems to update the kiosk page every 30 minutes and it’s figures are somehow slightly different to the main FusionSolar page too!