Haltet euch BITTE an die Forumsregeln, jeder der hier Mitglied ist, hat bei der Registrierung den Regeln zugestimmt. Wer sich nicht daran hält, wird aus dem Forum entfernt.
Deye Hybrid Angebote Deye Zubehör Produkte
Hallo zusammen, ich versuche meinen Deye 12k über die Applikation von kellerza dauerhaft auszulesen. Soweit klappt es mit meiner Konfiguration, meine Daten werden ausgelesen und aktualisiert, aber nach ca. 20 Minuten bekomme ich andauernd Time-Outs bis die Daten einfrieren. Die Log-Datei gibt aus:
13:14:44 INFO Loading config: /data/options.json
13:14:44 INFO sunsynk library version: 0.8.2
13:14:44 INFO Schedules:
+-----------+-----+------+--------+-----------+----------+------------+
| Key | src | Read | Report | Change by | Change % | Change any |
+-----------+-----+------+--------+-----------+----------+------------+
| date_time | | 60 | 60 | | | True |
| rw | | 5 | 300 | | | True |
| enum | | 5 | 300 | | | True |
| w | * | 20 | 20 | 80.0 | | |
| kwh | * | 60 | 60 | | | |
| any_unit | * | 60 | 60 | | | |
| no_unit | | 15 | 300 | | | True |
+-----------+-----+------+--------+-----------+----------+------------+
13:14:44 INFO Using three phase sensor definitions.
13:14:44 INFO Added hidden sensors as other sensors depend on it: Device type, Protocol, Serial
13:14:44 INFO Connecting to /dev/ttyUSB0
13:14:44 INFO PyModbus 3.8.3 Serial: /dev/ttyUSB0
13:14:44 INFO Reading startup sensors Device type, Protocol, Serial
13:14:47 INFO ############################################################
13:14:47 INFO Inverter serial number '****'
13:14:47 INFO ############################################################
13:14:47 INFO Device type: Low voltage three phase hybrid, using the three-phase sensor definitions
13:14:47 INFO Protocol version: 1.4
13:14:47 INFO Reading all sensors Device type, Protocol, Serial, Battery temperature, Battery voltage, Battery SOC, Battery power, Battery current, Inverter power, Inverter L1 power, Inverter L2 power, Inverter L3 power, Grid power, Grid L1 power, Grid L2 power, Grid L3 power, Load power, Load L1 power, Load L2 power, Load L3 power, PV power, PV1 power, PV1 voltage, PV1 current, PV2 power, PV2 voltage, PV2 current, Day Battery Charge, Day Battery discharge, Day Grid Import, Day Gen Energy, Day Load Energy, Day PV Energy, Total Battery Charge, Total Battery Discharge, Total Grid Import, Total Load Energy, Total PV Energy
13:14:48 INFO MQTT: Connecting to *@core-mosquitto:1883
13:14:48 INFO MQTT: Connection successful
13:14:49 INFO Read every (inverter 1)
+----+--------------------------------------------------------------------------------+
| s | Sensors |
+----+--------------------------------------------------------------------------------+
| 5 | device_type |
| 15 | serial, protocol |
| 20 | grid_l3_power, load_power, load_l3_power, inverter_power, inverter_l1_power, |
| | battery_power, grid_power, load_l1_power, pv1_power, pv_power, |
| | inverter_l2_power, pv2_power, grid_l2_power, inverter_l3_power, load_l2_power, |
| | grid_l1_power |
| 60 | pv1_current, day_battery_charge, total_battery_discharge, battery_temperature, |
| | pv1_voltage, day_pv_energy, battery_voltage, day_battery_discharge, |
| | day_gen_energy, battery_soc, total_load_energy, battery_current, |
| | total_battery_charge, pv2_current, day_grid_import, total_grid_import, |
| | total_pv_energy, day_load_energy, pv2_voltage |
+----+--------------------------------------------------------------------------------+
13:14:49 INFO Report every (inverter 1)
+----+--------------------------------------------------------------------------------+
| s | Sensors |
+----+--------------------------------------------------------------------------------+
| 20 | grid_l3_power, load_power, load_l3_power, inverter_power, inverter_l1_power, |
| | battery_power, grid_power, load_l1_power, pv1_power, pv_power, |
| | inverter_l2_power, pv2_power, grid_l2_power, inverter_l3_power, load_l2_power, |
| | grid_l1_power |
| 60 | pv1_current, day_battery_charge, total_battery_discharge, battery_temperature, |
| | pv1_voltage, day_pv_energy, battery_voltage, day_battery_discharge, |
| | day_gen_energy, battery_soc, total_load_energy, battery_current, |
| | total_battery_charge, pv2_current, day_grid_import, total_grid_import, |
| | total_pv_energy, day_load_energy, pv2_voltage |
+----+--------------------------------------------------------------------------------+
13:34:15 ERROR OSError in callback read_ss: timeout reading 1 registers from 590; timeout reading 4 registers from 622; timeout reading 4 registers from 633; timeout reading 4 registers from 650; timeout reading 4 registers from 672 poll_need_to_read
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/ha_addon_sunsynk_multi/timer_callback.py", line 81, in wrap_callback
await cb_call
File "/usr/local/lib/python3.12/site-packages/ha_addon_sunsynk_multi/sensor_callback.py", line 110, in callback_sensor
await ist.read_sensors(
File "/usr/local/lib/python3.12/site-packages/ha_addon_sunsynk_multi/a_inverter.py", line 55, in read_sensors
await self.inv.read_sensors(sensors)
File "/usr/local/lib/python3.12/site-packages/sunsynk/sunsynk.py", line 134, in read_sensors
raise IOError("; ".join(errs))
OSError: timeout reading 1 registers from 590; timeout reading 4 registers from 622; timeout reading 4 registers from 633; timeout reading 4 registers from 650; timeout reading 4 registers from 672 poll_need_to_read
13:36:06 ERROR OSError in callback read_ss: timeout reading 8 registers from 0; timeout reading 7 registers from 514; timeout reading 2 registers from 522; timeout reading 4 registers from 526; timeout reading 3 registers from 534; timeout reading 6 registers from 586; timeout reading 4 registers from 622; timeout reading 4 registers from 633; timeout reading 4 registers from 650; timeout reading 8 registers from 672 poll_need_to_read
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/ha_addon_sunsynk_multi/timer_callback.py", line 81, in wrap_callback
await cb_call
File "/usr/local/lib/python3.12/site-packages/ha_addon_sunsynk_multi/sensor_callback.py", line 110, in callback_sensor
await ist.read_sensors(
File "/usr/local/lib/python3.12/site-packages/ha_addon_sunsynk_multi/a_inverter.py", line 55, in read_sensors
await self.inv.read_sensors(sensors)
File "/usr/local/lib/python3.12/site-packages/sunsynk/sunsynk.py", line 134, in read_sensors
raise IOError("; ".join(errs))
OSError: timeout reading 8 registers from 0; timeout reading 7 registers from 514; timeout reading 2 registers from 522; timeout reading 4 registers from 526; timeout reading 3 registers from 534; timeout reading 6 registers from 586; timeout reading 4 registers from 622; timeout reading 4 registers from 633; timeout reading 4 registers from 650; timeout reading 8 registers from 672 poll_need_to_read
13:40:00 ERROR (2 in 5 min) OSError in callback read_ss: timeout reading 8 registers from 0; timeout reading 7 registers from 514; timeout reading 2 registers from 522; timeout reading 4 registers from 526; timeout reading 3 registers from 534; timeout reading 6 registers from 586; timeout reading 4 registers from 622; timeout reading 4 registers from 633; timeout reading 4 registers from 650; timeout reading 8 registers from 672 poll_need_to_read
Da der WR in einem wlan-freien Bereich liegt habe ich ein Netzwerkkabel (CAT7) bis zum Zählerschrank gelegt (ca. 30m). Auf 6 Adern des Kabels sind die CT angeschlossen. Auf den restlichen zwei Adern habe ich A und B aus dem ModBus-Port meines Deye abgezweigt, die auf einen USB-to-RS485 Adapter gehen. Ich habe schon zwei unterschiedliche Adapter probiert und jeweils das gleiche Fehlerbild. Am BMS-Port hängt meine Batterie (ebenfalls über RS485, CAN ist nur bedingt möglich). Ich habe die Firmware C037 und 1144-1807 drauf und bekomme auch Daten aus dem ModBus-Port. Wenn die Batterie abgeklemmt ist, habe ich ebenfalls das gleiche Problem. Mein Wifi-Dongle ist nicht montiert. Der Deye ist auf Master und die Modbus SN auf 01 gestellt.
Meine Konfiguration ist wie folgt:
DRIVER: pymodbus INVERTERS: - SERIAL_NR: "*" HA_PREFIX: SS MODBUS_ID: 1 DONGLE_SERIAL_NUMBER: "0" PORT: /dev/ttyUSB0 SENSOR_DEFINITIONS: three-phase SENSORS: - battery_temperature - battery_voltage - battery_soc - battery_power - battery_current - inverter_power - inverter l1_power - inverter l2_power - inverter l3_power - grid_power - grid_l1_power - grid_l2_power - grid_l3_power - load_power - load_l1_power - load_l2_power - load_l3_power - pv_power - pv1_power - pv1_voltage - pv1_current - pv2_power - pv2_voltage - pv2_current - day_battery_charge - day_battery_discharge - day_grid_import - day_gen_energy - day_load_energy - day_pv_energy - total_battery_charge - total_battery_discharge - total_grid_import - total_load_energy - total_pv_energy SENSORS_FIRST_INVERTER: [] MANUFACTURER: Deye READ_ALLOW_GAP: 2 READ_SENSORS_BATCH_SIZE: 8 SCHEDULES: - KEY: W READ_EVERY: 20 REPORT_EVERY: 20 CHANGE_ANY: false CHANGE_BY: 80 CHANGE_PERCENT: 0 - KEY: KWH READ_EVERY: 60 REPORT_EVERY: 60 - KEY: any_unit READ_EVERY: 60 REPORT_EVERY: 60 NUMBER_ENTITY_MODE: auto PROG_TIME_INTERVAL: 15 MQTT_HOST: core-mosquitto MQTT_PORT: 1883 MQTT_USERNAME: * MQTT_PASSWORD: *
Die Ausgabe im MQTT ist:
2025-02-02 13:23:04: New connection from 172.30.32.1:41259 on port 1883.
2025-02-02 13:23:04: New client connected from 172.30.32.1:41259 as 2yj9e3FMxADw8jbJ0SzxAZ (p2, c1, k60, u'*').
2025-02-02 13:42:49: New connection from 172.30.33.1:48375 on port 1883.
2025-02-02 13:42:49: New client connected from 172.30.33.1:48375 as auto-D9BA70F1-08F2-8C43-5491-0E1EA2500D4D (p2, c1, k60, u'*').
2025-02-02 13:52:15: Saving in-memory database to /data//mosquitto.db.
2025-02-02 14:12:27: Client auto-D9BA70F1-08F2-8C43-5491-0E1EA2500D4D closed its connection
Als möglichen Lösungsweg habe ich auch wie in dem Beitrag ( https://github.com/kellerza/sunsynk/discussions/98 ) empfohlen auf mbusd umgestellt und die Konfiguration wie folgt angepasst:
DRIVER: pymodbus INVERTERS: - SERIAL_NR: "*" HA_PREFIX: SS MODBUS_ID: 1 DONGLE_SERIAL_NUMBER: "0" PORT: tcp://homeassistant.local:502
Dann erhalte ich ebenfalls nach ca. 20-30 min einen EXCEPTION Fehler:
13:45:17 INFO Connecting to tcp://homeassistant.local:502
13:45:17 INFO PyModbus 3.8.3 tcp: homeassistant.local:502
13:45:17 INFO Reading startup sensors Device type, Protocol, Serial
13:45:17 INFO ############################################################
13:45:17 INFO Inverter serial number '****'
13:45:17 INFO ############################################################
13:45:17 INFO Device type: Low voltage three phase hybrid, using the three-phase sensor definitions
13:45:17 INFO Protocol version: 1.4
13:45:17 INFO Reading all sensors Device type, Protocol, Serial, Battery temperature, Battery voltage, Battery SOC, Battery power, Battery current, Inverter power, Inverter L1 power, Inverter L2 power, Inverter L3 power, Grid power, Grid L1 power, Grid L2 power, Grid L3 power, Load power, Load L1 power, Load L2 power, Load L3 power, PV power, PV1 power, PV1 voltage, PV1 current, PV2 power, PV2 voltage, PV2 current, Day Battery Charge, Day Battery discharge, Day Grid Import, Day Gen Energy, Day Load Energy, Day PV Energy, Total Battery Charge, Total Battery Discharge, Total Grid Import, Total Load Energy, Total PV Energy
13:45:20 INFO MQTT: Connecting to **@core-mosquitto:1883
13:45:20 INFO MQTT: Connection successful
13:45:21 INFO Read every (inverter 1)
+----+-------------------------------------------------------------------------------+
| s | Sensors |
+----+-------------------------------------------------------------------------------+
| 5 | device_type |
| 15 | serial, protocol |
| 20 | grid_power, inverter_power, inverter_l3_power, grid_l1_power, pv2_power, |
| | grid_l3_power, load_l1_power, load_power, pv1_power, inverter_l1_power, |
| | grid_l2_power, pv_power, load_l2_power, inverter_l2_power, load_l3_power, |
| | battery_power |
| 60 | total_battery_discharge, day_grid_import, day_battery_discharge, battery_soc, |
| | pv2_voltage, pv1_current, pv2_current, total_grid_import, battery_voltage, |
| | day_pv_energy, battery_current, total_battery_charge, day_load_energy, |
| | day_gen_energy, pv1_voltage, total_pv_energy, battery_temperature, |
| | day_battery_charge, total_load_energy |
+----+-------------------------------------------------------------------------------+
13:45:21 INFO Report every (inverter 1)
+----+-------------------------------------------------------------------------------+
| s | Sensors |
+----+-------------------------------------------------------------------------------+
| 20 | grid_power, inverter_power, inverter_l3_power, grid_l1_power, pv2_power, |
| | grid_l3_power, load_l1_power, load_power, pv1_power, inverter_l1_power, |
| | grid_l2_power, pv_power, load_l2_power, inverter_l2_power, load_l3_power, |
| | battery_power |
| 60 | total_battery_discharge, day_grid_import, day_battery_discharge, battery_soc, |
| | pv2_voltage, pv1_current, pv2_current, total_grid_import, battery_voltage, |
| | day_pv_energy, battery_current, total_battery_charge, day_load_energy, |
| | day_gen_energy, pv1_voltage, total_pv_energy, battery_temperature, |
| | day_battery_charge, total_load_energy |
+----+-------------------------------------------------------------------------------+
13:48:46 ERROR Exception response 131 / 0
13:48:46 ERROR OSError in callback read_ss: OSError reading 8 registers from 0: failed to read register 0 - function code: 131 poll_need_to_read
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/ha_addon_sunsynk_multi/timer_callback.py", line 81, in wrap_callback
await cb_call
File "/usr/local/lib/python3.12/site-packages/ha_addon_sunsynk_multi/sensor_callback.py", line 110, in callback_sensor
await ist.read_sensors(
File "/usr/local/lib/python3.12/site-packages/ha_addon_sunsynk_multi/a_inverter.py", line 55, in read_sensors
await self.inv.read_sensors(sensors)
File "/usr/local/lib/python3.12/site-packages/sunsynk/sunsynk.py", line 134, in read_sensors
raise IOError("; ".join(errs))
OSError: OSError reading 8 registers from 0: failed to read register 0 - function code: 131 poll_need_to_read
14:10:45 ERROR Exception response 131 / 0
14:12:27 ERROR Exception response 131 / 0
14:12:27 ERROR OSError in callback read_ss: OSError reading 1 registers from 0: failed to read register 0 - function code: 131 poll_need_to_read
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/ha_addon_sunsynk_multi/timer_callback.py", line 81, in wrap_callback
await cb_call
File "/usr/local/lib/python3.12/site-packages/ha_addon_sunsynk_multi/sensor_callback.py", line 110, in callback_sensor
await ist.read_sensors(
File "/usr/local/lib/python3.12/site-packages/ha_addon_sunsynk_multi/a_inverter.py", line 55, in read_sensors
await self.inv.read_sensors(sensors)
File "/usr/local/lib/python3.12/site-packages/sunsynk/sunsynk.py", line 134, in read_sensors
raise IOError("; ".join(errs))
OSError: OSError reading 1 registers from 0: failed to read register 0 - function code: 131 poll_need_to_read
14:12:32 ERROR Exception response 131 / 0
14:12:37 ERROR Exception response 131 / 0
14:12:42 ERROR Exception response 131 / 0
14:12:44 ERROR Exception response 131 / 0
14:12:46 ERROR Exception response 131 / 0
14:12:48 ERROR Exception response 131 / 0
14:12:50 ERROR Exception response 131 / 0
14:12:53 ERROR Exception response 131 / 0
14:12:53 ERROR OSError in callback read_ss: OSError reading 1 registers from 0: failed to read register 0 - function code: 131; OSError reading 1 registers from 590: failed to read register 590 - function code: 131; OSError reading 4 registers from 622: failed to read register 622 - function code: 131; OSError reading 4 registers from 633: failed to read register 633 - function code: 131; OSError reading 4 registers from 650: failed to read register 650 - function code: 131; OSError reading 4 registers from 672: failed to read register 672 - function code: 131 poll_need_to_read
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/ha_addon_sunsynk_multi/timer_callback.py", line 81, in wrap_callback
await cb_call
File "/usr/local/lib/python3.12/site-packages/ha_addon_sunsynk_multi/sensor_callback.py", line 110, in callback_sensor
await ist.read_sensors(
File "/usr/local/lib/python3.12/site-packages/ha_addon_sunsynk_multi/a_inverter.py", line 55, in read_sensors
await self.inv.read_sensors(sensors)
File "/usr/local/lib/python3.12/site-packages/sunsynk/sunsynk.py", line 134, in read_sensors
raise IOError("; ".join(errs))
OSError: OSError reading 1 registers from 0: failed to read register 0 - function code: 131; OSError reading 1 registers from 590: failed to read register 590 - function code: 131; OSError reading 4 registers from 622: failed to read register 622 - function code: 131; OSError reading 4 registers from 633: failed to read register 633 - function code: 131; OSError reading 4 registers from 650: failed to read register 650 - function code: 131; OSError reading 4 registers from 672: failed to read register 672 - function code: 131 poll_need_to_read
14:12:56 ERROR Exception response 131 / 0
14:13:01 ERROR Exception response 131 / 0
14:13:04 ERROR Exception response 131 / 0
14:13:06 ERROR Exception response 131 / 0
14:13:08 ERROR Exception response 131 / 0
14:13:10 ERROR Exception response 131 / 0
14:13:12 ERROR Exception response 131 / 0
14:13:15 ERROR Exception response 131 / 0
14:13:17 ERROR Exception response 131 / 0
14:13:19 ERROR Exception response 131 / 0
Das Log des mbusd gibt aus:
[14:44:23] INFO: Starting mbusd -d -L - -v 2 -p /dev/ttyUSB0 -s 9600 -m 8N1 -P 502 02 Feb 2025 14:44:23 mbusd-0.5.1 started... 02 Feb 2025 14:44:23 tty: trying to open /dev/ttyUSB0 (speed 9600 mode 8N1) 02 Feb 2025 14:45:17 conn_open(): accepting connection from 172.30.33.1
Seht ihr einen mögliche Lösung, um die Timeouts zu verhindern? Habe ich eine Kleinigkeit in der Konfiguration übersehen?
Ich bedanke mich herzlich im Voraus