Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5bac53374c
ℹ️ 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".
| http: status, phase_currents.L1, u16:100mA desc: mains_current_l1, A, realtime | ||
| write: feed_currents, L1 | ||
| http: status, phase_currents.L2, f64:100mA desc: mains_current_l2, A, realtime | ||
| http: status, phase_currents.L2, u16:100mA desc: mains_current_l2, A, realtime | ||
| write: feed_currents, L2 | ||
| http: status, phase_currents.L3, f64:100mA desc: mains_current_l3, A, realtime | ||
| http: status, phase_currents.L3, u16:100mA desc: mains_current_l3, A, realtime |
There was a problem hiding this comment.
Keep mains-current samples signed
When a mains CT reports export, phase_currents.L1/L2/L3 and their total can be negative; declaring them as u16 makes those readings unrepresentable and also prevents the corresponding feed_currents writes from sending export values. This breaks the current direction needed by solar and smart charging installations, so these fields need signed numeric descriptors.
Useful? React with 👍 / 👎.
|
|
||
| # Home battery | ||
| http: status, home_battery.current, f64:100mA desc: battery_current, A, high | ||
| http: status, home_battery.current, u16:100mA desc: battery_current, A, high |
There was a problem hiding this comment.
Preserve the sign of home-battery current
For installations that feed home-battery data, the current changes sign between charging and discharging. Changing this field from f64 to u16 means one direction cannot be represented in either /settings responses or feed_currents writes, so the descriptor should remain signed.
Useful? React with 👍 / 👎.
|
|
||
| # WiFi | ||
| http: status, wifi.rssi, f64 desc: rssi, dBm, low | ||
| http: status, wifi.rssi, u8 desc: wifi_rssi, dBm, low |
There was a problem hiding this comment.
Decode HTTP RSSI as a signed value
When /settings reports a normal Wi-Fi RSSI such as -60, the new u8 descriptor cannot represent it, causing the HTTP sampler to reject or misinterpret the value. The MQTT mapping above correctly uses s8:dBm; the HTTP field needs the same signed representation.
Useful? React with 👍 / 👎.
Standard mode-01 pid set plus VIN over the functional broadcast; pairs with open-watt/openwatt#537. Temperature pids (A-40 bias) wait on bias support in the value-spec grammar.
🤖 Generated with Claude Code