feat(heishamon): report electrical power, and the outdoor temperature under its canonical name - #60
Conversation
… under its canonical name FTW's heating view discovers a heat pump by the hp_power_w metric and shows nothing at all without it — no chart, no reading, no entry. So a driver verified against real hardware in June had no page in the product it was written for. hp_power_w now comes from main/Heat_Power_Consumption, which config power_topic overrides for a Heishamon build that names the topic differently. It is emitted only once that topic has arrived, so a wrong name costs the power reading and leaves every other metric alone. hp_outside_temp_c becomes hp_outdoor_temp_c, the name nibe_local and myuplink report and the one the view charts. Nothing read the old name. History under it stays where it is and stops growing. The DRIVER version said 0.4.0 while the manifest said 0.5.0; make bump-driver takes both to 0.6.0. The example config's MQTT password looked real enough to be one, and is now a placeholder. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
frahlg
left a comment
There was a problem hiding this comment.
Automated maintenance pass: not merging this one.
The driver-side work looks sound — power_topic is a config-overridable, file-local-concatenated topic (compliant with #59's rewritten test_subscription_topics_are_static), the metric only emits once the topic has actually arrived so a wrong name costs just that one reading, the version drift between DRIVER (0.4.0) and the manifest (0.5.0) is a legitimate catch, and hp_outside_temp_c → hp_outdoor_temp_c lines up with what nibe_local/myuplink already report. drivers/packages/public-boundary/history-secret-scan/dco checks are green; drivers was still in progress at review time.
Not merging because the PR body already says it itself: "Needs a check against hardware before merge", and tags @Rolf to confirm Heat_Power_Consumption is the right topic name on their build. That's exactly the kind of hardware-correctness question this pass is supposed to defer to a human on rather than resolve by assumption — seconding it here rather than merging past it.
Also blocked mechanically until then: this PR is based on #59's branch, not main, and #59 itself is approved but couldn't be merged via API (stacked-PR restriction — needs the web UI). Once a maintainer merges #59 and @Rolf confirms the topic name, this should be quick to land.
Generated by Claude Code
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c151414fd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| last_msg_ts = now | ||
| elseif msg.topic == base_topic .. "/main/" .. power_topic then | ||
| power_w = val | ||
| last_msg_ts = now |
There was a problem hiding this comment.
Track power-topic freshness separately
When Heat_Power_Consumption stops arriving while any temperature or offset topic continues, those unrelated messages keep refreshing the shared last_msg_ts, so power_w is never cleared and the driver emits the last power reading indefinitely. Give the power topic its own timestamp, or clear it unless that topic itself arrived within the freshness window.
AGENTS.md reference: AGENTS.md:L58-L60
Useful? React with 👍 / 👎.
|
Automated maintenance pass: not merging this one. The change itself looks correct — But the author's own PR description says it plainly: "Needs a check against hardware before merge." Also note: this PR is stacked on #59 (also reviewed this pass, CI green, ready but blocked from auto-merge by GitHub's stacked-PR API restriction). #59 needs to land first; the GitHub API wouldn't even let me retarget this PR's base to Generated by Claude Code |
Based on #59 — merge that first. Answers the driver-visibility half of srcfl/ftw#520.
FTW's heating view discovers a heat pump by the
hp_power_wmetric (web/heating.js:172) and shows nothing at all without it: no chart, no reading, no entry. So a driver verified against real hardware in June has had no page in the product it was written for.hp_power_wnow comes frommain/Heat_Power_Consumption, which the newpower_topicconfig key overrides for a Heishamon build that names the topic differently. It is emitted only once that topic has arrived, so a wrong name costs the power reading and leaves every other metric alone.hp_outside_temp_cbecomeshp_outdoor_temp_c— the name nibe_local and myuplink report, and the one the view charts. Nothing read the old name. Existing history under it stays where it is and stops growing.Also: the
DRIVERversion said 0.4.0 while the manifest said 0.5.0, and nothing outsidemake bump-drivercompares them; both now say 0.6.0. The example config carried what reads like a real MQTT password, now a placeholder.make checkgreen.make test-driver ID=heishamon: 36 passed, 14 skipped.Needs a check against hardware before merge.
Heat_Power_Consumptionis TOP21 on the Heishamon builds I could find named, but I have no pump to confirm it against. @Rolf — if your build names it differently, the driver takespower_topicand the default should change to whatever yours reports. Thepower_topic=value is logged at init.This does not give the pump a node in Live Energy Balance, or a control in the UI. Both need FTW Core changes and stay in srcfl/ftw#520.
🤖 Generated with Claude Code