Skip to content

Add new voltage and frequency opcodes to DS100 - #385

Closed
isarrider wants to merge 22 commits into
volkszaehler:masterfrom
isarrider:master
Closed

isarrider wants to merge 22 commits into
volkszaehler:masterfrom
isarrider:master

Conversation

@isarrider

Copy link
Copy Markdown
Contributor

as mentioned here: 180eb1a

Comment thread meters/rs485/ds100.go Resolved
isarrider and others added 6 commits June 24, 2026 16:23
Co-authored-by: premultiply <4681172+premultiply@users.noreply.github.com>
The InfluxDB client was used with its default write options, which drop
data almost immediately when the database is down:

- the retry buffer limit (50,000 points) is enforced in batches of
  limit/batch size = 10 batches. With one batch per 1s flush, that is
  only ~10s of data
- batches expire after 3 minutes (MaxRetryTime)
- batches are discarded after 5 retries

Add an influx-buffer option (default 1h) and size the retry buffer,
expiry and retry count from it. Cap the retry backoff at 30s so the
backlog is written soon after the database is back. 0 disables retries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3FK111BpSpYmto2BsT3Ea
influx: keep unsent data while the database is unavailable
The opcode table was aligned with tabs, which fails the Porcelain step
of the Clean CI job. Whitespace only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3FK111BpSpYmto2BsT3Ea
- restore Voltage at 0x040C (average L-N). Renaming it to VoltageL_N_avg
  left Voltage without an opcode, so Probe and Produce read register 0
- keep Current at 0x0418 (three phase vector current). 0x0416 is the
  neutral current, not the total
- read the new L-L voltages, average L-L voltage and per-phase
  frequencies in Produce. Opcodes alone are never queried
- drop the commented-out THD registers, which are not in the manual

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3FK111BpSpYmto2BsT3Ea
isarrider and others added 3 commits October 19, 2026 17:03
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3FK111BpSpYmto2BsT3Ea
DS100: read line voltages and per-phase frequency
This reverts merge 0c25de9 (PR #1). This fork's master is the head of
upstream volkszaehler#385, which should only contain the DS100
change. The influx fix goes upstream as a separate PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3FK111BpSpYmto2BsT3Ea
Revert "influx: keep unsent data while the database is unavailable"
claude and others added 6 commits October 26, 2026 16:28
Add a CurrentN measurement ("Neutral Current", A) and read it from
register 0x0416 on the DS100. Regenerated measurement_enumer.go.

Depends on volkszaehler#385.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3FK111BpSpYmto2BsT3Ea
The InfluxDB client was used with its default write options, which drop
data almost immediately when the database is down:

- the retry buffer limit (50,000 points) is enforced in batches of
  limit/batch size = 10 batches. With one batch per 1s flush, that is
  only ~10s of data
- batches expire after 3 minutes (MaxRetryTime)
- batches are discarded after 5 retries

Add an influx-buffer option (default 1h) and size the retry buffer,
expiry and retry count from it. Cap the retry backoff at 30s so the
backlog is written soon after the database is back. 0 disables retries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3FK111BpSpYmto2BsT3Ea
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3FK111BpSpYmto2BsT3Ea
influx: keep unsent data while the database is unavailable
isarrider added a commit to isarrider/mbmd that referenced this pull request Oct 26, 2026
Add a CurrentN measurement ("Neutral Current", A) and read it from
register 0x0416 on the DS100. Regenerated measurement_enumer.go.

Depends on volkszaehler#385.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3FK111BpSpYmto2BsT3Ea
@isarrider isarrider closed this Oct 26, 2026
isarrider added a commit to isarrider/mbmd that referenced this pull request Oct 28, 2026
Add a CurrentN measurement ("Neutral Current", A) and read it from
register 0x0416 on the DS100. Regenerated measurement_enumer.go.

Depends on volkszaehler#385.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3FK111BpSpYmto2BsT3Ea
@isarrider

Copy link
Copy Markdown
Contributor Author

Superseded by : #411

@isarrider

Copy link
Copy Markdown
Contributor Author

Continued in #411, opened from a dedicated branch instead of master, together with the neutral current, reactive energy and register fixes.

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