kellerza / sunsynk

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

No connetion to Elfin EW11 Rs485 Wifi Adapter #211

Closed meg510 closed 11 months ago

meg510 commented 11 months ago

Issue related to

Sunsynk Home Assistant Add-On

Describe the issue/bug

Timeout at connection to EW11, see protocol below

EW11 is connected via a splitted RJ45 Cablel to BMS Port 4/5 goes to Gobel Battery-CAN 7/8 Goes to EW11 Rest cut off

In Deye Config I have set Modbus ID to 01

In EW11 status it says connected to HA IP (see attachments) EW11_Config03 EW11_Config02 EW11_Config01

I have already played arround with the config/ports, but no change. So every assistance is verry appreciated

Many thanks in advance Martin

Your environment

You configuration

DRIVER: pymodbus
INVERTERS:
  - SERIAL_NR: "001"
    HA_PREFIX: DY
    MODBUS_ID: 1
    DONGLE_SERIAL_NUMBER: "0"
    PORT: tcp://192.168.0.62:502
SENSOR_DEFINITIONS: three-phase
SENSORS:
  - energy_management
  - power_flow_card
  - pv2_power
SENSORS_FIRST_INVERTER:
  - settings
MANUFACTURER: Sunsynk
READ_ALLOW_GAP: 2
READ_SENSORS_BATCH_SIZE: 20
SCHEDULES:
  - KEY: W
    READ_EVERY: 5
    REPORT_EVERY: 60
    CHANGE_ANY: false
    CHANGE_BY: 80
    CHANGE_PERCENT: 0
NUMBER_ENTITY_MODE: auto
MQTT_HOST: core-mosquitto
MQTT_PORT: 1883
MQTT_USERNAME: ew11_AddOn
MQTT_PASSWORD: Magri7788..
DEBUG: 0
DEBUG_DEVICE: /dev/ttyS0

Logs


[14:22:50] INFO: Service restart after closing
14:22:51 INFO    Loading configuration: /data/options.json
14:22:51 INFO    sunsynk library version: 0.6.4
14:22:51 INFO    Schedules:
+-----------+-----+------+--------+-----------+----------+------------+
|    Key    | src | Read | Report | Change by | Change % | Change any |
+-----------+-----+------+--------+-----------+----------+------------+
| date_time |     |  60  |   60   |           |          |    True    |
|     rw    |     |  5   |  300   |           |          |    True    |
|     w     |  *  |  5   |   60   |     80    |          |            |
|    kwh    |     | 300  |  300   |           |          |            |
|  any_unit |     |  15  |  300   |           |          |            |
|  no_unit  |     |  15  |  300   |           |          |    True    |
+-----------+-----+------+--------+-----------+----------+------------+
14:22:51 INFO    Using three phase sensor definitions.
14:22:51 ERROR   Unknown sensor specified: aux_power
14:22:51 ERROR   Unknown sensor specified: essential_power
14:22:51 ERROR   Unknown sensor specified: grid_connected
14:22:51 ERROR   Unknown sensor specified: inverter_current
14:22:51 ERROR   Unknown sensor specified: load_frequency
14:22:51 ERROR   Unknown sensor specified: non_essential_power
14:22:51 INFO    Added hidden sensors as other sensors depend on it: Rated power, Serial
14:22:51 INFO    Connecting to tcp://192.168.0.62:502
14:22:51 INFO    PyModbus 3.4.1 tcp: 192.168.0.62:502
14:22:51 INFO    Reading startup sensors Prog4 Time, Prog3 Time, Serial, Prog6 Time, Battery Low Capacity, Prog2 Time, Prog5 Time, Rated power, Prog1 Time
14:22:54 ERROR   Timeout 
14:22:57 ERROR   Timeout 
14:23:00 ERROR   Timeout 
14:23:00 WARNING Retrying individual sensors: ['prog4_time', 'prog3_time', 'serial', 'prog6_time', 'battery_low_capacity', 'prog2_time', 'prog5_time', 'rated_power', 'prog1_time']
14:23:03 ERROR   Timeout Prog4 Time
14:23:07 ERROR   Timeout Prog3 Time
14:23:10 ERROR   Timeout Serial
14:23:13 ERROR   Timeout Prog6 Time
14:23:16 ERROR   Timeout Battery Low Capacity
14:23:19 ERROR   Timeout Prog2 Time
14:23:22 ERROR   Timeout Prog5 Time
14:23:25 ERROR   Timeout Rated power
14:23:28 ERROR   Timeout Prog1 Time
14:23:29 CRITICAL Could not read sensors: ['Prog4 Time', 'Prog3 Time', 'Serial', 'Prog6 Time', 'Battery Low Capacity', 'Prog2 Time', 'Prog5 Time', 'Rated power', 'Prog1 Time']
14:23:29 INFO    ############################################################
14:23:29 INFO    No response on the Modbus interface tcp://192.168.0.62:502, see https://kellerza.github.io/sunsynk/guide/fault-finding
14:23:29 INFO    ############################################################
14:23:29 CRITICAL This Add-On will terminate in 30 seconds, use the Supervisor Watchdog to restart automatically.
kellerza commented 11 months ago

The logs seem to indicate that there is no reply from the RS485 bus. So this could be incorrect wiring, termination resistors etc.

You could also try - PORT: serial-tcp://homeassistant.local:502 depending on the capabilities of the Elfin adaptor

meg510 commented 11 months ago

Hi Johann,

thank you for your reply.

I have meanwhile found in a HA forum a similar Elfin problem with another inverter: https://community.home-assistant.io/t/epever-rs485-elfin-ew11-wifi-modbus-or-mqtt/211137/31?page=3

The solution was to make a factory reset on the EW11 and afterwards set again the above settings. After that it worked as expected. I have no idea what the actual problem was. Probably the EW11 was in a strange state, due to the many tries with different settings.

Thank you and Regards, Martin

kellerza commented 11 months ago

Glad you got it working!