GithubHelp home page GithubHelp logo

mletenay / home-assistant-goodwe-inverter Goto Github PK

View Code? Open in Web Editor NEW
134.0 25.0 39.0 241 KB

Experimental version of Home Assistant integration for Goodwe solar inverters

Home Page: https://discord.gg/TaXyWXT

License: MIT License

Python 100.00%
home-assistant home-assistant-sensor goodwe pv-systems hacs

home-assistant-goodwe-inverter's Introduction

"Buy Me A Coffee" hacs_badge Build Status GitHub Release

GoodWe solar inverter for Home Assistant (experimental)

Support for Goodwe solar inverters is present as native integration of Home Assistant since its release 2022.2 and is recommended for most users.

This custom component is experimental version with features not (yet) present in standard HA's integration and is intended for users with specific needs and early adopters of new features. Use at own risk.

Differences between this HACS and native HA integration

  • Support for Modbus/TCP
  • Special work modes Eco charge mode and Eco discharge mode (24/7 with defined power and SoC).
  • Network configuration parameters Scan iterval, Network retry attempts, Network request timeout.
  • Switch Export Limit Switch.
  • Switch Load Control (for ET+ inverters).
  • Services for getting/setting inverter configuration parameters

Migration from HACS to HA

If you have been using this custom component and want to migrate to standard HA integration, the migration is straightforward. Just remove the integration from HACS (press Ignore and force uninstall despite the warning the integration is still configured). Afrer restart of Home Assistant, the standard Goodwe integration will start and all your existing settings, entity names, history and statistics should be preserved.

(If you uninstall the integration first, then uninstall HACS component and install integration back again, it will also work, but you will probably loose some history and settings since HA integration uses slightly different default entity names.)

Home Assistant Energy Dashboard

The integration provides several values suitable for the energy dashboard introduced to HA in v2021.8. The best supported are the inverters of ET/EH families, where the sensors meter_e_total_exp, meter_e_total_imp, e_total, e_bat_charge_total and e_bat_discharge_total are the most suitable for the dashboard measurements and statistics. For the other inverter families, if such sensors are not directly available from the inverter, they can be calculated, see paragraph below.

Cumulative energy values

The sensor values reported by the inverter are instant measurements. To report summary (energy) values like daily/monthly sell or buy (in kWh), these values have to be aggregated over time.

Riemann Sum integration can be used to convert these instant (W) values into cumulative values (Wh). Utility Meter can report these values as human readable statistical values. Template Sensor can be used to separate buy and sell values.

sensor:
  - platform: template
    sensors:
      # Template sensor for values of energy bought (active_power < 0)
      energy_buy:
        device_class: power
        friendly_name: "Energy Buy"
        unit_of_measurement: 'W'
        value_template: >-
          {% if states('sensor.goodwe_active_power')|float < 0 %}
            {{ states('sensor.goodwe_active_power')|float * -1 }}
          {% else %}
            {{ 0 }}
          {% endif %}
      # Template sensor for values of energy sold (active_power > 0)
      energy_sell:
        device_class: power
        friendly_name: "Energy Sell"
        unit_of_measurement: 'W'
        value_template: >-
          {% if states('sensor.goodwe_active_power')|float > 0 %}
            {{ states('sensor.goodwe_active_power')|float }}
          {% else %}
            {{ 0 }}
          {% endif %}

  # Sensor for Riemann sum of energy bought (W -> kWh)
  - platform: integration
    source: sensor.energy_buy
    name: energy_buy_sum
    unit_prefix: k
    round: 1
    method: left
  # Sensor for Riemann sum of energy sold (W -> kWh)
  - platform: integration
    source: sensor.energy_sell
    name: energy_sell_sum
    unit_prefix: k
    round: 1
    method: left

utility_meter:
  energy_buy_daily:
    source: sensor.energy_buy_sum
    cycle: daily
  energy_buy_monthly:
    source: sensor.energy_buy_sum
    cycle: monthly
  energy_sell_daily:
    source: sensor.energy_sell_sum
    cycle: daily
  energy_sell_monthly:
    source: sensor.energy_sell_sum
    cycle: monthly
  house_consumption_daily:
    source: sensor.house_consumption_sum
    cycle: daily
  house_consumption_monthly:
    source: sensor.house_consumption_sum
    cycle: monthly

Troubleshooting

If you observe any problems or cannot make it work with your inverter at all, try to increase logging level of the component and check the log files.

logger:
  default: warning
  logs:
    custom_components.goodwe: debug
    goodwe: debug

Source code

The source code implementing the actual communication with GoodWe inverters (which was originally part of this plugin) was extracted and moved to standalone PyPI library. This repository now contains only the HomeAssistant specific code.

Inverter discovery and communication testing

To test whether the inverter properly responds to UDP request, just execute the inverter_test.py script in your python (3.8+) environment. The inverter_scan.py script can be used to discover inverter(s) on your local network.

References and inspiration

home-assistant-goodwe-inverter's People

Contributors

brumhilde avatar bwibwi13 avatar dbaines avatar fizcris avatar ixp-nl avatar kolossboss avatar kukulich avatar mathyv avatar mletenay avatar starkillerog avatar tyler-gei avatar wrt54g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

home-assistant-goodwe-inverter's Issues

Issue with more than 1 inverter.

I have 2 x GoodWe GW5048-EM inverters. When setting them up in Home Assistant with the following config:

sensor:                                                  
  - platform: goodwe                                     
    ip_address: 192.168.100.6                            
    scan_interval: 30                                    
    sensor_name_prefix: Inverter1                  
  - platform: goodwe                                     
    ip_address: 192.168.100.22                     
    scan_interval: 30                                    
    sensor_name_prefix: Inverter2

I do not get 2 sets of sensors as expected.

Below is list of sensors found in HA for the above config:
Screen Shot 2020-09-21 at 9 06 58 am

Platform goodwe not ready yet: Unable to connect to the inverter at host GW5000L-DT

perhaps this isn't the best place to put this. i have a GW5000L-DT goodwe inverter:
i'm running home assistant OS, i've installed HACS and GoodWe Inverter Solar Sensor (UDP - no cloud), added the lines to the configuration.yaml, restarting - but i cannot seem to add my goodwe inverter anywhere. how is this done? also how can i run the inverter_test.py.. i cannot find anywhere how to run that and get an output, i've tried SSHing in and running, it adding python into the configuration.yaml but it seems really difficult to run a python script.

Stops working after update

Got this message in the log. „Inventer is not supported“. But runs for month.

`Logger: homeassistant.components.sensor
Source: custom_components/goodwe/goodwe_inverter.py:665
Integration: Sensor (documentation, issues)
First occurred: 20:54:16 (1 occurrences)
Last logged: 20:54:16

Error while setting up goodwe platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/goodwe/sensor.py", line 78, in async_setup_platform
inverter = await discover(config[CONF_IP_ADDRESS], config[CONF_PORT], config[CONF_NETWORK_TIMEOUT], config[CONF_NETWORK_RETRIES])
File "/config/custom_components/goodwe/goodwe_inverter.py", line 665, in discover
raise NameError("No compatible inverter found")
NameError: No compatible inverter found
`

Support for NS Invertors?

Hi, this looks like a perfect way to measure all output from my GW2500-NS!

I used nmap and I see that ports 8899 and 48899 are open on the IP address of the invertor, but the invertor-test.py doesn't get any response.

Is there a way to make this work on NS type invertors?

PV Modules Power Sensor

Hi,

thanks a lot for this Integration! Works fine so far.
At this moment I‘m using the Sems Portal Integration. There I have a Sensor for the actual production power output of the PV modules in Watt.
I cant found this sensor here. Maybe its possible to caculate with „goodwe_pv1_current“ and „goodwe_pv1_voltage“. But I‘m not sure how to do that in HA. I think its easier to provide a sensor with that value.

Thanks a lot and great work!

Set Export Limit on ES

Hi,
Firstly thank you for the amazing work.

I am having problems calling the new service to change the export limit.

This is what I am sending:

service: goodwe.set_grid_export_limit
data:
entity_id: sensor.goodwe_inverter
grid_export_limit: 1000

The error log is :

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/goodwe/goodwe/inverter.py:146
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: September 1, 2021, 10:04:09 PM (6 occurrences)
Last logged: 9:35:27 AM

[140182692479136] Error handling message: Unknown error
[140182799048656] Error handling message: Unknown error
[140182755634576] Error handling message: Unknown error
[140182692398752] Error handling message: Unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 25, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 525, in handle_execute_script
await script_obj.async_run(msg.get("variables"), context=context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1219, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 353, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 665, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 856, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call
await result
File "/config/custom_components/goodwe/sensor.py", line 204, in set_grid_export_limit
await self.inverter.set_grid_export_limit(grid_export_limit)
File "/config/custom_components/goodwe/goodwe/inverter.py", line 146, in set_grid_export_limit
raise NotImplementedError()
NotImplementedError

I don't have a coding background but I will help in any way possible.

Today's PV Generation not matches Sems Portal

Hi,
The sensor sensor.goodwe_e_day did not match the PV Energy Sensor from Sems Portal.

  • This integration shows 9 kwh
  • Sems integration 14,2 kwh (correct one)

A few days ago this was working correct.

Inverter: GW3648-EM

Cannot import name 'DEVICE_CLASS_CURRENT'

After update to last version :

Platform error sensor.goodwe - cannot import name 'DEVICE_CLASS_CURRENT' from 'homeassistant.const'


Logger: homeassistant.config
Source: custom_components/goodwe/sensor.py:10
First occurred: 11:57:06 (1 occurrences)
Last logged: 11:57:06

Platform error: sensor
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config.py", line 804, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/loader.py", line 390, in get_platform
    f"{self.pkg_path}.{platform_name}"
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/homeassistant/.homeassistant/custom_components/goodwe/sensor.py", line 10, in <module>
    from homeassistant.const import (
ImportError: cannot import name 'DEVICE_CLASS_CURRENT' from 'homeassistant.const' (/srv/homeassistant/lib/python3.7/site-packages/homeassistant/const.py)

My system info 👍

arch | armv7l -- | --
dev | false
docker | false
hassio | false
installation_type | Home Assistant Core
os_name | Linux
os_version | 5.4.51-v7+
python_version | 3.7.3
timezone | Europe/Prague
version | 0.114.4
virtualenv | true

inverter_test.py is working.

GW10K-ET

What a fantastic piece of code you written. I have an ET inverter GW10K-ET and managed to communicate and read out data with your code. However, GW10K-ET seems to reply on this message from the PV Master app: f7038ca00011bbe2. Inverter replies with: aa55f7032200010048000a01110001f651fa35fa82eb060112fc1cfc26fc44fc2a138b4997d3a37d4c (41 bytes). Do you have any idea what this data is used for? (I tried to decode it as ES __settings is decoded but the message is shorter and mapping isn't the same). Any idea why this message is requested by the mobile app?

Edit2: The PV Master seems to continuously request the data from the inverter so there must be some reason for it... I did some research and found out some of the data (count index from 0 in the string)

byte 9-10 don't know
byte 11-12 don't know
byte 13-14 don't know
byte 15-16 L1 power in W (in above string f651)
byte 17-18 L2 power in W
byte 19-20 L3 power in W
byte 21-22 Total power in W (L1+L2+L3)
byte 22-23 don't know
byte 25-26 L1 cos/power factor
byte 27-28 L2 cos/power factor
byte 29-30 L3 cos/power factor
byte 31-32 Average power factor?
byte 33-34 Frequency
byte 35-36 don't know seems static but can also be PV... need to verify during daytime
byte 37-38 It looks like consumed power from battery, seems to count Wh? What happens when counter roll over? Need more verification.
byte 39-40 Checksum

GW5000L-DT Platform goodwe not ready yet: Unable to connect to the inverter at host

Still not working for me. GW5000L-DT

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:268
Integration: Sensor (documentation, issues)
First occurred: 2:34:34 PM (1 occurrences)
Last logged: 2:34:34 PM
Platform goodwe not ready yet: Unable to connect to the inverter at host=192.168.0.165 port=8899, or your inverter is not supported yet. Failures=[InverterError("No valid response received to 'aa55c07f0102000241' request"), InverterError("No valid response received to 'f70388b800213ac10000' request"), InverterError("No valid response received to 'f70388b800213ac1' request"), InverterError("No valid response received to '7f03753100280409' request"), InverterError("No valid response received to 'aa55c07f0102000241' request")]; Retrying in background in 30 seconds

Wonderful work! Just a few parsing errors

Hi,

Thank you very much for all the work you've done so far, it saved me a heap of trouble getting my ES inverter integrated into Home Assistant. I've done a lot of work on my side to decode the protocol, but it would appear that you have at least some documentation (I had none and had to sit for days to reverse engineer the protocol). It's a relief to see that I wasn't too far off 👍

I do have a running system here (not sure if you do?) so I was able to run the inverter_test.py script to verify your output against my system. I have picked up a few things though, hopefully it can be of assistance. I attach a data dump off my running inverter for reference:

aa557fc001868c0bcc003a02000000000002150001005000f70000000a00640000640064640100000108c6004c011e13830108c6003003ca1383010201b10000000000001fd900000457007600e100003204069b0100300203dc00010000fd840008002000001409150e260f0000000000000000000000000000000000000000000000000000090b0000081f020000000000001334

  1. At byte offset 16 in your code, you state Battery Voltage 4. This is actually the battery temperature as reported by the BMS.
  2. You make reference to up to 3 batteries on the inverter; this inverter can only manage one BMS? Which leads me to byte offset 28 - Battery SOC 3. There is only 1 BMS on my system but you parse it as showing 100%?
  3. Offset 33 you suspect is Meter Status. I can confirm that it comes up as 0x01 with an EzMeter connected. I need to verify this changes to 0x00 when the meter is disconnected. I'm not sure which other states there may be.
  4. For the work mode, you need to change your offset from byte 41 to byte 42 in order to parse the working mode of the inverter correctly.
  5. Load mode, offset 51. Can you please confirm you parsing this correctly? You state that 0x00 is working and 0x01 is load disconnected. On my live system that return 0x01, and load is connected and working
  6. From offset 59 onwards, you are parsing the plant's daily and total production/consumption. Unfortunately this is not parsing correctly, so I suspect there may be some misinterpretation of whatever docs you have? I will gladly supply some screenshots and data dumps in order to help with this, just not sure what you need in order to get this resolved?

Thanks again for all the work!

Goodwe 6000-DT, E_total does not indicate the correct value.

In home assistant "sensor.goodwe_e_total" gives a value of 240,8 kWh but according to the semsportal it should be 13.348,10 kWh.
The value of "sensor.goodwe_e_day" seems good. There is no e_month sensor.
I cannot trace the value of e_total stated in Home assistant to something that is stated in the semsportal.

Goodwe 6000 DT

I've also installed the addon "goodwe Sems api to MQTT" and it gives me the following values:

Solar Goodwe produced 13.348,1 kWh
sems_battery_soc 200,0 %
sems_battery_soh -0,100000000000364 %
sems_grid_current 1,8 IAC
sems_grid_frequency 50,01 Hz
sems_grid_voltage 226,4 VAC
sems_inverter_status Online
sems_inverter_temperature 40,8 °C
sems_inverter_type GW6000-DT
sems_produced_this_month 704,6 kWh
sems_produced_today 4,1 kWh
sems_solar_power 1.213,0 W
sems_str_1_current 2,1 VDC
sems_str_1_voltage 322,8 VDC
sems_str_2_current 2,2 VDC
sems_str_2_voltage 327,2 VDC

How can i help you ?

Values of sensor.goodwe_inverter:

timestamp: '2021-08-31T11:12:32'
vpv1: 310.8
ipv1: 3.3
ppv1: 1026
vpv2: 317.2
ipv2: 3.4
ppv2: 1078
xx14: -1
xx16: -1
xx18: -1
xx20: -1
xx22: -1
xx24: -1
xx26: -1
xx28: -1
vline1: -0.1
vline2: -0.1
vline3: -0.1
vgrid1: 230.4
vgrid2: 228.2
vgrid3: 231
igrid1: 2.8
igrid2: 2.7
igrid3: 2.8
fgrid1: 49.99
fgrid2: 50.01
fgrid3: 49.99
pgrid1: 645
pgrid2: 616
pgrid3: 647
xx54: 0
ppv: 1910
work_mode: 1
work_mode_label: Normal
xx60: 0
xx62: 0
xx64: 0
xx66: -1
xx68: -1
xx70: -1
xx72: -1
xx74: -1
xx76: -1
xx78: 0
xx80: -1
temperature: 40.8
xx84: -1
xx86: -1
e_day: 4.8
xx90: 2
e_total: 241.8
xx94: 0
h_total: 8451
safety_country: 20
safety_country_label: Holland
xx100: 0
xx102: -1
xx104: 0
xx106: -1
xx108: 0
xx110: -1
xx112: 0
xx114: -1
xx116: -1
xx118: -1
xx120: -1
xx122: -1
funbit: 0
vbus: 602.9
vnbus: 306.1
xx130: -1
xx132: -1
xx134: 207
xx136: 351
xx138: 752 (This one seems the monthly produced, e_month?)
xx140: 0
xx142: 0
xx144: 100
model: GW6000-DT
serial_number: ***censored***
software_version: 22.22.10
unit_of_measurement: W
friendly_name: PV Inverter
icon: mdi:solar-power

xx138: 752 (This one seems the monthly produced, e_month?)

GW5K-ET

Hi,

first of all I would like to thank you very much for the great work. I have an GW5K-ET inverter and trying to use that component but I get an error.
What is bad?

Thank for your help.

Log Core:
2021-03-08 23:19:01 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'goodwe'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'goodwe'
2021-03-08 23:20:43 WARNING (MainThread) [custom_components.goodwe.sensor] Could not retrieve data from inverter: No valid response received to 'f703891c007d7ae7' request
2021-03-08 23:21:13 WARNING (MainThread) [custom_components.goodwe.sensor] Could not retrieve data from inverter: No valid response received to 'f703891c007d7ae7' request

Sensor
PV Inverter

cannot connect to inverter via port

Hello there,
I am receiving the following error.

custom_components.goodwe.goodwe_inverter.InverterError: Unable to connect to the inverter at host=x.x.x.x port=8899, or your inverter is not supported yet.

the model is GW3000-NS.

Appreciate if someone can help me with this?

Sensors stopped working

Hi

Anyone else having this issue after the recent HA update? All the individual sensors in lovelace just report "unknown" accept for sensor.goodwe_inverter (which only shows current solar production).

Readout from the 'sensor.goodwe_inverter'

vpv1: 200.8
ipv1: 6.1
ppv1: 1225
pv1_mode: 2
pv1_mode_label: 'PV panels connected, producing power'
vpv2: 209.3
ipv2: 5
ppv2: 1046
pv2_mode: 2
pv2_mode_label: 'PV panels connected, producing power'
ppv: 2271
vbattery1: 52.4
battery_temperature: 32.5
ibattery1: 24.2
pbattery1: 1268
battery_charge_limit: 90
battery_discharge_limit: 90
battery_status: 0
battery_soc: 71
battery_soh: 99
battery_mode: 2
battery_mode_label: Discharge
battery_warning: 0
meter_status: 1
vgrid: 239.2
igrid: 14.1
pgrid: 4
fgrid: 50.11
grid_mode: 1
grid_mode_label: Inverter On
vload: 239.2
iload: 0.8
pload: 3305
fload: 50.11
load_mode: 1
load_mode_label: The inverter is connected to a load
work_mode: 2
work_mode_label: Normal (On-Grid)
temperature: 52.5
error_codes: 0
e_total: 1846.8
h_total: 2283
e_day: 18.1
e_load_day: 15.5
e_load_total: 3091.9
total_power: 3427
effective_work_mode: 1
grid_in_out: 0
grid_in_out_label: Idle
pback_up: 143
plant_power: 3448
diagnose_result: 64
house_consumption: 3535
model: GW3648D-ES
serial_number: ****
software_version: ****
unit_of_measurement: W
friendly_name: PV Inverter
icon: 'mdi:solar-power'

GoodWe SBP 5000 support

A little more progress here

PV Master app when it starts sends out a UDP broadast on 48899 for these inverters.

The inverters return their IP Address, their Mac Address and (presumably) a model number - in this case HF_E20

If i then run your test scripts with the port set to 8899 and the appropriate MAC address there is some more progress

python3 inverter_test.py
2021-08-23 03:46:44,429 init(59) - DEBUG: Using selector: EpollSelector
2021-08-23 03:46:44,429 discover(647) - DEBUG: Probing inverter at 172.16.100.60:8899
2021-08-23 03:46:44,430 connection_made(327) - DEBUG: Send: 'aa55c07f0102000241'
2021-08-23 03:46:44,768 datagram_received(338) - DEBUG: Received: 'aa557fc001824d30383038434757'
2021-08-23 03:46:44,768 datagram_received(343) - DEBUG: Invalid response length: 14
2021-08-23 03:46:44,768 connection_made(327) - DEBUG: Send: 'aa55c07f0102000241'
2021-08-23 03:46:45,179 datagram_received(338) - DEBUG: Received: 'aa557fc001824d303830384347'
2021-08-23 03:46:45,180 datagram_received(343) - DEBUG: Invalid response length: 13
2021-08-23 03:46:45,180 connection_made(327) - DEBUG: Send: 'aa55c07f0102000241'
2021-08-23 03:46:45,665 datagram_received(338) - DEBUG: Received: 'aa557fc001824d3038303843475735303030532d42502331300000000000000000000000000039353030304250533230'
2021-08-23 03:46:45,665 datagram_received(343) - DEBUG: Invalid response length: 48
2021-08-23 03:46:45,665 connection_made(327) - DEBUG: Send: 'aa55c07f0102000241'
2021-08-23 03:46:46,079 datagram_received(338) - DEBUG: Received: 'aa557fc001824d3038303843475735303030532d42502331300000000000000000000000000039353030'
2021-08-23 03:46:46,080 datagram_received(343) - DEBUG: Invalid response length: 42
2021-08-23 03:46:46,080 connection_made(327) - DEBUG: Send: 'aa55c07f0102000241'
2021-08-23 03:46:46,293 datagram_received(338) - DEBUG: Received: 'aa557fc001824d3038303843475735303030532d42502331300000000000000000000000000039353030304250533230425730303137333630303431302d30343030312d3038473431302d30323033342d31320b1072'
2021-08-23 03:46:46,294 discover(671) - DEBUG: Probing EH inverter at 172.16.100.60:8899
2021-08-23 03:46:46,294 connection_made(327) - DEBUG: Send: 'f70388b800213ac10000'
2021-08-23 03:46:46,445 datagram_received(338) - DEBUG: Received: 'aa55f703420001135600000039003500300030003000420050'
2021-08-23 03:46:46,445 datagram_received(343) - DEBUG: Invalid response length: 25
2021-08-23 03:46:46,445 connection_made(327) - DEBUG: Send: 'f70388b800213ac10000'
2021-08-23 03:46:46,910 datagram_received(338) - DEBUG: Received: 'aa55f70342000113560000003900350030003000300042005000530047005700350030003000080008006500000000ffffffffffffffffffffffffffffff'
2021-08-23 03:46:46,910 datagram_received(343) - DEBUG: Invalid response length: 62
2021-08-23 03:46:46,910 connection_made(327) - DEBUG: Send: 'f70388b800213ac10000'
2021-08-23 03:46:47,365 datagram_received(338) - DEBUG: Received: 'aa55f7'
2021-08-23 03:46:47,365 datagram_received(343) - DEBUG: Invalid response length: 3
2021-08-23 03:46:47,365 connection_made(327) - DEBUG: Send: 'f70388b800213ac10000'
2021-08-23 03:46:47,770 datagram_received(338) - DEBUG: Received: 'aa55f70342000113560000003900350030003000300042005000530047005700350030003000080008006500000000ffffffffffffffffffffff'
2021-08-23 03:46:47,770 datagram_received(343) - DEBUG: Invalid response length: 58
2021-08-23 03:46:47,770 connection_made(327) - DEBUG: Send: 'f70388b800213ac10000'
2021-08-23 03:46:48,223 datagram_received(338) - DEBUG: Received: 'aa55f703'
2021-08-23 03:46:48,223 datagram_received(343) - DEBUG: Invalid response length: 4
2021-08-23 03:46:48,223 connection_made(327) - DEBUG: Send: 'f70388b800213ac10000'
2021-08-23 03:46:48,296 _timeout_heartbeat(361) - DEBUG: Re-try #6, closing socket
2021-08-23 03:46:48,297 discover(671) - DEBUG: Probing ET inverter at 172.16.100.60:8899
2021-08-23 03:46:48,297 connection_made(327) - DEBUG: Send: 'f70388b800213ac1'
2021-08-23 03:46:48,628 datagram_received(338) - DEBUG: Received: 'aa55f703420001135600000039003500300030003000420050005300470057003500'
2021-08-23 03:46:48,628 datagram_received(343) - DEBUG: Invalid response length: 34
2021-08-23 03:46:48,628 connection_made(327) - DEBUG: Send: 'f70388b800213ac1'
2021-08-23 03:46:48,754 datagram_received(338) - DEBUG: Received: 'aa55f70342000113560000003900350030003000300042005000530047005700350030003000080008006500000000ffffffffffffffffffffffffffffffffffffffffffffffff0a24'
Traceback (most recent call last):
File "inverter_test.py", line 21, in
inverter = asyncio.run(inverter.discover(IP_ADDRESS, PORT, TIMEOUT, RETRIES))
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/home/pi/home-assistant-goodwe-inverter-master/custom_components/goodwe/goodwe_inverter.py", line 672, in discover
await i.read_device_info()
File "/home/pi/home-assistant-goodwe-inverter-master/custom_components/goodwe/goodwe_inverter.py", line 972, in read_device_info
self.software_version = response[54:66].decode("ascii")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)
root@ha-nodejs:/home/pi/home-assistant-goodwe-inverter-master#

I have some Wireshark packet captures also of the interaction between the Inverter and PV Master if that would help - and can do some more directed capturing tomorrow if required - let me know

Obviously we are receiving some responses from the inverters - noting that they are only AC coupled and do not have any Solar panels attached - in my case they have a DC Coupled LV (48) Lithium 13.3Kwh battery to each one.

How would you tackle decoding some of the strings that are being returned to look for patterns such as voltages etc ?

I can see when looking at the Wireshark captures that PV Master sends (i assume) a polling request

aa55c07f0102000241 - From the PC - get response from Inverter - these are the most frequently sent - so i assume some form of screen update request that is context specific to the screen it is

I then see aa55c07f0106000245 - sent on an occasional basis.

I am happy to help on decoding all of this to add to the project - i am a network rather than software engineer though - so need some direction in delving into the return streams.

Craig

Incorrect value for sensor.goodwe_pgrid

Hi,

I think the pgrid sensor did not show the right value.

As I understand it, the sensor shows the value of sensor.goodwe_pload with the sign depending on sensor.goodwe_work_mode

Also the sensor work_mode did not change status anymore.

ongrid

Support for MS Models

Hi, I have installed a MS Series model, unfortunatly it doesn't work with your script.

Is there a way to find this commands, and help add this model ?

2021-02-09 11:04:26,767 init(59) - DEBUG: Using selector: EpollSelector
2021-02-09 11:04:26,769 discover(636) - DEBUG: Probing inverter at 192.168.0.168 :8899
2021-02-09 11:04:26,770 connection_made(316) - DEBUG: Send: 'aa55c07f0102000241'
2021-02-09 11:04:28,774 _timeout_heartbeat(346) - DEBUG: Re-try #1
2021-02-09 11:04:28,775 connection_made(316) - DEBUG: Send: 'aa55c07f0102000241'
2021-02-09 11:04:30,778 _timeout_heartbeat(346) - DEBUG: Re-try #2
2021-02-09 11:04:30,779 connection_made(316) - DEBUG: Send: 'aa55c07f0102000241'
2021-02-09 11:04:32,783 _timeout_heartbeat(346) - DEBUG: Re-try #3
2021-02-09 11:04:32,784 connection_made(316) - DEBUG: Send: 'aa55c07f0102000241'
2021-02-09 11:04:34,787 _timeout_heartbeat(350) - DEBUG: Re-try #4, closing socket
2021-02-09 11:04:34,789 discover(656) - DEBUG: Probing ES inverter at 192.168.0.168:8899
2021-02-09 11:04:34,791 connection_made(316) - DEBUG: Send: 'aa55c07f0102000241'
2021-02-09 11:04:36,795 _timeout_heartbeat(346) - DEBUG: Re-try #1
2021-02-09 11:04:36,795 connection_made(316) - DEBUG: Send: 'aa55c07f0102000241'
2021-02-09 11:04:38,798 _timeout_heartbeat(346) - DEBUG: Re-try #2
2021-02-09 11:04:38,799 connection_made(316) - DEBUG: Send: 'aa55c07f0102000241'
2021-02-09 11:04:40,803 _timeout_heartbeat(346) - DEBUG: Re-try #3
2021-02-09 11:04:40,804 connection_made(316) - DEBUG: Send: 'aa55c07f0102000241'
2021-02-09 11:04:42,807 _timeout_heartbeat(350) - DEBUG: Re-try #4, closing socket
2021-02-09 11:04:42,808 discover(656) - DEBUG: Probing ET inverter at 192.168.0.168:8899
2021-02-09 11:04:42,810 connection_made(316) - DEBUG: Send: 'f70388b800213ac1'
2021-02-09 11:04:44,814 _timeout_heartbeat(346) - DEBUG: Re-try #1
2021-02-09 11:04:44,815 connection_made(316) - DEBUG: Send: 'f70388b800213ac1'
2021-02-09 11:04:46,818 _timeout_heartbeat(346) - DEBUG: Re-try #2
2021-02-09 11:04:46,819 connection_made(316) - DEBUG: Send: 'f70388b800213ac1'
2021-02-09 11:04:48,823 _timeout_heartbeat(346) - DEBUG: Re-try #3
2021-02-09 11:04:48,824 connection_made(316) - DEBUG: Send: 'f70388b800213ac1'
2021-02-09 11:04:50,828 _timeout_heartbeat(350) - DEBUG: Re-try #4, closing socket
problem in goodwe-test - InverterError: Unable to connect to the inverter at host=192.168.0.168 port=8899, or your inverter is not supported yet.
Failures=[InverterError("No valid response received to 'aa55c07f0102000241' request"), InverterError("No valid response received to 'aa55c07f0102000241' request"), InverterError("No valid response received to 'f70388b800213ac1' request")]

Decode error on ET inverter

Hi, I have update to 0.8.9 version and the plugin stop working. In the log is exception that semee sensor value cannot be decoded. Exactly problem is at return ", ".join(result). Where result contains non string value. Problematic sensor is battery_warning.

I have GW8K-ET inverter with one battery pack contains three battery modules.

I will past exact stack trace later.

ES House consumption calculation incorrect

Hi

The house consumption calculation it seem to be doubled in the new release v0.9.0
When backup load is 500w the house consumption is 1000w

I have reverted to v0.8.9 and the values are now normal

"Today Buy" and/or "Today Load Consumption" are missing for ET series

Hi,
I have an ET series inverter and came across this project. With your script I can get the values for todays PV generation and the todays sell total (and indirectly todays self use as Gen - Sell).
But unfortunately the values for todays total buy and/or todays load consumption are missing (I can see them in the SEMS App).
Is there a way to get at least one of those values? One would be enough as Load Consumption = Self Use + Buy

Thanks a lot!

Goodwe 6000DT, no connection after night sleep

In the evening when there is no more sun, my inverter goes into sleep mode.
The addon can no longer reach my inverter and spams my log.
In the morning when it gets light again and the inverter starts up again, the addon remains "offline". It no longer re-establishes the connection to the inverter.

Is this normal behavior or is something wrong here?

After a restart in the morning of the Home Assistant server it works again.

below the log after a reboot in the evening.

2021-09-01 22:59:38 DEBUG (MainThread) [custom_components.goodwe.goodwe.goodwe] Connecting to DT family inverter at 192.168.1.193:8899
2021-09-01 22:59:38 DEBUG (MainThread) [custom_components.goodwe.goodwe.protocol] Connection made to address ('192.168.1.193', 8899)
2021-09-01 22:59:38 DEBUG (MainThread) [custom_components.goodwe.goodwe.protocol] Sent: 7f03753100280409
2021-09-01 22:59:40 DEBUG (MainThread) [custom_components.goodwe.goodwe.protocol] Retry #2 of 3
2021-09-01 22:59:40 DEBUG (MainThread) [custom_components.goodwe.goodwe.protocol] Sent: 7f03753100280409
2021-09-01 22:59:42 DEBUG (MainThread) [custom_components.goodwe.goodwe.protocol] Retry #3 of 3
2021-09-01 22:59:42 DEBUG (MainThread) [custom_components.goodwe.goodwe.protocol] Sent: 7f03753100280409
2021-09-01 22:59:44 DEBUG (MainThread) [custom_components.goodwe.goodwe.protocol] Retry #4 of 3
2021-09-01 22:59:44 DEBUG (MainThread) [custom_components.goodwe.goodwe.protocol] Sent: 7f03753100280409
2021-09-01 22:59:44 WARNING (MainThread) [homeassistant.components.sensor] Platform rest not ready yet: Server disconnected without sending a response.; Retrying in background in 30 seconds
2021-09-01 22:59:46 DEBUG (MainThread) [custom_components.goodwe.goodwe.protocol] Max number of retries (3) reached, closing socket
2021-09-01 22:59:46 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up goodwe platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/goodwe/sensor.py", line 93, in async_setup_platform
inverter = await connect(
File "/config/custom_components/goodwe/goodwe/goodwe.py", line 41, in connect
await inverter.read_device_info()
File "/config/custom_components/goodwe/goodwe/dt.py", line 109, in read_device_info
response = await self._read_from_socket(self._READ_DEVICE_VERSION_INFO)
File "/config/custom_components/goodwe/goodwe/inverter.py", line 83, in _read_from_socket
return await command.execute(self.host, self.port, self.timeout, self.retries)
File "/config/custom_components/goodwe/goodwe/protocol.py", line 103, in execute
await on_response_received
custom_components.goodwe.goodwe.exceptions.MaxRetriesException

ET - Mapping of Smart meter values

Hello,
I have notice that unknown values: Unknown sensor2@10, Unknown sensor2@12 and Unknown sensor2@14 are power values (in W) of Smart Meter of each phases connected at the input of the grid. Showing buying and selling power on each phases. Value Unknown sensor2@16 seems to be sums of the phases. Minus values means buying, plus value means selling.

My customization:

sensor.goodwe_xxx10:
  unit_of_measurement: W
  friendly_name: GoodWe Smart Meter L1 Power
  device_class: power
  state_class: measurement
  icon: mdi:power-plug-outline
sensor.goodwe_xxx12:
  unit_of_measurement: W
  friendly_name: GoodWe Smart Meter L2 Power
  device_class: power
  state_class: measurement
  icon: mdi:power-plug-outline
sensor.goodwe_xxx14:
  unit_of_measurement: W
  friendly_name: GoodWe Smart Meter L3 Power
  device_class: power
  state_class: measurement
  icon: mdi:power-plug-outline
sensor.goodwe_xxx16:
  unit_of_measurement: W
  friendly_name: GoodWe Smart Meter LSum Power
  device_class: power
  state_class: measurement
  icon: mdi:power-plug-outline

Inverter exchange in HA

Hello there

First of all congratulate you on this wonderful integration, I have 2 EM inverters and it allows me to have them controlled from HA.

I have detected some problems and data inconsistencies, I will open another question for inconsistencies, in this I wanted to record possible improvements for the integration.

1.- I have 2 instances of HA, I use one of them as a test bed in which I make modifications that, when I see correct, I transfer to the instance in production, and I have detected a small problem when identifying the inverters in HA .

In my case I have 2 EMs, both identified in 'sensor_name_prefix:' as "Inversor 1 (88)" and "Inversor 2 (99)" respectively, each one with its corresponding IP, however the inverters appear interchanged in each of the HA instances.

I know that is silly, but I have doubts if this could cause that in a restart of HA or integration the inverters would be exchanged, thereby causing the historical data to also be exchanged, I wonder if it would be possible to identify with 'name:' each of the inverters with their respective IP to avoid this.

I attach images of each HA instance.
image

2.- In the latest version (0.9.1) I have seen that the value of 'sensor.goodwe_diagnose_result:' has been modified so that it now shows a descriptive text of the diagnosis, it is perfect, but I wonder if a sensor could also be maintained 'sensor.goodwe_diagnose_code:' with the code provided by the inverter, it would be more practical to be able to use it in templates or triggers in HA.

(Message translated by google translate from Spanish)

ET Powerfactor

Great addition of the power factor fields:
et.py:

...
Integer("meter_power_factor1", 20, "Meter Power Factor L1"),
Integer("meter_power_factor2", 22, "Meter Power Factor L2"),
Integer("meter_power_factor3", 24, "Meter Power Factor L3"),
...

But the values should range from -1 to 1. I think a division by 100 would be correct (not a integer value).

Watt no kiloWatt

Hi,

For the ES inverter line 996 should be
Sensor("e_load_total", 71, _read_power_k, "W", "Total Load", None),
and not
Sensor("e_load_total", 71, _read_power_k, "kW", "Total Load", None),

in file
home-assistant-goodwe-inverter/custom_components/goodwe/goodwe_inverter.py

GW2000-NS

Hi, thank you for sharing this great project. I have two inverters, GW4200-NS and GW2000-NS. Both devices can be connected, but after GW2000-NS is connected, data cannot be received.
Q`U90%91%B{Q6P_DY$CJ)YH

Issue after configuration

Hi!
I'm trying to configure that component but I get an error (I'll pass it at the end). I also have the sems portal component, but Il prefer this one, to get the data from the inverter directly.
What am i doing bad?

Thanks for you help!

Error:

Logger: homeassistant
Source: custom_components/goodwe/sensor.py:104
First occurred: 9:20:05 (1 occurrences)
Last logged: 9:20:05

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/goodwe/sensor.py", line 98, in async_refresh
    inverter_response = await self.entity.inverter.read_runtime_data()
  File "/config/custom_components/goodwe/goodwe_inverter.py", line 1000, in read_runtime_data
    raw_data = await self._read_from_socket(self._READ_DEVICE_RUNNING_DATA)
  File "/config/custom_components/goodwe/goodwe_inverter.py", line 407, in _read_from_socket
    return await command.execute(self.host, self.port)
  File "/config/custom_components/goodwe/goodwe_inverter.py", line 374, in execute
    await on_response_received
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/goodwe/sensor.py", line 104, in async_refresh
    raise PlatformNotReady
homeassistant.exceptions.PlatformNotReady

Show sensor positv and negativ and a few other things

Hi,
thanks for the fast reply to my previews request.

I have a few other things that would be nice.

  1. The "sensor.goodwe_on_grid_power" show only positiv values. It would be nice. If "gets power grid" is negativ and "sends power grid" is positiv.

  2. There is no sensor for the complete house consumption. It would be nice if its possible to see this stats (screenshot)

  3. For any reasons. The "todays energy" and "total energy" did not show the same value like the Sems Portal.

  4. The "sensor.goodwe_total_power" show value in KW and not in W. And If the value ist 0 the graph goes crazy in HA

goodwe total power

Thanks a lot again for your hard work !!!

Official HomeAssistant integration

Has there already been an attempt at making this into an official HomeAssistant integration?
If not is there a good reason why not to make it an official integration?

I am currently in the process of buying solar pannels for my house and 2 of the 3 quotations I now have include a Goodwe inverter.
If I were to choose for a Goodwe inverter I am more than happy to help out with converting this into an official integration (have done it before a couple of times for other integrations).

Wlan Modul

Hy, i have crashed my Wlan box of the GW10K-ET.
Can some one help me out with an Firmware download of his Wlanbox?

You only need an USB to UART and (HF-GDW-0004) Wlanbox
Baud Rate is 921.600, 8, 1, none
grafik

hold "enter" on power up, to get to boot mode
write "upload 0x1000 0x200000" to get the whole flash

Start Adress is 0x1000
Flash Size is 2MByte (0x200.000)

thx
best regards

Error: Could not retrieve data from inverter for GW6000EH

I just installed this integration to check if it worked on my new GW6000EH hybrid inverter, but I'm getting no readings on any of the created sensors.

In the home assistant longs I'm getting this:

2021-08-05 02:15:26 WARNING (MainThread) [custom_components.goodwe.sensor] Could not retrieve data from inverter: No valid response received to 'aa55c07f0106000245' request

My configuration is just the bare minimum:

sensor:
  - platform: goodwe
    ip_address: 192.168.1.212

I'm a developer and I might be able to help with a little direction.
I ran an nmap on the inverters' IP and saw that on TCP only port 80 is open. On that url there's a very very basic web interface to setup the wifi credentials and upload a new firmware.
I'm running an UDP nmap on all ports now, it will take around 1h and update the results.

Is there anything in particular I should check that could be helpful?

GW5048-EM - UDP port is open but no response?

When i ping using nmap i get this response:
roy@Mosquito:~$ sudo nmap -sU -p 8899 192.168.1.166 Starting Nmap 7.70 ( https://nmap.org ) at 2020-09-15 16:37 UTC Nmap scan report for 192.168.1.166 Host is up (0.016s latency). PORT STATE SERVICE 8899/udp open|filtered ospf-lite MAC Address: F0:FE:6B:D6:25:D2 (Shanghai High-Flying Electronics Technology) Nmap done: 1 IP address (1 host up) scanned in 0.61 seconds
So the port is open.
but using the test script i get this:

bash-5.0# python test.py 2020-09-15 18:45:22,643 __init__(59) - DEBUG: Using selector: EpollSelector 2020-09-15 18:45:22,644 connection_made(225) - DEBUG: Send: b'\xf7\x03\x88\xb8\x00!:\xc1' 2020-09-15 18:45:24,646 _timeout_heartbeat(248) - DEBUG: Timeout #1 2020-09-15 18:45:24,647 connection_made(225) - DEBUG: Send: b'\xf7\x03\x88\xb8\x00!:\xc1' 2020-09-15 18:45:26,649 _timeout_heartbeat(248) - DEBUG: Timeout #2 2020-09-15 18:45:26,649 connection_made(225) - DEBUG: Send: b'\xf7\x03\x88\xb8\x00!:\xc1' 2020-09-15 18:45:28,651 _timeout_heartbeat(248) - DEBUG: Timeout #3 2020-09-15 18:45:28,651 connection_made(225) - DEBUG: Send: b'\xf7\x03\x88\xb8\x00!:\xc1' 2020-09-15 18:45:30,653 _timeout_heartbeat(252) - DEBUG: Timeout #4 ^CTraceback (most recent call last): File "test.py", line 17, in <module> inverter = asyncio.run(inverter.discover(IP_ADDRESS, 8899)) File "/usr/local/lib/python3.8/asyncio/runners.py", line 43, in run return loop.run_until_complete(main) File "/usr/local/lib/python3.8/asyncio/base_events.py", line 603, in run_until_complete self.run_forever() File "/usr/local/lib/python3.8/asyncio/base_events.py", line 570, in run_forever self._run_once() File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1823, in _run_once event_list = self._selector.select(timeout) File "/usr/local/lib/python3.8/selectors.py", line 468, in select fd_event_list = self._selector.poll(timeout, max_ev) KeyboardInterrupt

The logs from HA are

2020-09-15 18:21:43 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for goodwe which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-09-15 18:21:53 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform goodwe is taking over 10 seconds. 2020-09-15 18:22:43 ERROR (MainThread) [homeassistant.components.sensor] Setup of platform goodwe is taking longer than 60 seconds. Startup will proceed without waiting any longer
I gues that is because the inverter in not responding the right way?

I have a GW6000-DT

0xF7 (247) is the default Modbus ID of the inverter

First of all, thank you for the great work!
I found a spec for the ET and might be able to add some registers to the code, but that another day.

When reading trough the documents from GoodWe, I noticed that the Modbus ID is set to 247 (0xF7) by default, but can be changed (for ET) with the PV Master app (Advanced Settings -> Communication Address). See https://community.goodwe.com/solution/Energy%20Storage%20System/Parallel-Storage-Solution for screenshots.

I think it would be good to make this ID / Communication Address configurable, such that if the ID/Communication Address was changed, the inverter still can be read (e.g. in case multiple inverters are combined).

House consumption is not correct calculated

Hi,

I think the sensor.goodwe_house_consumption is not correct calculated.
It should be sensor.goodwe_ppv - sensor.goodwe_pbattery1 + sensor.goodwe_pgrid
House_con

Also,
I'm not completly sure what sensor.goodwe_total_power is, but I think it should be shown in W and not KW. (I made a Pull request for this. Not sure if its done right. I'm not a developer ^^)

thanks a lot!

NaN values

Hi,

First at all, great job! it's amazing!
I've used this integration for months, but now, with the cold weather, I think the wifi doesn't work very well, because I've had reads from the Inverter with NaN values when the response doesn't return at time. The result is that I had a lot of "blank" spaces on te datas.
Before I was using the cloud integration, but I prefer to read it on my own net, it's faster, it's more reliable; but with this "blanks" datas is harder to know at any time the correct values.
Maybe, if the value only would update when had a valid response could be better, at least for me, I'll prefer to know the last valid value better than None (NaN).
What do you think about it?

Greetings!

Work Mode set but not applied - ES 4.6kw

Hi, although the HA goodwe.set_work_mode service sets the work mode and you can actually see it as set in PV Master it does not take effect. When you reapply in PV Master it does take effect.

Readings...

Hey,

Not really sure this is an issue, probably more just me not grasping the values being exposed by the sensors...

It'll be great if you can help me out making sense of these values.

Screenshot 2020-10-16 at 22 18 01

So, I've been reading through all the resolved issues, etc. trying to get a better understanding and I understand that sensor.house_consumption = sensor.ppv - sensor.pbattery1 + sensor.pgrid. And also that sensor.pload + sensor.gback_up = sensor.plant_power. This part makes sense to me.

But should sensor.plant_power not also be the same (or close to) sensor.house_consumption? as per the attached screenshot, sensor.house_consumption = 598W and sensor.plant_power is 807W. With sensor.pbattery1 = 598W, sensor.pgrid = 0W and sensor.ppv also = 0W. So if the plant total really does = 807W, where is the difference of 209W coming from, if not from the battery? What am I missing here?

And just to confuse me a bit more, there is another total in there, sensor.total_power, which does not match anything else. What does sensor.total_power represent?

Any pointers on helping me clear up the confusion?

The other thing that is confusing me is that my total load and generation for the day is being reported as sensor.e_load_day = 13.2kWh (SEMS Portal - 15.29kWh) and sensor.e_day = 9.5kWh (SEMS Portal - 11.40kWh). Is there something I am missing with the calculation between what's reported on SEMS Portal vs the inverter directly? I'd understand it being slightly out, but this is quite significant.

sems

Thanks.

House_comsumption less than backup

Hi I have GW5048D-ES
The consumption of the house at night with low load, appears less than the consumption of the backup, should not be greater or equal? House _consumption includes backup doesn't it?

Screenshot_2021-07-28-01-36-40-512_com android chrome

GW6KT and SEMS app

I have a GW6K-DT and since the update earlier this week it now collects data properly in HA. However as soon as it started collecting data, the SEMS app indicated my device had gone offline and it no longer worked. When I turned off the integration, the SEMS app started working again.

Using the set_work_mode item

Good day

Firstly I must say I really like the integration a lot! Been using it recently and it's pretty amazing on some of my power-hungry integrations.

Just wanted to know if the set_work_mode can currently be used? I saw in the code section it throws a NotImplementedError so I'm assuming it's not active yet?

If you need to test the toggle, please let me know as well, I might be able to assist if needed.

No longer working with DT-series after recent update

After a recent update via HACS, the integration stopped working with Home Assistant.

It still communicates with my inverter :

2021-08-24 13:43:37 DEBUG (MainThread) [custom_components.goodwe.goodwe_inverter] Connecting to DT family inverter at 192.168.123.10:8899 2021-08-24 13:43:37 DEBUG (MainThread) [custom_components.goodwe.goodwe_inverter] Send: '7f03753100280409' 2021-08-24 13:43:38 DEBUG (MainThread) [custom_components.goodwe.goodwe_inverter] Received: 'aa557f0350000000000001353830303044545332303957303134324757384b2d4454202020ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000003f203f2000802d800310001000004e4'

But then there is an error directly in HA:

2021-08-24 13:43:48 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/config/custom_components/goodwe/sensor.py", line 157, in async_refresh self.entity.update_value(inverter_response) File "/config/custom_components/goodwe/sensor.py", line 196, in update_value self.async_schedule_update_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 621, in async_schedule_update_ha_state self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 464, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 500, in _async_write_ha_state attr.update(self.state_attributes or {}) ValueError: dictionary update sequence element #0 has length 77; 2 is required

I guess the problem is here:

ValueError: dictionary update sequence element #0 has length 77; 2 is required

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.