Thanks, this works great!
Minor quibble, the pdf does say the various wattage fields are in kW, but they seem to be measuring watts, at least on my 2000L.
Thanks, this works great!
Minor quibble, the pdf does say the various wattage fields are in kW, but they seem to be measuring watts, at least on my 2000L.
The pdf is correct, but a bit confusing. There is also a gain factor you need to divide by to get the correct units.
Hey just checking if there has been any progress?
Also setup instructions mention HAC but I’m unable to find the integration in the search, do I need to do something manually?
Google “How to install HACS on Home Assistant”
I already had HACS installed but I couldn’t find the Huawei Solar integration however all good I figured out that it wasn’t in the list of integrations available and I needed to manually add the github link as a repository.
Any news on the integration being fixed as its been out for over 2 weeks now and i’m contemplating making the switch the modbus method listed above?
Hi,
I’ve been following this topic for a while now and used Emil’s integration for quite some time.
Just a few days ago, I implemented the modbus protocol into my HA and thought I’d share some of my code:
configuration.yaml
modbus:
name: solar
type: tcp
host: 192.168.8.215
port: 502
sensor: !include_dir_merge_list sensors/
sensors/huawei_solar.yaml
---
# Slow refresh solar registries
- platform: modbus
scan_interval: 14400 # 4 uur
registers:
- name: Solar Model name
hub: solar
register: 30000
count: 15
data_type: string
- name: Solar Installed optimizers
hub: solar
register: 37200
data_type: uint
- name: Solar Max active power
hub: solar
unit_of_measurement: W
count: 2
register: 30075
data_type: uint
- name: Solar total production
hub: solar
unit_of_measurement: kWh
count: 2
register: 32114
data_type: uint
scale: 0.01
precision: 2
# Medium refresh solar registries
- platform: modbus
scan_interval: 300 # 5 minuten
registers:
- name: Solar phase A Voltage
hub: solar
unit_of_measurement: V
register: 32069
data_type: uint
scale: 0.1
precision: 1
- name: Solar Internal temperature
hub: solar
unit_of_measurement: °C
register: 32087
scale: 0.1
precision: 1
data_type: int
- name: Solar Status Raw
hub: solar
register: 32089
data_type: uint
- name: Solar Daily production
hub: solar
unit_of_measurement: kWh
count: 2
register: 32114
data_type: uint
scale: 0.01
precision: 2
- name: Solar Optimizers online
hub: solar
register: 37201
data_type: uint
- name: Solar Active Power
hub: solar
unit_of_measurement: W
count: 2
register: 32080
data_type: int
- name: Solar Input power
hub: solar
unit_of_measurement: W
count: 2
register: 32064
data_type: int
# - name: test Solar Optimizers data
# hub: solar
# register: 37202
# count: 29
# data_type: float
# Fast refresh solar registries
- platform: modbus
scan_interval: 30
registers:
- name: Solar PV1 voltage
hub: solar
unit_of_measurement: V
register: 32016
data_type: int
scale: 0.1
precision: 1
- name: Solar PV1 current
hub: solar
unit_of_measurement: A
register: 32017
data_type: int
scale: 0.01
precision: 2
- name: Solar PV2 voltage
hub: solar
unit_of_measurement: V
register: 32018
data_type: int
scale: 0.1
precision: 1
- name: Solar PV2 current
hub: solar
unit_of_measurement: A
register: 32019
data_type: int
scale: 0.01
precision: 2
- name: Solar Active Power
hub: solar
unit_of_measurement: W
count: 2
register: 32080
data_type: int
- platform: template
sensors:
solar_status:
friendly_name: "Solar Status"
value_template: >-
{% if is_state('sensor.solar_status_raw', '0') %} Standby: initializing
{% elif is_state('sensor.solar_status_raw', '1') %} Standby: detecting insulation resistance
{% elif is_state('sensor.solar_status_raw', '3') %} Standby: grid detecting
{% elif is_state('sensor.solar_status_raw', '256') %} Starting
{% elif is_state('sensor.solar_status_raw', '512') %} On-grid
{% elif is_state('sensor.solar_status_raw', '513') %} Grid Connection: power limited
{% elif is_state('sensor.solar_status_raw', '514') %} Grid Connection: self-derating
{% elif is_state('sensor.solar_status_raw', '768') %} Shutdown: fault
{% elif is_state('sensor.solar_status_raw', '769') %} Shutdown: command
{% elif is_state('sensor.solar_status_raw', '770') %} Shutdown: OVGR
{% elif is_state('sensor.solar_status_raw', '771') %} Shutdown: communication disconnected
{% elif is_state('sensor.solar_status_raw', '772') %} Shutdown: power limited
{% elif is_state('sensor.solar_status_raw', '773') %} Shutdown: manual startup required
{% elif is_state('sensor.solar_status_raw', '774') %} Shutdown: DC switches disconnected
{% elif is_state('sensor.solar_status_raw', '775') %} Shutdown: rapid cutoff
{% elif is_state('sensor.solar_status_raw', '776') %} Shutdown: input underpowered
{% elif is_state('sensor.solar_status_raw', '1025') %} Grid scheduling: cosphi-P curve
{% elif is_state('sensor.solar_status_raw', '1026') %} Grid scheduling: Q-U curve
{% elif is_state('sensor.solar_status_raw', '1027') %} Grid scheduling: dry contact
{% elif is_state('sensor.solar_status_raw', '1028') %} Grid scheduling: Q-P curve
{% elif is_state('sensor.solar_status_raw', '1280') %} Spot-check ready
{% elif is_state('sensor.solar_status_raw', '1281') %} Spot-checking
{% elif is_state('sensor.solar_status_raw', '1536') %} Inspecting
{% elif is_state('sensor.solar_status_raw', '1792') %} AFCI self check
{% elif is_state('sensor.solar_status_raw', '2048') %} I-V scanning
{% elif is_state('sensor.solar_status_raw', '2304') %} DC input detection
{% elif is_state('sensor.solar_status_raw', '2560') %} Running: off-grid charging
{% elif is_state('sensor.solar_status_raw', '40960') %} Standby: no irradiation
{% else %}
Failed to read sensor
{% endif %}
This works like a charm for me, and I love that there now are separate entities, which makes it easier to design a dashboard in “vanilla” HA. It’s a WIP.
Thanks, I’m using similar method.
But I have problems every morning with connection to my inverter. It seems like when inverter goes to standby mode in the night, my HA modbus couldn’t connect back to it in the morning.
HA do not read values till I disconnect and connect back my wifi adapter.
Does someone had similar problems?
I have optimizers installed and wonder if there is away to read out data from those? I use Emilv2 excellent component.
Hi,
I tried Emilv2 component, I see inverted added, entities added in the log entries, but no entity is created.
If I use the modbus component, I’m able to read out some values.
I have a SUN2000-4.6KTL-L1 inverter.
Can somebody provide troubleshooting steps i can use to get the custom component working?
Not sure how to explain this but Emilv2 component has not been working for me for some weeks so today I finally decided to make the switch and try the modbus
I added the below modbus lines plus some of the platform sensors listed in previous threads and all of a sudden Emilv2 component started to work again?
modbus:
name: solar
type: tcp
host: 192.168.x.x
port: 502
Hi Gerry,
if you use a single phase connection, you have to use register 32066 instead of 32069 to get the correct voltage.
Hi all,
First of all, thank you for the great post. I learned a lot!
Unfortunately I’m still some steps behind, because I’m not able to communicate the inverter with HA.
I have the situation already described were the SUN2000 (without the -L) has two wifi connections, and the Modbus server is on the wifi that the inverter creates (SUN2000-HVxxxxx with IP 192.168.200.1).
As the inverter is quite far of the HA server I tried to use an old Raspberry Pi 2 to communicate.
The wired connection of this raspberry is on my home network, and the wifi dongle connects to the inverter. I can confirm this raspberry can communicate with the inverter because I get answers when I use the Python huawei-solar.
>>> import huawei_solar
>>> inverter = huawei_solar.HuaweiSolar ('192.168.200.1')
>>> inverter.get ("model_name")
Result(value='SUN2000-3KTL-L1', unit=None)
My problem is that I cannot make the inverter reachable from the HA server (I can only ping it from the auxiliar Raspberry). I tried to follow several recommendations on internet, but I did not succeed.
I need to access from 192.168.1.xxx to the 192.168.200.1 on the raspberry, and it is not clear to my if I have to set a NAT on raspberry, forward traffic, set some rules in “Iptables”, try port forwarding and define the Pi’s IP on the HA (forwarding with input port 502), try subnetting, …
Could anyone explain how to set it? Maybe @jeroenmooij or others had exactly the same situation?
Thanks in advance for any help!
Cesc
Hi @Cesc your problem is - indeed - similar to the problem I had.
I here posted my situation and solution. I hope it works for you as well https://unix.stackexchange.com/questions/619190/can-t-reach-the-whole-subnet?noredirect=1#comment1158698_619190
Have you encountered integration problem and unreachable entities beginning from March 26 morning? I know about some maintenance service works but app now os working fine.
Can you describe me what configuration you use to connect huawei access point to wifi of you RB, and use ethernet as an internet access ?
Hi,
any idea about getting battery charge level?
I read the pdf “Interface Definitions (V3.0)” but the tag: “[Energy
storage unit 1] Current-day charge capacity* RO U32 kWh 100 37015 2” at address 37015 doesn’t work. It is always 0!
The other tags work very well.
Regards
I have a SUN2000L-5KTL with a LG RESU-7H battery connected.
The battery related registers 37015, 37017, 37000, etc. seem (intentionally, I think) unavailables.
On the document “Solar Inverter Modbus Interface Definitions (V3.0).pdf” such registers are tagged as “supported only by certain models or standard codes”.
These are the reasons because of I suspect the that they are intentionally masked:
During last months I had some discussion with Huawei technical support because of a very poor actual efficiency of the energy storage system.
It never is higher than 80% at high power discharge, very worse at low power discharge.
The self-discharge, when the battery is inactive, is as high as 0,5-1KWh each night!
(Despite the installation site assure the best environmental conditions, 15 to 30°C along the whole year).
Recently something changed on the Huawei FusionSolar app about the storage energy computation. Now the auto-discharge energy is computed as returned energy (!), while previously it was not. Really a bit strange.
Also it is a bit strange that there is no manner to find any document wich reports the actual efficiency of the LG RESU batteries. The DC efficiency only is published, but it does not include the intensive internal DC-DC converter self-consumption. If someone is able to find it, let me know, please.
I asked to Huawei and LG technical support a document wich report the storage global efficiency with no reply.
I also asked to Huawei the same info about theyr “LUNA” storage systems. While the support service replied quickly to any other request, no reply received to this request, even after solicitation.
I suggest to everybody to ask for this data before the purchasing of any storage system and I suggest to any owner of storage system to claim to the Huawei support service the unmasking of the registers.
However it seems that someone has been able to read the battery registers, have a look to Request for aditional atributes · Issue #3 · Emilv2/huawei_solar · GitHub
Hi, can you tell me how do you get data from the inverter more than once every 5 minutes? I also want to make similar, maybe less fancy dashboards in Grafana, but 5 minutes is 20 times too rare;)
If you comunicate directly with inverter modbus RTU port no any restrictions with requests periodicity,
you can read registers every 2 seconds
only one problem if you use wifi dongle, dongle acts as modbus master and periodicaly causes collisions with your requests
Ok, so modbus is the way I need to know. can you pick up where to start?