Skip to content

Improve connection reliability and add a management UI - #10

Open
jamesvarty wants to merge 3 commits into
MarcusWichelmann:masterfrom
jamesvarty:improve-reliability-and-ui
Open

jamesvarty wants to merge 3 commits into
MarcusWichelmann:masterfrom
jamesvarty:improve-reliability-and-ui

Conversation

@jamesvarty

Copy link
Copy Markdown

Connection handling:

  • Add connect and read timeouts (Polling:ConnectTimeoutSeconds/ReadTimeoutSeconds); async socket operations ignored the previous ReadTimeout, so reads could hang.
  • Never run overlapping polls; start polling in the background so the web host is available immediately even when devices are unreachable.
  • Retry a read once on a fresh connection when an existing connection went stale.
  • Log one warning when a device goes offline and one when it recovers instead of a stack trace on every poll.
  • Run the InfluxDB and MQTT exporters independently of each other.

Data fixes:

  • Treat SunSpec "not implemented" markers as NaN so they are no longer exported as real values (e.g. 655.35 A on unused phases).
  • Avoid floating point artifacts when applying negative scale factors.
  • Fix register chunking skipping an isolated trailing register and cap requests at 125 registers.
  • Validate SolarEdge meter/battery Index and Port on startup.

Management UI:

  • Status page at / with per-device health, live values, recent events, exporter status and poll/reconnect actions, backed by /api/status.
  • Add energy_exporter_device_* health metrics to /metrics.

Maintenance:

  • Update to .NET 8, refresh GitHub Actions versions and publish the image to the repository owner's GHCR namespace.

jamesvarty and others added 3 commits November 8, 2026 11:08
Connection handling:
- Add connect and read timeouts (Polling:ConnectTimeoutSeconds/ReadTimeoutSeconds);
  async socket operations ignored the previous ReadTimeout, so reads could hang.
- Never run overlapping polls; start polling in the background so the web host
  is available immediately even when devices are unreachable.
- Retry a read once on a fresh connection when an existing connection went stale.
- Log one warning when a device goes offline and one when it recovers instead
  of a stack trace on every poll.
- Run the InfluxDB and MQTT exporters independently of each other.

Data fixes:
- Treat SunSpec "not implemented" markers as NaN so they are no longer
  exported as real values (e.g. 655.35 A on unused phases).
- Avoid floating point artifacts when applying negative scale factors.
- Fix register chunking skipping an isolated trailing register and cap
  requests at 125 registers.
- Validate SolarEdge meter/battery Index and Port on startup.

Management UI:
- Status page at / with per-device health, live values, recent events,
  exporter status and poll/reconnect actions, backed by /api/status.
- Add energy_exporter_device_* health metrics to /metrics.

Maintenance:
- Update to .NET 8, refresh GitHub Actions versions and publish the image
  to the repository owner's GHCR namespace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
.NET 8 reaches end of support on 2026-11-10; .NET 10 is LTS until 2028-11.

- Target net10.0 and build on the sdk/aspnet 10.0 images.
- Update FluentModbus 5.3.2, InfluxDB.Client 5.1.0, MQTTnet 5.2,
  RecursiveDataAnnotationsValidation 2.3.3 and Hosting.Systemd 10.0.
  This removes the vulnerable transitive System.Text.Json 7.0.2
  (GHSA-hh2w-p6rv-4g7w) and RestSharp 110.1.0 (GHSA-4rr6-2v9v-wcpc).
- Replace Swashbuckle with the built-in Microsoft.AspNetCore.OpenApi
  document (/openapi/v1.json); Swagger UI stays at /swagger.
- Adapt MqttExporter to the MQTTnet 5 API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Documents the architecture, how to build and test without a local .NET SDK,
the docker0 deployment and rollback images, the history of the reliability
and .NET 10 work in this fork, and the remaining open items.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant