Skip to content

feat(virtual): add virtual pulse meter device type#403

Open
dirkjanfaber wants to merge 1 commit intomasterfrom
feat/virtual-pulsemeter
Open

feat(virtual): add virtual pulse meter device type#403
dirkjanfaber wants to merge 1 commit intomasterfrom
feat/virtual-pulsemeter

Conversation

@dirkjanfaber
Copy link
Collaborator

Summary

  • New pulsemeter virtual device exposing /Count and /Aggregate on D-Bus
  • Optional auto-compute: Aggregate = Count × multiplier when Count changes (default: 0.001 m³/pulse)
  • 2 output ports: Passthrough and Aggregate (emits on every value change)
  • Config dialog, full docs, and 100% test coverage on the new module

Closes #382

Testing

Open the dialog and click Done to activate the 2nd output port. With auto-compute disabled, inject { Count: 1000, Aggregate: 1.0 } and verify both values appear on D-Bus. With auto-compute enabled (multiplier 0.001), inject { Count: 1000 } and verify /Aggregate = 1.0 on D-Bus and on output port 1. Also verify that changing /Count directly via D-Bus updates /Aggregate and emits on port 1.

Adds pulsemeter as a virtual device with /Count and /Aggregate paths,
optionally auto-computing Aggregate from Count x multiplier. Includes
2 output ports (Passthrough + Aggregate), config dialog, docs and tests.

Closes #382
@dirkjanfaber dirkjanfaber requested a review from Chris927 March 4, 2026 21:25
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.

[Feature] Virtual IO - e.g. for Pulse Meter

1 participant