kellerza / sunsynk

Deye/Sunsynk Inverter Python library and Home Assistant OS Addon
https://kellerza.github.io/sunsynk/
MIT License
229 stars 95 forks source link

HA Addon: no communication with inverters since firmware update on the inverter #346

Closed bsafh closed 2 months ago

bsafh commented 2 months ago

Issue related to

Sunsynk / Home Assistant Add-On dev/edge and stable version: d48d3f3 stable version: 0.7.4

Deye high voltage three phase hybrid inverter 10k new firmware Protokoll-Version:0104 MAIN:3002-1077-1E08 HMI:2001-C032

RS485-ETH adapter is reachable via IP from Addon,

MQTT broker is accepting messages.

Describe the issue/bug

Since update of the inverter firmware to the above mentioned version, no MQTT messages are seen any more in the MQTT broker (and therefore not in Homeassistant as well). Nothing. Total silence, not a single message. No error messages in Addon log.

looks like the inverters do not talk to the RS485-ETH box any more - is there any setting in the Deye inverter setting to disable or enable the RS485 communication?

The Solarman App and the Solarman HA integration do continue to work without issues. But nothing over RS485 any more.

Expected behavior

messages ar passewd to MQTT broker

Your environment

You configuration


DRIVER: pymodbus
INVERTERS:
  - SERIAL_NR: "23121221XX"
    HA_PREFIX: WR_Deye_1
    MODBUS_ID: 1
    DONGLE_SERIAL_NUMBER: "0"
    PORT: serial-tcp://192.168.80.44:8234
  - SERIAL_NR: "23121262YY"
    HA_PREFIX: WR_Deye_2
    MODBUS_ID: 2
    DONGLE_SERIAL_NUMBER: "0"
    PORT: serial-tcp://192.168.80.45:8234
SENSOR_DEFINITIONS: three-phase-hv
SENSORS:
  - energy_management
  - power_flow_card
  - pv2_power
  - settings
  - all
  - pv1_power
  - grid_ct_power
  - Inverter power
  - Inverter L1 power
  - Inverter L2 power
  - Inverter L3 power
  - Inverter voltage
  - Inverter frequency
  - Grid frequency
  - Grid power
  - Grid L1 power
  - Grid L3 power
  - Grid L2 power
  - Grid L2 voltage
  - Grid L1 voltage
  - Grid L3 voltage
  - Load power
  - Load L1 power
  - Load L2 power
  - Load L3 power
  - Load L1 voltage
  - Load L2 voltage
  - Load L3 voltage
  - PV1 power
  - PV1 voltage
  - PV1 current
  - PV2 power
  - PV2 voltage
  - PV2 current
  - Gen power
  - Gen L1 power
  - Gen L2 power
  - Gen L3 power
  - Total Load Energy
  - Rated power
  - Device type
  - Fault
  - Overall state
  - Serial
  - DC transformer temperature
  - Radiator temperature
  - Grid Connected
  - Date Time
  - INV Relay Status
  - Undefined Load Relay Status
  - Grid Relay Status
  - Generator Relay Status
  - Grid Give Power to Relay Status
  - Dry Contact1 Status
  - Dry Contact2 Status
  - Grid Charge Battery current
  - Grid Charge Start Battery SOC
  - Grid Charge enabled
  - Use Timer
  - Solar Export
  - Export Limit power
  - Battery Max Charge current
  - Battery Max Discharge current
  - Battery Capacity current
  - Grid Peak Shaving power
  - Battery low voltage
  - System Zero Export power
  - Battery Equalization Days
  - Battery Equalization Hours
  - Generator Charge enabled
  - Battery Wake Up
  - Battery Resistance
  - Generator Port Usage
  - Battery Equalization voltage
  - Battery Absorption voltage
  - Battery Float voltage
  - Battery Shutdown Capacity
  - Battery Restart Capacity
  - Battery Low Capacity
  - Battery Shutdown voltage
  - Battery Low voltage
  - Battery Restart voltage
  - Priority Load
  - Load Limit
  - Prog1 Time
  - Prog2 Time
  - Prog3 Time
  - Prog4 Time
  - Prog5 Time
  - Prog6 Time
  - Prog1 power
  - Prog2 power
  - Prog3 power
  - Prog4 power
  - Prog5 power
  - Prog6 power
  - Prog1 Capacity
  - Prog2 Capacity
  - Prog3 Capacity
  - Prog4 Capacity
  - Prog5 Capacity
  - Prog6 Capacity
  - Prog1 charge
  - Prog2 charge
  - Prog3 charge
  - Prog4 charge
  - Prog5 charge
  - Prog6 charge
  - Prog1 voltage
  - Prog2 voltage
  - Prog3 voltage
  - Prog4 voltage
  - Prog5 voltage
  - Prog6 voltage
  - Day Active Energy
  - Day Battery Charge
  - Day Battery discharge
  - Day Grid Export
  - Day Grid Import
  - Day Gen Energy
  - Day Load Energy
  - Day PV Energy
  - Total Active Energy
  - Total Battery Charge
  - Total Battery Discharge
  - Total Grid Export
  - Total Grid Import
  - Total PV Energy
  - Battery 1 temperature
  - Battery 1 voltage
  - Battery 1 SOC
  - Battery 1 power
  - Battery 1 current
  - Grid current
  - Grid CT power
  - Day Battery Discharge
  - Device Type
  - Overall State
  - Battery 1 temperature
  - Battery 1 voltage
  - Battery 1 SOC
  - Battery 1 power
  - Battery 1 current
  - A Phase Power on the Inner Side of the Grid
  - B Phase Power on the Inner Side of the Grid
  - C Phase Power on the Inner Side of the Grid
  - Total Active Power from Side to Side of the Grid
  - Grid Side - Inside Total Apparent Power
  - PV power
  - Gen L1 volts
  - Gen L2 volts
  - Gen L3 volts
  - Fan Warning
  - Grid Phase Warning
  - Lithium Battery Loss Warning
  - Parallel Communication Quality Warning
  - SD Status
  - Max Solar power
  - Generator Charge Start Battery SOC
  - Generator Charge Battery current
  - Parallel Battery 1 and 2
  - Battery 1 Wake Up
  - Battery Charge Efficiency
  - Battery Type
  - Prog Time Of Use Enabled
  - Prog Monday Enabled
  - Prog Tuesday Enabled
  - Prog Wednesday Enabled
  - Prog Thursday Enabled
  - Prog Friday Enabled
  - Prog Saturday Enabled
  - Prog Sunday Enabled
  - Gen peak-shaving
  - Grid peak-shaving
  - External relay
  - Loss of lithium battery report fault
  - DRM
  - Generator AC Couple Frz High
  - Generator Off SOC
  - Generator On SOC
  - Generator Max Operating Time
  - Generator Cooling Time
  - Min PV Power for Gen Start
  - Grid Signal On
  - Gen Signal On
  - Grid Standard
  - Configured Grid Frequency
  - Configured Grid Phases
  - Lithium HV BMS Protocol
  - Battery 1 Manufacturer
  - Battery 1 BMS charging voltage
  - Battery 1 BMS discharging voltage
  - Battery 1 BMS charging current limit
  - Battery 1 BMS discharging current limit
  - Battery 1 BMS SOC
  - Battery 1 BMS voltage
  - Battery 1 BMS current
  - Battery 1 BMS temperature
  - Battery 1 BMS max charge current limit
  - Battery 1 BMS max discharge current limit
  - Battery 1 BMS alarm flag
  - Battery 1 BMS fault flag
  - Battery 1 BMS other flag - Battery 1 Force charge
  - Battery 1 BMS other flag - Battery 2 Force charge
  - Battery 1 BMS other flag - Battery 1 Sleep
  - Battery 1 BMS type
  - Battery 1 BMS SOH
  - Battery 1 BMS software version
  - Battery 1 BMS rated AH
  - Battery 1 BMS hardware version
  - Time synchronization
  - Beep
  - AM PM
  - Auto dim
  - priority_load
  - battery_1_temperature
  - battery_1_voltage
  - battery_1_current
  - Serial
  - battery_1_power
  - battery_1_soc
SENSORS_FIRST_INVERTER: []
MANUFACTURER: Deye
READ_ALLOW_GAP: 2
READ_SENSORS_BATCH_SIZE: 20
SCHEDULES:
  - KEY: w
    READ_EVERY: 2
    REPORT_EVERY: 4
    CHANGE_ANY: false
    CHANGE_BY: 50
    CHANGE_PERCENT: 1
  - KEY: kwh
    READ_EVERY: 10
    REPORT_EVERY: 20
    CHANGE_ANY: false
  - KEY: date_time
    READ_EVERY: 60
    REPORT_EVERY: 60
    CHANGE_ANY: true
  - KEY: rw
    READ_EVERY: 5
    REPORT_EVERY: 10
    CHANGE_ANY: true
  - KEY: any_unit
    READ_EVERY: 10
    REPORT_EVERY: 20
    CHANGE_ANY: false
  - KEY: no_unit
    READ_EVERY: 10
    REPORT_EVERY: 30
    CHANGE_ANY: true
NUMBER_ENTITY_MODE: box
PROG_TIME_INTERVAL: "60"
MQTT_HOST: core-mosquitto
MQTT_PORT: 1883
MQTT_USERNAME: mqttuser
MQTT_PASSWORD: SECRET

Logs


15:11:25 ERROR   Unknown sensor specified: year_grid_export
15:11:25 ERROR   Unknown sensor specified: year_load_energy
15:11:25 ERROR   Unknown sensor specified: year_pv_energy
15:11:25 ERROR   Unknown sensor specified: environment_temperature
15:11:25 ERROR   Unknown sensor specified: control_mode
15:11:25 ERROR   Unknown sensor specified: generator_input
15:11:25 ERROR   Unknown sensor specified: battery_charging_voltage
15:11:25 ERROR   Unknown sensor specified: bat1_cycle
15:11:25 INFO    Added hidden sensors as other sensors depend on it: Rated power, Serial
15:11:25 INFO    Connecting to serial-tcp://192.168.80.44:8234
15:11:25 INFO    PyModbus 3.7.2 serial-tcp: 192.168.80.44:8234
15:11:25 INFO    Reading startup sensors Prog2 Time, Prog1 Time, Battery Low Capacity, Serial, Prog3 Time, Battery Low voltage, Rated power, Battery Restart Capacity, Prog5 Time, Battery Shutdown Capacity, Battery Shutdown voltage, Prog6 Time, Prog4 Time, Battery Float voltage
15:12:20 ERROR   timeout reading 5 registers from 3; timeout reading 2 registers from 20; timeout reading 1 registers from 101; timeout reading 6 registers from 115; timeout reading 6 registers from 148
15:13:15 ERROR   timeout reading 5 registers from 3; timeout reading 2 registers from 20; timeout reading 1 registers from 101; timeout reading 6 registers from 115; timeout reading 6 registers from 148
15:14:11 ERROR   timeout reading 5 registers from 3; timeout reading 2 registers from 20; timeout reading 1 registers from 101; timeout reading 6 registers from 115; timeout reading 6 registers from 148
15:14:11 WARNING Retrying individual sensors: ['prog2_time', 'prog1_time', 'battery_low_capacity', 'serial', 'prog3_time', 'battery_low_voltage', 'rated_power', 'battery_restart_capacity', 'prog5_time', 'battery_shutdown_capacity', 'battery_shutdown_voltage', 'prog6_time', 'prog4_time', 'battery_float_voltage']
15:14:22 ERROR   timeout reading 1 registers from 149 Prog2 Time
15:14:33 ERROR   timeout reading 1 registers from 148 Prog1 Time
15:14:44 ERROR   timeout reading 1 registers from 117 Battery Low Capacity
15:14:55 ERROR   timeout reading 5 registers from 3 Serial
15:15:06 ERROR   timeout reading 1 registers from 150 Prog3 Time
15:15:17 ERROR   timeout reading 1 registers from 120 Battery Low voltage
15:15:28 ERROR   timeout reading 2 registers from 20 Rated power
15:15:40 ERROR   timeout reading 1 registers from 116 Battery Restart Capacity
15:15:51 ERROR   timeout reading 1 registers from 152 Prog5 Time
15:16:02 ERROR   timeout reading 1 registers from 115 Battery Shutdown Capacity
15:16:13 ERROR   timeout reading 1 registers from 118 Battery Shutdown voltage
15:16:24 ERROR   timeout reading 1 registers from 153 Prog6 Time
15:16:35 ERROR   timeout reading 1 registers from 151 Prog4 Time
15:16:46 ERROR   timeout reading 1 registers from 101 Battery Float voltage
15:16:47 CRITICAL Could not read sensors: ['Prog2 Time', 'Prog1 Time', 'Battery Low Capacity', 'Serial', 'Prog3 Time', 'Battery Low voltage', 'Rated power', 'Battery Restart Capacity', 'Prog5 Time', 'Battery Shutdown Capacity', 'Battery Shutdown voltage', 'Prog6 Time', 'Prog4 Time', 'Battery Float voltage']
15:16:47 INFO    ############################################################
15:16:47 INFO    No response on the Modbus interface serial-tcp://192.168.80.44:8234, see https://kellerza.github.io/sunsynk/guide/fault-finding
15:16:47 INFO    ############################################################
15:16:47 CRITICAL This Add-On will terminate in 30 seconds, use the Supervisor Watchdog to restart automatically.
[15:17:17] INFO: Service restart after closing
15:17:19 INFO    Loading configuration: /data/options.json
15:17:19 INFO    sunsynk library version: 0.6.4
15:17:20 INFO    Schedules:
+-----------+-----+------+--------+-----------+----------+------------+
|    Key    | src | Read | Report | Change by | Change % | Change any |
+-----------+-----+------+--------+-----------+----------+------------+
| date_time |  *  |  60  |   60   |           |          |     1      |
|     rw    |  *  |  5   |   10   |           |          |     1      |
|    enum   |     |  5   |  300   |           |          |    True    |
|     w     |  *  |  2   |   4    |     50    |    1     |            |
|    kwh    |  *  |  10  |   20   |           |          |            |
|  any_unit |  *  |  10  |   20   |           |          |            |
|  no_unit  |  *  |  10  |   30   |           |          |     1      |
+-----------+-----+------+--------+-----------+----------+------------+
15:17:20 INFO    Using three phase HV sensor definitions.
15:17:20 ERROR   Unknown sensor specified: essential_power
15:17:20 ERROR   Your config includes deprecated sensors. Replace battery_power with battery_1_power
15:17:20 ERROR   Your config includes deprecated sensors. Replace battery_soc with battery_1_soc
15:17:20 ERROR   Unknown sensor specified: non_essential_power
15:17:20 ERROR   Unknown sensor specified: gen_energy
15:17:20 ERROR   Unknown sensor specified: load_energy
15:17:20 ERROR   Unknown sensor specified: prog1_mode
15:17:20 ERROR   Unknown sensor specified: prog2_mode
15:17:20 ERROR   Unknown sensor specified: prog3_mode
15:17:20 ERROR   Unknown sensor specified: prog4_mode
15:17:20 ERROR   Unknown sensor specified: prog5_mode
15:17:20 ERROR   Unknown sensor specified: prog6_mode
15:17:20 ERROR   Unknown sensor specified: battery_charge_limit_current
15:17:20 ERROR   Unknown sensor specified: battery_discharge_limit_current
15:17:20 ERROR   Unknown sensor specified: inverter_current
15:17:20 ERROR   Unknown sensor specified: grid_ld_power
15:17:20 ERROR   Unknown sensor specified: grid_voltage
15:17:20 ERROR   Unknown sensor specified: load_frequency
15:17:20 ERROR   Unknown sensor specified: aux_power
15:17:20 ERROR   Unknown sensor specified: essential_power
15:17:20 ERROR   Unknown sensor specified: essential_1_power
15:17:20 ERROR   Unknown sensor specified: essential_2_power
15:17:20 ERROR   Unknown sensor specified: non_essential_power
15:17:20 ERROR   Unknown sensor specified: day_reactive_energy
15:17:20 ERROR   Unknown sensor specified: month_grid_energy
15:17:20 ERROR   Unknown sensor specified: month_load_energy
15:17:20 ERROR   Unknown sensor specified: month_pv_energy
15:17:20 ERROR   Unknown sensor specified: year_grid_export
15:17:20 ERROR   Unknown sensor specified: year_load_energy
15:17:20 ERROR   Unknown sensor specified: year_pv_energy
15:17:20 ERROR   Unknown sensor specified: environment_temperature
15:17:20 ERROR   Unknown sensor specified: control_mode
15:17:20 ERROR   Unknown sensor specified: generator_input
15:17:20 ERROR   Unknown sensor specified: battery_charging_voltage
15:17:20 ERROR   Unknown sensor specified: bat1_cycle
15:17:20 INFO    Added hidden sensors as other sensors depend on it: Rated power, Serial
15:17:20 INFO    Connecting to serial-tcp://192.168.80.44:8234
15:17:20 INFO    PyModbus 3.7.2 serial-tcp: 192.168.80.44:8234
15:17:20 INFO    Reading startup sensors Prog3 Time, Rated power, Prog5 Time, Battery Shutdown Capacity, Prog1 Time, Battery Low voltage, Battery Restart Capacity, Battery Float voltage, Battery Low Capacity, Battery Shutdown voltage, Serial, Prog4 Time, Prog2 Time, Prog6 Time
kellerza commented 2 months ago

Most likely the modbus id went back to 0. Otherwise, treat it like a new install & follow the fault-finding section in the docs

or downgrade :wink:

bsafh commented 2 months ago

well, the modbus IDs of the 2 inverters have been 0 and 1, so falling back to 0 should at least result in one inverter sending data.

I do have one RS485-ETH bridge per inverter, so there should be no interference, even if both are on 0

I do not have a copy of the previous firmware ...

kellerza commented 2 months ago

Don't use 0

bsafh commented 2 months ago

One inverter is on 0, the other on 1, just as before the update. Neither of them sends any data (they both have there own RS485-ETH adapter).

Cables and adapters have not been touched at all. Just the inverter firmware was updated.

bsafh commented 2 months ago

I just received an answer from the Deye support:

"Can i update HMI to solve problem. Because the firmware is special for using RS485."

Whatever that means?

bsafh commented 2 months ago

well, the Deye support installed another update of the HMI and now RS485 works again (without any changes to the wires or the adapter).

This combination works: MAIN:3002-1077-1E08 HMI:2001-C0F4

HMI 2001-C032 does NOT support RS485 on the SUN-10K-SG01HP3-EU-AM2 !!!