Skip to content

Commit 810d46a

Browse files
committed
timeouts
1 parent f6fe00c commit 810d46a

4 files changed

Lines changed: 22 additions & 2 deletions

File tree

‎docs/timeouts.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ User-facing keys from [multi-options](../www/docs/reference/multi-options.md) (a
253253

254254
`DRIVER` is obsolete and ignored (startup fails if it is still set). mbusd has its own `TIMEOUT` if
255255
you use that add-on as a serial-to-TCP gateway. The mbusd timeout should always be lower than the
256-
addon timeout.
256+
addon timeout. User-facing comparison (add-on / pymodbus / mbusd / Solarman):
257+
[Wait times by component](../www/docs/reference/multi-options.md#wait-times-by-component).
257258

258259
## Related changes (edge, post-1.0.0)
259260

‎www/docs/guide/fault-finding.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ diagnostic sensor on each inverter ([Stats](#stats)) shows whether timeouts are
124124
**0.15** if timeouts continue.
125125
- The most reliable way to connect is to use mbusd to the serial port & connect the addon to mbusd
126126
at `tcp://<ip>:502`. The mbusd instance/addon can be on the same physical device or a remote
127-
device.
127+
device. mbusd, pymodbus, and the add-on each have their own wait — see
128+
[Wait times by component](../reference/multi-options#wait-times-by-component).
128129

129130
Check the cabling and connection again. Use a 1m cable and stand next to the inverter while testing.
130131

‎www/docs/guide/mbusd.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ When you add the Sunsynk HASS repository, it includes a mbusd addon called "Modb
1010
Gateway Add-on".
1111

1212
<https://github.com/kellerza/sunsynk/tree/main/hass-addon-mbusd>
13+
14+
Point the Sunsynk add-on at `tcp://homeassistant.local:502` (or the host that runs mbusd). mbusd has
15+
its own wait/retry on the RS485 leg — in add-on language that is **3** `READ_ATTEMPTS`, **500 ms**
16+
`TIMEOUT` (`-W`), and **100 ms** `READ_MESSAGE_SPACING` (`-R`). Keep that RTU wait shorter than the
17+
Sunsynk add-on's `TIMEOUT`. Comparison table:
18+
[Wait times by component](../reference/multi-options#wait-times-by-component).

‎www/docs/reference/multi-options.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,18 @@ Global. Change these when a gateway or RS485 link is unreliable.
171171
Each group is tried `READ_ATTEMPTS` times. Increase on slow links. If timeouts persist, lower
172172
`READ_SENSORS_BATCH_SIZE` or increase `READ_MESSAGE_SPACING`.
173173

174+
### Wait times by component
175+
176+
Same three knobs at every layer. When the add-on talks through **pymodbus** or **mbusd**, those
177+
layers wait **as well**, so a missing reply can take longer than `TIMEOUT × READ_ATTEMPTS` alone.
178+
179+
| Component | `READ_ATTEMPTS` | `TIMEOUT` | `READ_MESSAGE_SPACING` | Notes |
180+
| ----------------------------- | --------------- | ----------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
181+
| Add-on default (tmodbus) | **3** | **3 s** | **0.05 s** | Per FC03/FC16 group. tmodbus does **not** retry a missing reply; the add-on does. Serial also waits **0.05 s** after connect. Worst case per group: `TIMEOUT × READ_ATTEMPTS`. |
182+
| pymodbus (`pymodbus-` `PORT`) | **3** (library) | Add-on `TIMEOUT` | Add-on spacing | pymodbus retries **3** times per request **on top of** the add-on. A silent bus waits longer than tmodbus. |
183+
| mbusd | **3** (`-N`) | **500 ms** (`-W`) | **100 ms** (`-R`) | Serial-side gateway. Keep this RTU wait **shorter** than the add-on `TIMEOUT` so a dead inverter fails inside one add-on attempt. The mbusd add-on's own `TIMEOUT` option is TCP idle (`-T`, seconds), not `-W`. See [mbusd](../guide/mbusd). |
184+
| Solarman | **3** | Add-on `TIMEOUT` | — | `socket_timeout` only; no message gap. Prefer slower [schedules](./schedules). |
185+
174186
## Schedules
175187

176188
`SCHEDULES` controls how often sensors are read and published. Defaults and Solarman-friendly

0 commit comments

Comments
 (0)