Commit 6c0d834
feat: make OpenDTU poll interval and HTTP retries configurable
The mainloop is single threaded and fetches every inverter separately and
synchronously, so poll rate and retry count decide how long dbus method calls
on the service stay unanswered: worst case = inverters x tries x HTTPTimeout.
With five inverters, three tries and HTTPTimeout=1.5 that is 27.5s. A DTU that
turns sluggish therefore blocks the mainloop long enough for GetValue callers
to run into org.freedesktop.DBus.Error.NoReply, while svstat and the log still
look healthy because values keep being published.
Both values were hardcoded. They now come from config.ini as
OpenDTUPollingIntervall and MaxFetchTries, defaulting to the previous 5000ms
and 3 tries, so existing setups are unaffected.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent be59048 commit 6c0d834
3 files changed
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
223 | 230 | | |
224 | 231 | | |
225 | 232 | | |
| |||
352 | 359 | | |
353 | 360 | | |
354 | 361 | | |
355 | | - | |
| 362 | + | |
356 | 363 | | |
357 | 364 | | |
358 | 365 | | |
| |||
493 | 500 | | |
494 | 501 | | |
495 | 502 | | |
496 | | - | |
497 | | - | |
| 503 | + | |
| 504 | + | |
498 | 505 | | |
499 | 506 | | |
500 | 507 | | |
| |||
0 commit comments