stable ping =/= stable connection. The integration clearly loses it’s connection from time to time. Due to the aggressive retry-mechanisms it manages to read some data sometimes, but you’ll need to look into improving your setup.
@wlcrs
I installed your custom component in HACS.
But when i want to add the ingration and i search for it i can not find it.
What is the issue here?
Dear god, I’ve spend all morning trying to connect as I was sure it would be a problem over here. 1.1.1 seems to work great with serial mode! Tnx Thijs!
Edit: I see the sensor naming changed too? Might want to warn people clearly about this as it breaks cards etc…
Yeah, this was caused by following the new HA guidelines on naming entities. I agree that it is annoying for people that plan to move from the TCP to a serial connection. Existing installations should not be affected as the entity_id
s are only generated the first time a new entity (=sensor/switch/etc) is added to HA by an integration. However, when you remove and add an integration again, those entity_id
s are generated again.
I’ve added an extra warning in the release notes.
because the integration also works by connecting to the ip address that my router fritx box 7590 assigns to my inverter, in my cas 192.168.178.45 with port 6607. what is the difference to connect to 192.168.200.1. connecting to 192.168.172.45 I see that everything works fine without the need for network bridges or anything else…
Because you don’t have the last inverter firmware.
The december update block access from house network, but if you did not update, you don’t need bridgets
Hello everybody…
I can’t understand what I’m wrong … because I can’t set the sensors …
use lovelace…
#solar sensor ... name file solar_sensor-serbat.yaml
template:
- platform: template
sensors:
grid_to_battery:
friendly_name: "Grid to battery"
unit_of_measurement: "W"
device_class: power
value_template: >-
{% set ip = states('sensor.grid_active_power') | int %}
{% set cdp = states('sensor.charge_discharge_power') | int %}
{% if ip < 0 and cdp > 0 %}
{{ (-1 * ip) | int }}
{% else %}
{{ (0) }}
{% endif %}
availability_template: >-
{{ (states('sensor.grid_active_power') not in [ 'unavailable', 'none', 'unknown' ] )
and (states('sensor.charge_discharge_power') not in [ 'unavailable', 'none', 'unknown' ]) }}
grid_to_house:
friendly_name: "Grid to house"
unit_of_measurement: "W"
device_class: power
value_template: >-
{% set g_c = states('sensor.grid_consumption2') | int %}
{% set g_t_b = states('sensor.grid_to_battery') | int %}
{{ (g_c-g_t_b) | int }}
availability_template: >-
{{ (states('sensor.grid_consumption2') not in [ 'unavailable', 'none', 'unknown' ] )
and (states('sensor.grid_to_battery') not in [ 'unavailable', 'none', 'unknown' ]) }}
generation_to_battery:
friendly_name: "Generation to battery"
unit_of_measurement: "W"
device_class: power
value_template: >-
{% set b = states('sensor.battery_charge') | int %}
{% set ap = states('sensor.input_power') | int %}
{% if b > 0 and ap > 0 and b < ap %}
{{ (b) | int }}
{% elif b > 0 and ap > 0 and b > ap %}
{{ (ap) | int }}
{% else %}
{{ (0) | int }}
{% endif %}
availability_template: >-
{{ (states('sensor.battery_charge') not in [ 'unavailable', 'none', 'unknown' ] )
and (states('sensor.input_power') not in [ 'unavailable', 'none', 'unknown' ]) }}
generation_to_house:
friendly_name: "Generation to house"
unit_of_measurement: "W"
device_class: power
value_template: >-
{% set pv = states('sensor.input_power') | int %}
{% set g_t_b = states('sensor.generation_to_battery') | int %}
{% set g_t_gr = states('sensor.generation_to_grid') | int %}
{% if (pv - g_t_b - g_t_gr) > 0 %}
{{ (pv - g_t_b - g_t_gr) | int }}
{% else %}
{{ (0) }}
{% endif %}
availability_template: >-
{{ (states('sensor.input_power') not in [ 'unavailable', 'none', 'unknown' ] )
and (states('sensor.generation_to_battery') not in [ 'unavailable', 'none', 'unknown' ])
and (states('sensor.generation_to_grid') not in [ 'unavailable', 'none', 'unknown' ]) }}
grid_consumption2:
friendly_name: "Grid consumption2"
unit_of_measurement: "W"
device_class: power
value_template: >-
{% set u = states('sensor.grid_active_power') | int %}
{% if u < 0 %}
{{ (- u) | int }}
{% else %}
{{ (0) | int }}
{% endif %}
availability_template: >-
{{ (states('sensor.grid_active_power') not in [ 'unavailable', 'none', 'unknown' ] )}}
generation_to_grid:
friendly_name: "Generation to grid"
unit_of_measurement: "W"
device_class: power
value_template: >-
{% set ip = states('sensor.input_power') | int %}
{% set pmap = states('sensor.active_power') | int %}
{% if pmap > 0 and ip > pmap%}
{{ (pmap) | int }}
{% else %}
{{ (0) | int }}
{% endif %}
availability_template: >-
{{ (states('sensor.input_power') not in [ 'unavailable', 'none', 'unknown' ] )
and (states('sensor.active_power') not in [ 'unavailable', 'none', 'unknown' ]) }}
battery_to_house:
friendly_name: "Battery to house"
unit_of_measurement: "W"
device_class: power
value_template: >-
{% set u = states('sensor.charge_discharge_power') | int %}
{% if u < 0 %}
{{ (- u) | int }}
{% else %}
{{ (0) | int }}
{% endif %}
availability_template: >-
{{ (states('sensor.charge_discharge_power') not in [ 'unavailable', 'none', 'unknown' ] ) }}
battery_charge:
friendly_name: "Battery charge"
unit_of_measurement: "W"
device_class: power
value_template: >-
{% set u = states('sensor.charge_discharge_power') | int %}
{% if u > 0 %}
{{ (u) | int }}
{% else %}
{{ (0) | int }}
{% endif %}
availability_template: >-
{{ (states('sensor.charge_discharge_power') not in [ 'unavailable', 'none', 'unknown' ] ) }}
house_consumption:
friendly_name: "House consumption"
unit_of_measurement: "W"
device_class: power
value_template: >-
{% set t = states('sensor.battery_to_house') | int %}
{% set u = states('sensor.grid_to_house') | int %}
{% set g = states('sensor.generation_to_house') | int %}
{{ (t + u + g) }}
availability_template: >-
{{ (states('sensor.battery_to_house') not in [ 'unavailable', 'none', 'unknown' ] )
and (states('sensor.grid_to_house') not in [ 'unavailable', 'none', 'unknown' ])
and (states('sensor.generation_to_house') not in [ 'unavailable', 'none', 'unknown' ]) }}
in lovelace
cards:
- type: horizontal-stack
cards:
- type: sensor
entity: sensor.daily_yield #
detail: 4
- type: sensor
entity: sensor.battery_day_charge #
detail: 4
- type: horizontal-stack
cards:
- type: custom:tesla-style-solar-power-card
generation_to_house_entity: sensor.generation_to_house
generation_to_grid_entity: sensor.generation_to_grid
generation_to_battery_entity: sensor.generation_to_battery
grid_consumption_entity: sensor.grid_consumption
house_consumption_entity: sensor.house_consumption
grid_to_house_entity: sensor.grid_to_house
battery_to_house_entity: sensor.battery_to_house
grid_to_battery_entity: sensor.grid_to_battery
battery_extra_entity: sensor.battery_state_of_capacity
hide_inactive_lines: 1
show_gap: true
- type: horizontal-stack
cards:
- type: custom:apexcharts-card
header:
show: true
title: Power
show_states: true
colorize_states: true
all_series_config:
type: area
opacity: 0.1
stroke_width: 1
group_by:
func: last
duration: 5m
series:
- entity: sensor.input_power
color: lightgreen
name: Produzione Pannelli
- entity: sensor.active_power
color: blue
#name: Consumo casa
- entity: sensor.charge_discharge_power
name: Battery Charge
transform: return Math.max(0,x);
color: orange
#name: Carico batteria
- entity: sensor.charge_discharge_power
name: Battery Discharge
color: '#800080'
transform: return -Math.min(0,x);
#name: Scarico batteria
- entity: sensor.grid_active_power
name: Grid Export
transform: return Math.max(0,x);
color: lime
#name: Esportazione
- entity: sensor.grid_active_power
name: Grid Import
color: red
transform: return -Math.min(0,x);
#name: Importazione da rete
thank you all…
ok, solved for the insertion of the sensors, but something is wrong in the operations …
I always update now I have the latest firmware for inverters, SUN2000LV200R001C00SPC124 and last also battery, DGV100R002C00SPC114, system I have installed, my huawei access and as an installer.
Continuing the discussion from Integration Solar inverter huawei 2000L:
I always update now I have the latest firmware for inverters, SUN2000LV200R001C00SPC124 and last also battery, DGV100R002C00SPC114, system I have installed, my huawei access and as an installer.
hello @yousaf465 ! i`m back with a new inverter !!!
i tried again from scratch with my new inverter
I did a clean install of the rooter (open wrt) and well, I saw in open wrt that my inverter ip was a bit strange 192.168.200.1 but also 192.168.200.100 :
so I tried to ping from HA this new IP and works!! 192,168.200.100
Then, intallation of integration also works with this IP!!!
Now, I have some data from sensors, but not sure to understand very well because very faraway from huawei solar application.
For example, I have 2 entity in total and 34 sensors. On the first one (sun 4ktl…) I able to identify the current production of the solar pannel but that’s it, not the house comsumption neither the exported exnergy to the grid… Do I did something wrong?
Congratulations
you have to create those sensors, check my previous posts on that.
@trevee Remember to use a new templates format when creating those sensors, the one I posted was in the old format, just convert those to the new format.
I think we should update the sensors to new templates
My HA server is quite far from the inverter (25m). After I read details of the integration, I’m curious that can it use ESP32 with RS-485 module (using MODBUS component of ESPHome) instead of using RS-485 to USB and using long wire to HA server or not?
if that is possible, that will be the cheapest and most reliable method.
You can certainly create a ModbusRTU to ModbusTCP bridge with an ESP32+RS485 module. However, ESPHome does not support such a thing. My 2 minutes of Googling showed the following interesting option: https://github.com/zivillian/esp32-modbus-gateway .
If you still need to buy the hardware, I would suggest an M5Stack ATOM RS485, which I already have lying around myself. It packages an ESP8266 + RS485-to-tll module together in a nice package.
Everything I say here is untested, so try at your own risk
Anyone facing this error in HA logs
Logger: homeassistant.components.sensor.recorder
Source: components/sensor/recorder.py:396
Integration: Sensor (documentation, issues)
First occurred: 10:30:10 PM (2 occurrences)
Last logged: 10:30:10 PM
sensor.grid_reactive_power has unit var which is unsupported for device_class power
sensor.grid_reactive_power_2 has unit kVarh which is unsupported for device_class energy
Hi guyz, new here at Huawei 2000L, please can somebody point me to right direction?
Using githubs custom component from https://github.com/Emilv2/huawei_solar
And i am confused as what to put where at energy tab.
This is my screenshots and with cloud graphs also.
Hi. I have a solar inverter huawey without “dongle wifi”(i use directly wifi interface of inverter to connect it into my router).
My inverter provider updated my inverter firmware from V200R001C00SPC109 to SPC123… but with version firmware tcp modbus port doesn’t work… My provider inverter haven’t a backup of SPC109 firmware and from huawey I can’t download scp109(it is removed).
What is the last firmware version that support tcp modbus port by wifi without dongle???
Somebody can send me the zip package of that firmware??
Hi, I quote last reply and I would ask to be sure:
If I have SD Dongle as well and upgrade inverter to latest firmware (App propose to install SPC141, currently I have SPC135) the 502 (or 6607) will still be open? With SPC135 it is but I saw some discordant messages in the post and I want to be sure that my integration will not be disconnected if I upgrade
THANKS !!