thanks, I’m trying to connect with a TPLINK TL-WR802N. But I need the pass to enter the SUN2000-xxxx WLAN, right? it seems that the installer, change the predefined pass of the inverter and I can’t access… is there anyway to get to it?
Did you try „Changeme“?
If that‘s not working then you have to ask the installer for the password.
Resetting Password (from "SUN2000-(2KTL-6KTL)-L1 User Manual
")
https://support.huawei.com/enterprise/en/doc/EDOC1100136173/8aa1f88a/resetting-password
Hi, I have install integration, but give me this error:
SUN2000L-5KTL for huawei_solar integration not ready yet: Could not update 2101073796HVHB005492 values: Got error while reading from register 37760 with length 28: Exception Response(131, 3, IllegalAddress); Retrying in background
Please file a bug report and fill in the template to the best of your abilities. Otherwise I won’t have enough information to do a sensible recommendation.
Are you already using the latest beta version?
FYI
The Daily Solar Energy Yield , which is calculated by :
(daily_energy_yield + daily_battery_charge - daily_battery_discharge)
has decreasing values during the day.
So for the Energy Management Dashboard it isn’t an option. (state_class: total_increasing)
To have a working sensor I have used the Riemann Sum to calculate kWh from kW.
But you need to take the efficiency off the Inverter into account :
So I apply a correction to the input_power before feeding it into the Riemann
- name: "input_power_riemann"
unique_id: "input_power_riemann_new"
unit_of_measurement: "kW"
device_class: power
state_class: measurement
state: >-
{% set inpower = states('sensor.input_power')|float(0) %}
{% if inpower < 1 %}
{{ inpower * 0.90 }}
{% elif inpower < 2 %}
{{ inpower * 0.95 }}
{% else %}
{{ inpower * 0.98 }}
{% endif %}
After that I make the sum :
- platform: integration
source: sensor.input_power_riemann
name: solar_energy_riemann
round: 3
The sensor solar_energy_riemann can then be used in the Energy Management Dashboard.
PS 1 : You can adopt the corrections to fit your installation, but for my installation its very accurate.
PS 2 : This efficiency graph is also the reason why in the morning the Daily Battery Discharge is higher then the Daily Energy Yield…
I think in this sensor we have “W” and not “kW”
# new kwh sensor input power inverter
- sensor:
- name: "PV Energy Huawei Sun2000"
unique_id: pv_production_sun2000
unit_of_measurement: "W"
device_class: power
state_class: measurement
state: >-
{% set inpower = states('sensor.input_power')|float(0) %}
{% if inpower < 1 %}
{{ inpower * 0.90 }}
{% elif inpower < 2 %}
{{ inpower * 0.95 }}
{% else %}
{{ inpower * 0.98 }}
{% endif %}
so for platform integration we must set as this:
# accurated input power inverter kWh generator
- platform: integration
source: sensor.pv_energy_huawei_sun2000
name: solar_energy_huawei_sun2000_kwh
unit_prefix: k
unit_time: h
method: left
round: 2
or am I doing not something right?
The modbus register states :
So I use kW…
PS: Why do you use “method: left” ?? when the default ‘trapezoidal sum’ is more accurate (combination of Left and Right)
I’ve a Huawei SUN 2000 -5KTL -L1 but I see W from sensor
If you have W then change this :
{% set inpower = ( states(‘sensor.input_power’)|float(0) * 0.001) %}
But actualy you should use the correct Modbus register
The Modbus register is only 2 digits accurate for kW… so having 5.012,7 W doesn’t make any sense…
You can have only accurate readings of order 10 Watt, which is already amazingly accurate.
If you have ‘clipping’ at 10:30 in the morning in March, then your Inverter and Solar panels don’t match.
Too much panels or Inverter too weak…
and if i try so?
# PV Sun2000 kwh Today as Fusionsolar
- sensor:
- name: "Test PV Energy Huawei Sun2000"
unique_id: test_today_yeld_kwh
state: >-
{% set pvtoday = (states('sensor.daily_yield') | float + states('sensor.battery_day_charge') | float - states('sensor.battery_day_discharge') | float) %}
{{ 0 if pvtoday < 0 else pvtoday }}
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
# PV Sun2000 kwh Today filter errors or zero value
- sensor:
- name: "PV kWh Today Huawei Sun2000"
unique_id: pv_today_sun2000
availability: >-
{{ states('sensor.test_pv_energy_huawei_sun2000') not in ['unavailable', 'unknown', 'none', 0] }}
state: >-
{{ '%.2f' | format(states('sensor.template_pv_today_yeld_kwh_energy2') | float ) }}
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
You will always overshoot because it’s decreasing even after sunset…
I moved my installation from SD card to SSD. since then I am unable to connect to the Huawei inverter.
log error is mentioned below
Logger: huawei_solar.huawei_solar
Source: /usr/local/lib/python3.9/site-packages/huawei_solar/huawei_solar.py:307
First occurred: 6:55:23 PM (1 occurrences)
Last logged: 6:55:23 PM
failed to connect to device, is the host correct?
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/huawei_solar/huawei_solar.py", line 303, in read_register
response = self.client.read_holding_registers(
File "/usr/local/lib/python3.9/site-packages/pymodbus/client/common.py", line 114, in read_holding_registers
return self.execute(request)
File "/usr/local/lib/python3.9/site-packages/pymodbus/client/sync.py", line 108, in execute
raise ConnectionException("Failed to connect[%s]" % (self.__str__()))
pymodbus.exceptions.ConnectionException: Modbus Error: [Connection] Failed to connect[ModbusTcpClient(192.168.200.1:502)]
I am on “2485325” Huawei integration tried to update the latest “a973aed” to can’t upgrade to some unknown issue. is there any manual way of upgrading?
If I upgrade I only see the following code but even after rebooting the host, it is the same old version.
after finally updating the intergration
I see the following error
This error originated from a custom integration.
Logger: custom_components.huawei_solar.sensor
Source: custom_components/huawei_solar/sensor.py:192
Integration: huawei_solar (documentation)
First occurred: 8:49:11 PM (1 occurrences)
Last logged: 8:49:11 PM
could not connect to Huawei inverter: failed to connect to device, is the host correct?
Logger: huawei_solar.huawei_solar
Source: /usr/local/lib/python3.9/site-packages/huawei_solar/huawei_solar.py:416
First occurred: 8:49:11 PM (1 occurrences)
Last logged: 8:49:11 PM
failed to connect to device, is the host correct?
NoneType: None
my initial line in the configuration file
#Inverter
sensor solar:
- platform: huawei_solar
host: '192.168.200.1'
optimizers: false
battery: false
- platform: template
sensors:
pv_input_power:
friendly_name: "DC Production"
`
The gain-column with 1000 that you see to the right of unit-column with kW
means that you need to divide that register with 1000 to get the kW value. I felt like being clever, and just give the resulting value as W instead of kW for that register.
Indeed, that’s why its not total_increasing. I believe the decreasing behavior is due to the efficiency factor (losses) between the battery discharge and the Inverter output (daily energy yield). People without a battery won’t have this issue I believe. Maybe someone without battery can confirm this…
In this respect, the resolution aimed by huawei is 0.001 kW, or indeed 1W.
I was puzzeled how @MicheleMercuri was able to have a 5012,7W indication…
If you are reading the register is Watt then it should be a Integer, if you are reading it in kW then it should be a float with precision 3, no ?