Thanks :). Confirm but I believe in your template, you are expecting grid import to be negative and grid export as positive in your calculations?
Hi all
Just thought Iād chime in with some field experience after using @wlcrs integration on around ~15 2000L inverters. Hoping we can look beyond the individual n=1 cases documented here. Itās mostly a recap of the documentation, but with some personal notes added. Perhaps it can serve as a reference post for people wading through this thread in search for practical experiences.
Direct connection to inverter AP
The inverter has an AP for local configuration. It also exposes a Modbus TCP interface. This works reasonably well. Easiest option if you are able to connect directly to the wifi AP of the inverter (e.g. using a RasPi).
We used this method during development of our system. Due to technical limitations, our final hardware doesnāt support direct wifi connection, so we needed another option.
Connection to inverter through the local network
The inverter has two wifi connections:
- The AP, used for configuration of the inverter (local)
- A wifi client connection, used to connect to your home network and send data to Huawei cloud. It can also expose a Modbus TCP interface for local data access.
We used this method during the first phase of our project, but in 2022 a firmware update removed this feature. Apparently it has been reinstated as of 2023, but havenāt tested it yet.
Connection using the SdongleA-05 or FE
You can plug a Huawei dongle into the USB port of the inverter. The A-05 connects to your wifi and exposes a Modbus TCP interface. The FE can be used to connect the inverter to the wired network, it also exposes the Modbus TCP interface.
We tried both the A-05 and the FE on around 6 installations, tried every setting and option possible, never got the Modbus TCP interface to work (reliably). Always getting huawei_solar.exceptions.ConnectionInterruptedException: Could not read register value, has another device interrupted the connection?
Cannot recommend this option (especially taking the ā¬65 price tag into account).
Connection using a Modbus RTU to TCP gateway
The inverter has a local RS-485 port exposing a Modbus RTU interface. With a RTU to TCP gateway like the Elfin-EW11, you can make this interface available through the local network (wifi or wired).
Despite this option seeming to be the āpoor mans dongleā choice, from all available options to connect to the inverter this one has worked consistently and most reliably. As such it has become our default approach. The only instance where it doesnāt work is when the user has a Huawei dongle plugged in (e.g. because they need a wired connection to the inverter). The dongle apparently deactivates the RS-485 port. Still looking for a solution here.
Fyi we do these integrations in the context of a research project on residential electrical flexibility.
The templates will assume that positive meter active power is export, but the Tesla-style power card displays the opposite convention - it will show a negative value on the grid when exporting.
There is no way to change that with the template because the card requires all sensors to return a positive value, so if you want to change the convention you have to patch the tesla card itself (see calculateIconBubbleData
at tesla-style-solar-power-card/TeslaStyleSolarPowerCard.ts at 55b06a1890eb059fad12ded85d9d9f1174b4f7ca Ā· reptilex/tesla-style-solar-power-card Ā· GitHub
Thanks that made sense. Was playing around with it but found it quite problematic with on browsers.
I was using the Power Flow Card, but that has missing car charging but found a fork Power Flow Card Plus which I would recommend, itās easier to configure and has the same layout as the Energy dashboard. It has the ability to configure 2 additional components which I use for heat and my car
Thank you very much for your insights! Iām using the connection via the inverter AP for a year now and it works quite reliably. However, I would love to switch to an RS-485 wired connection. Do you have experiences with cascaded inverters? As far as I understand, with cascaded inverters the problem is that the pins needed for the RS-485 connection are already used by the second inverter.
Apart from my question, I would be really thankful if you could provide a small how-to concerning the wiring and how this is best done. That would be great!
Thanks again!
There is a nice guide on the wiki page of the integration concerning how to hook-up the wiring.
I donāt know if itās possible to use RS-485 when cascading inverters. Our installations have a battery inverter connected to RS-485 2, but the primary RS-485 1 is only used by the Elfin dongle.
Hey Epyon, have you ever run into this situation:
Hi folks, I donāt suppose someone could share which Huawei entities align to this card?
Iām a little confused with the naming standard of the integration versus the card which Iād like to integrateā¦
Specifically:
sensor.grid_consumption
sensor.grid_production
sensor.solar_production
sensor.battery_consumption
sensor.battery_production
sensor.battery_state_of_charge
Hey, this card is quite a bit simpler. You dont need to adjust much. These are mine:-
type: custom:power-flow-card-plus
title: Live Usage
entities:
battery:
entity: sensor.battery_charge_discharge_power
state_of_charge: sensor.battery_state_of_capacity
grid:
entity: sensor.kitchen_utility_shelly_em_2_mains_power
solar:
entity: sensor.inverter_active_power
individual1:
entity: sensor.myenergi_zappi_internal_load_ct1
display_zero: true
secondary_info:
entity: sensor.id_4_state_of_charge
unit_of_measurement: '%'
icon: mdi:battery
individual2:
entity: sensor.kitchen_utility_shelly_em_2_heat_pump_power
icon: mdi:heat-pump
name: Heat Pump
display_zero: true
inverted_entities: battery
watt_threshold: 1000
clickable_entities: true
The battery needs to be inverted as it reads discharge as positive instead of negative
My mains sensor is negative when exporting and positive when importing.
Obviously, you can do split entities too as the card supports it. Check the documentation on that one.
Thatās all you need
Hi, i added some traces to the sensor.py, and I discovered that almost all calls to self.inverter.get(SOMETHING") are taking almost a second.
This means that for taking some 15-20 register values it takes 15 seconds.
Is there a way to performa a single call to the inverter and get all the keys? maybe with a single call it can be faster?
Thank you
Could it be that there is a bug with the sensor āSolar to Houseā?
It is dark and there is no solar power anymore.
The inverter active power has the value of the battery discharge.
And the inverter input is 0.
But the solar_to_house sensor consist of the sum of battery discharge and inverter_active_power. Thatās almost twice of the correct value.
Or I donāt understand your calculation.
If I use inverter_input_power instead of inverter_active_power, it seems to be correct (now late in the evening).
{% set out = states('sensor.inverter_input_power')|int(default=0) %}
hi
I got a problem my rsp4 wonāt connect to my inverter. It gives me a error message āActivating connection failed, check connection settings.ā
Anyone got a solution?
greats
I have received my SDongleA from my installer, and Iām not sure how to commission it.
I plugged it into my inverter and LAN, and it got assigned an IP address. I noticed that my web connection to the fusionsolar web app disconnected.
The instructions seem to imply connecting to the built in wireless lan and restarting the commissioning process from scratch - will existing settings for the grid / power sensor be preserved or do I make sure I have the details for these?
Will this result in my existing fusion solar web account being recreated?
Iād like to keep everything āas isā just make the dongle available on my networkā¦
That might help
SDongleA-05 MODBUS TCP Guide
https://drive.google.com/file/d/1B2jHY4AnApsaRrzfUr1_819hhnZlqDde/view?usp=share_link
I have read a lot on this, but I know nothing about networking, so please forgive me if my question seems basic - that is the level I am at.
I only have a user account for accessing my inverter, not an installer account, so my options seem limited
My understanding from reading all of this is that I can simply(?) connect the RS485 (A1 and B1) pins to an EE11 type device and then connect that via ethernet to my router (or a EW11 wifi device). I will then need to change the configuration of the device per the instructions at Connecting to the inverter Ā· wlcrs/huawei_solar Wiki Ā· GitHub
Am I missing something? I have been reading about dongles and bridges and OpenWRT, but all these other options seem far more complicated? Any disadvantages in taking the EE11/EW11 route?
Thanks in advance!
It doesnāt really matter which type of account you have, if any. Both a direct connection to the AP of the inverter or to the RS-485 bus (with an Elfin dongle or equivalent) work out of the box.
Afaik the stuff about bridges and routers is to enable HA to have access to both the LAN and the inverter AP, as the AP is the only TCP interface which is guaranteed to expose the Modbus API.
I would also be interested in this to be able to get sensor updates more frequently (currently lowest polling frequency I can get to is 10 seconds)
Hi, actually Iām hunting the different āEfficiency Lossā shares:
- sensor.inverter_efficiency_loss_daily (kWh) => Total loss
- sensor.inverter_battery_discharge_efficiency_loss_daily (kWh)
- sensor.inverter_battery_charge_efficiency_loss_daily (kWh)
- sensor.inverter_input_efficiency_loss_daily (kWh)
Under sunny conditions and āBattery Chargeā is finished, the inverter_daily_yield is more increasing then inverter_input_energy_daily (Riemann Integration of āinverter_input_powerā without efficiency loss correction).
Meaning not an efficiency loss but an efficiency gain ā¦
I beleave this will fire up again the discussion about reliable computing of the āDaily Solar Yieldā.
You can also see in the graph:
battery_day_discharge is significant higher than the real amount of discharged energy absorved by the house
battery_day_charge is significant lower than the real amount of energy provided by the inverter input
This is polluting any kind of Energy Flow Dashboards.
Has anybody make similar investigations?
How to resolve?
For the efficiency gain story I have tuned the input_power_with_efficiency_loss sensor:
# ########## Start: Solar Yield (Power) with Efficiency Loss ##########
#
# For Riemann Integration:
# Solar Yield (Energy) with Inverter Efficiency loss
#
- name: inverter_input_power_with_efficiency_loss
unique_id: inverter_input_power_with_efficiency_loss
#friendly_name: "Inverter input power"
state_class: measurement
device_class: power
unit_of_measurement: "W"
icon: mdi:solar-power
state: >-
{# For SUN2000-3-10KTL-M1 (High Current Version) #}
{# Check the Input Voltage of connected MPPTs #}
{# Assuming an Input Voltage above 600 V #}
{# Adjust this value to the rated power of your inverter #}
{% set inv_rating = 6000 %}
{% set inv_input_power = states('sensor.inverter_input_power')|float(0) %}
{% if inv_input_power < (inv_rating*0.05) %}
{# inv_input_power < 300 W - For above rated power of 6000 W #}
{{ (inv_input_power * 0.935)|float(0) }}
{% elif inv_input_power < (inv_rating*0.1) %}
{# inv_input_power < 600 W - For above rated power of 6000 W #}
{{ (inv_input_power * 0.988)|float(0) }}
{% elif inv_input_power < (inv_rating*0.15) %}
{# inv_input_power < 900 W - For above rated power of 6000 W #}
{{ (inv_input_power * 0.992)|float(0) }}
{% elif inv_input_power < (inv_rating*0.2) %}
{# inv_input_power < 1200 W - For above rated power of 6000 W #}
{{ (inv_input_power * 0.997)|float(0) }}
{% elif inv_input_power < (inv_rating*0.25) %}
{# inv_input_power < 1500 W - For above rated power of 6000 W #}
{{ (inv_input_power * 1.00)|float(0) }}
{% elif inv_input_power < (inv_rating*0.3) %}
{# inv_input_power < 1800 W - For above rated power of 6000 W #}
{{ (inv_input_power * 1.01)|float(0) }}
{% else %}
{# inv_input_power >= 1800 W - For above rated power of 6000 W #}
{{ (inv_input_power * 1.02)|float(0) }}
{% endif %}
availability: >-
{{ (states('sensor.inverter_input_power')|is_number) }}
#
# ########## End: Solar Yield (Power) with Efficiency Loss ##########
The above efficiency graph is coming from āFusionSolar Residential Datasheet EU 230403ā:
https://digitalpower.huawei.com/power-marketing/#/en/material/fusionsolar/detail/2839/1-496-506-591
For me this is working much more reliable then the origional appraoch.
Jepp - you are completely right.
The power-flow-card-plus card is MUCH MUCH MORE simpler then the Tesla card and therefore much more reliable.
- type: custom:power-flow-card-plus
title: Power Flow - Now
min_flow_rate: 3
max_flow_rate: 10
watt_threshold: 7800
kw_decimals: 3
w_decimals: 0
clickable_entities: true
dashboard_link: /energy
entities:
home:
entity: sensor.house_consumption_power
solar:
entity: sensor.inverter_input_power
battery:
entity: sensor.battery_charge_discharge_power
state_of_charge: sensor.battery_state_of_capacity
color_circle: true
grid:
entity: sensor.power_meter_active_power
fossil_fuel_percentage:
entity: sensor.co2_signal_grid_fossil_fuel_percentage
icon: mdi:pine-tree
color_icon: true
display_zero: true
name: Low-carbon
state_type: power
inverted_entities: grid,battery
For me there is only the need for one additional sensor:
# ########## Start: Power Flow Card ##########
# custom:power-flow-card
# https://github.com/ulic75/power-flow-card
#
# or with some improvements
# custom:system-energy-flow-card-plus
# https://github.com/flixlix/power-flow-card-plus
#
# solar : sensor.inverter_input_power
# battery : sensor.battery_charge_discharge_power
# grid : sensor.power_meter_active_power
# house : house_consumption_power
# load (FusionSolar) : house_consumption_power
#
- name: house_consumption_power
unique_id: house_consumption_power
#friendly_name: "Power meter House power"
state_class: measurement
device_class: power
unit_of_measurement: "W"
icon: mdi:solar-power
state: >-
{% set inv_input_power = states('sensor.inverter_input_power')|float(0) %}
{% set bat_charge_discharge_power = states('sensor.battery_charge_discharge_power')|float(0) %}
{% set pm_active_power = states('sensor.power_meter_active_power')|float(0) %}
{{ (inv_input_power - bat_charge_discharge_power - pm_active_power)|float(0)|round(0) }}
availability: >-
{{ (states('sensor.inverter_input_power')|is_number)
and (states('sensor.battery_charge_discharge_power')|is_number)
and (states('sensor.power_meter_active_power')|is_number) }}
#
# ########## End: Power Flow Card ##########
Actually, you donāt even need that unless you want to have it clickable, as the calculation is done by the card itself.
Itās a much better looking card too