Skip to content

Add configurable Modbus timeout and delay to deye-hybrid-3p template #32316

Description

@al-wag

When using the deye-hybrid-3p template over a Modbus TCP-to-RS485 gateway (Waveshare RS485-to-PoE Ethernet), evcc occasionally reports Modbus read timeouts. This occurs even though the gateway is configured for multi-host access and Home Assistant communicates with the inverter reliably at the same time.

Unlike several other Modbus-based templates, the deye-hybrid-3p template does not expose configurable Modbus communication parameters such as timeout and delay. As a result, users cannot adapt the communication timing for installations that require longer response times or additional delays between Modbus requests.

Please add support for configurable Modbus communication parameters 'timeout' and 'delay' to the deye-hybrid-3p template, similar to other Modbus templates in evcc.

Example:

meters:

  • type: template
    template: deye-hybrid-3p
    host: 192.168.x.x
    timeout: 5s
    delay: 200ms

These parameters should be optional and preserve the current default behavior when omitted.

Environment:

  • evcc v0.307.1
  • Deye SUN 12K 3-phase Hybrid inverter
  • Waveshare RS485-to-PoE Ethernet gateway (Modbus TCP → RTU)
  • Home Assistant and evcc running on the same host
  • Home Assistant communicates with the inverter without Modbus errors
  • evcc occasionally reports i/o timeout while reading Modbus registers

Gateway configuration:

  • Protocol: Modbus TCP to RTU
  • Instruction Timeout: 2048 ms
  • Enable Multi-Host: Yes
  • RS485 Conflict Time Gap: 100 ms

Evcc configuration:

{
"charger": [
{"id":18,"name":"db:18","type":"template","config":{"host":"192.168.178.68","template":"weidmüller"},"deviceProduct":"Weidmüller AC Smart"}
],
"experimental": false,
"influx": {"url":"","database":"","token":"","org":"","user":"","password":"","insecure":false},
"interval": 30,
"loadpoints": [
{"id":19,"name":"db:19","batteryBoostLimit":100,"charger":"db:18","defaultMode":"off","limitEnergy":0,"limitSoc":0,"maxCurrent":16,"minCurrent":6,"phasesConfigured":0,"planEnergy":0,"planPrecondition":0,"planStrategy":{"continuous":false,"precondition":0},"planTime":"0001-01-01T00:00:00Z","priority":0,"smartCostLimit":null,"smartFeedInPriorityLimit":null,"soc":{"poll":{"mode":"charging","interval":3600000000000},"estimate":true},"thresholds":{"enable":{"delay":60000000000,"threshold":0},"disable":{"delay":180000000000,"threshold":0}},"title":"Garage"}
],
"meter": [
{"id":17,"name":"db:17","type":"template","config":{"baudrate":9600,"comset":"8N1","gridchargecurrent":"100","host":"192.168.178.28","id":1,"maxacpower":"0","maxdischargecurrent":"200","modbus":"tcpip","port":502,"template":"deye-hybrid-3p","usage":"grid"},"deviceProduct":"Deye 3p hybrid inverter"},
{"id":15,"name":"db:15","type":"template","config":{"baudrate":9600,"comset":"8N1","gridchargecurrent":"60","host":"192.168.178.28","id":1,"maxacpower":12000,"maxdischargecurrent":"100","modbus":"tcpip","port":502,"template":"deye-hybrid-3p","usage":"pv"},"deviceProduct":"Deye 3p hybrid inverter","deviceTitle":"PV"},
{"id":16,"name":"db:16","type":"template","config":{"batterytype":"lv","baudrate":9600,"capacity":10,"comset":"8N1","gridchargecurrent":"60","host":"192.168.178.28","id":1,"maxacpower":"0","maxchargepower":5000,"maxdischargecurrent":"200","maxdischargepower":10000,"maxsoc":95,"minsoc":5,"modbus":"tcpip","port":502,"storageunit":"1","template":"deye-hybrid-3p","usage":"battery"},"deviceProduct":"Deye 3p hybrid inverter","deviceTitle":"Batterie"}
],
"mqtt": {"broker":"core-mosquitto","user":"mqtt-user","password":"","clientID":"evcc-1","insecure":false,"caCert":"","clientCert":"","clientKey":"","topic":"evcc"},
"residualPower": 100,
"shm": {"vendorId":"","deviceId":"","deviceSerial":""},
"site": {"title":"","grid":"db:17","pv":["db:15"],"battery":["db:16"],"aux":null,"ext":null},
"tariff": [
{"id":22,"name":"db:22","type":"template","config":{"price":0.08,"template":"fixed"},"deviceProduct":"Fester Preis"},
{"id":21,"name":"db:21","type":"template","config":{"price":0.294,"template":"fixed"},"deviceProduct":"Fester Preis"},
{"id":20,"name":"db:20","type":"template","config":{"ac":12,"alphatemp":"-0.004","az":-5,"de":2,"dec":45,"dm":2,"efficiency":"100","interval":"1h","kwp":10.4,"lat":"
","lon":"***","rossmodel":"0.0342","template":"open-meteo"},"deviceProduct":"Open-Meteo","deviceTitle":"Solar Vorhersage"}
],
"tariffRefs": {"grid":"db:21","feedIn":"db:22","co2":"","planner":"","solar":["db:20"]}
}

Log excerpt:

[main ] INFO 2026/05/25 16:49:30 evcc 0.307.1
[main ] INFO 2026/05/25 16:49:30 using config file: /config/evcc.yaml
[main ] INFO 2026/05/25 16:49:30 using sqlite database: /data/evcc.db?_pragma=foreign_keys(1)&_pragma=auto_vacuum(INCREMENTAL)
[mqtt ] INFO 2026/05/25 16:49:30 connecting evcc-1 at tcp://core-mosquitto:1883
[eebus ] INFO 2026/05/25 16:49:30 Local SKI: 33a6c0145624acea2bdb92ba76b00e32eaa911fd
[main ] INFO 2026/05/25 16:49:30 OCPP local url: ws://127.0.0.1:8887/
[main ] INFO 2026/05/25 16:49:30 UI local url: http://127.0.0.1:7070
[site ] INFO 2026/05/25 16:49:32 site config:
[site ] INFO 2026/05/25 16:49:32 meters: grid ✓ pv ✓ battery ✓
[site ] INFO 2026/05/25 16:49:32 grid: power ✓ energy ✓ currents ✓
[site ] INFO 2026/05/25 16:49:32 pv 1: power ✓ energy ✓ currents ✗
[site ] INFO 2026/05/25 16:49:32 battery 1: power ✓ energy ✓ currents ✗ soc ✓ capacity ✓
[site ] INFO 2026/05/25 16:49:32 tariffs:
[site ] INFO 2026/05/25 16:49:32 grid: pricestatic
[site ] INFO 2026/05/25 16:49:32 feed-in: pricestatic
[site ] INFO 2026/05/25 16:49:32 co2: ✗
[site ] INFO 2026/05/25 16:49:32 solar: ✓
[lp-1 ] INFO 2026/05/25 16:49:32 loadpoint 1:
[lp-1 ] INFO 2026/05/25 16:49:32 mode: minpv
[lp-1 ] INFO 2026/05/25 16:49:32 charger: power ✓ energy ✗ currents ✓ phases ✓ wakeup ✗
[lp-1 ] INFO 2026/05/25 16:49:32 meters: charge ✓
[lp-1 ] INFO 2026/05/25 16:49:32 charge: power ✓ energy ✗ currents ✓
[lp-1 ] INFO 2026/05/25 16:49:36 car disconnected
[site ] ERROR 2026/05/25 16:53:41 grid energy: read failed: read tcp 192.168.178.25:49838->192.168.178.28:502: i/o timeout
[site ] ERROR 2026/05/25 16:57:11 battery 1 energy: read failed: read tcp 192.168.178.25:50316->192.168.178.28:502: i/o timeout

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionRather clarification than issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions