Skip to content

extra meter only consumer - #3920

Merged
LKuemmel merged 4 commits into
openWB:masterfrom
LKuemmel:extra-meter-only
Sep 10, 2026
Merged

extra meter only consumer#3920
LKuemmel merged 4 commits into
openWB:masterfrom
LKuemmel:extra-meter-only

Conversation

@LKuemmel

@LKuemmel LKuemmel commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

references #3908 (comment)

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.

🟡 Changes recommended

Unconditional no-op updates erase genuine control faults for existing consumers without updater callbacks.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a meter-only consumer representing consumption measured by a separate meter without a controllable device.

Changes:

  • Adds the new consumer configuration and registration.
  • Allows consumers without updater callbacks.
  • Broadens consumer update scheduling.
File summaries
File Description
packages/modules/loadvars.py Schedules updates for all consumers.
packages/modules/common/configurable_consumer.py Makes updater callbacks optional.
packages/modules/consumers/extra_meter_only/vendor.py Registers the consumer vendor.
packages/modules/consumers/extra_meter_only/extra_meter_only/config.py Defines meter-only defaults.
packages/modules/consumers/extra_meter_only/extra_meter_only/consumer.py Creates the placeholder consumer.
packages/modules/consumers/extra_meter_only/__init__.py Initializes the vendor package.
packages/modules/consumers/extra_meter_only/extra_meter_only/__init__.py Initializes the consumer package.
Review details
  • Files reviewed: 5/7 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +67 to +69
modules_threads.append(Thread(target=consumer.module.update,
args=(),
name=f"set values consumer{consumer.data.module.id}"))
Comment thread packages/modules/consumers/extra_meter_only/vendor.py Outdated

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.

🟡 Changes recommended

ConfigurableConsumer.update() no longer resets fault state when module_updater is None, which can cause consumer fault states to remain stuck after transient publish-time errors (notably relevant for extra_meter-driven consumers).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 4/5 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread packages/modules/common/configurable_consumer.py
Comment thread packages/modules/consumers/generic/extra_meter_only/consumer.py Outdated

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.

🟢 Approval recommended

The changes are small, internally consistent (Loadvars always calls ConfigurableConsumer.update, which safely no-ops when no updater is configured), and the new consumer module follows existing consumer module patterns.

Review details
  • Files reviewed: 4/5 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@LKuemmel
LKuemmel requested a review from ndrsnhs September 10, 2026 09:57
@LKuemmel
LKuemmel merged commit eb6f0cb into openWB:master Sep 10, 2026
1 check passed
@LKuemmel
LKuemmel deleted the extra-meter-only branch September 10, 2026 12:53
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