Skip to content

Feature kostal steca inverter http retry - #3388

Merged
LKuemmel merged 3 commits into
openWB:masterfrom
andlem74:feature-kostal_steca-robust-http
Jun 15, 2026
Merged

LKuemmel merged 3 commits into
openWB:masterfrom
andlem74:feature-kostal_steca-robust-http

Conversation

@andlem74

Copy link
Copy Markdown
Contributor

Wegen zahlreicher http-Timeouts (alle 1 bis 2 Stunden) Retries mit maximal 2 Retry-Versuchen ergänzt.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ergänzt HTTP-Retries für die Kostal/Steca-Inverter-Abfragen, um wiederkehrende HTTP-Timeouts (ca. alle 1–2 Stunden) robuster abzufangen.

Changes:

  • Nutzt eine gemeinsame HTTP-Session pro get_values()-Aufruf (statt mehrere einzelne Requests ohne Session-Wiederverwendung).
  • Konfiguriert Timeout über session.default_timeout und aktiviert Retries via HTTPAdapter(max_retries=2).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +8 to 10
from requests.adapters import HTTPAdapter

from modules.common import req

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO it's a matter of taste if you want to be more explicit at the expense of verbosity. Can the openWB SW team please decide?

Comment on lines +53 to +55
session.default_timeout = 2
session.mount("http://", HTTPAdapter(max_retries=2))
# call for XML file and parse it for current PV power

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO it's a matter of taste if you want to be more explicit at the expense of verbosity. Can the openWB SW team please decide?

@andlem74

Copy link
Copy Markdown
Contributor Author

Can the openWB SW team please decide whether the changes suggested by Copilot should be adopted?

@LKuemmel

Copy link
Copy Markdown
Contributor

Deine Änderungen ist ok so.

@LKuemmel
LKuemmel merged commit 154ac8c into openWB:master Jun 15, 2026
1 check passed
ndrsnhs pushed a commit to ndrsnhs/core that referenced this pull request Aug 24, 2026
* Introduce session and retries for http

* Reduce retries

* Increase retries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants