Skip to content

Add Kaco Blueplanet#30293

Merged
andig merged 7 commits into
evcc-io:masterfrom
friko21:master
May 31, 2026
Merged

Add Kaco Blueplanet#30293
andig merged 7 commits into
evcc-io:masterfrom
friko21:master

Conversation

@friko21
Copy link
Copy Markdown
Contributor

@friko21 friko21 commented May 28, 2026

Fix #30335

This add support for Kaco bluplanet NX via the http api.
It uses unsecure http request as the Kaco doesn't support https.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 2 issues, and left some high level feedback:

  • The uri value contains & characters and should be wrapped in quotes (e.g. "http://{{ .host }}/getdevdata.cgi?device=2&sn={{ .sn }}") to avoid YAML interpreting them as anchors.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `uri` value contains `&` characters and should be wrapped in quotes (e.g. `"http://{{ .host }}/getdevdata.cgi?device=2&sn={{ .sn }}"`) to avoid YAML interpreting them as anchors.

## Individual Comments

### Comment 1
<location path="templates/definition/meter/kaco-blueplanet.yaml" line_range="15" />
<code_context>
+    description:
+      en: The serial number of the inverter to query
+      de: Die Seriennummer des Kaco-Wechselrichters
+    example: 8.0NX312001234Expand commentComment on lines R9 to R20Resolved
+render: |
+  type: custom
</code_context>
<issue_to_address>
**issue (bug_risk):** Cleanup stray text in the `sn` example value.

The `example` value for `sn` includes stray UI text (`Expand commentComment on lines R9 to R20Resolved`), which will likely break YAML parsing or produce an invalid example. This should be trimmed to just the serial number, e.g. `example: 8.0NX312001234`.
</issue_to_address>

### Comment 2
<location path="templates/definition/meter/kaco-blueplanet.yaml" line_range="15" />
<code_context>
+    description:
+      en: The serial number of the inverter to query
+      de: Die Seriennummer des Kaco-Wechselrichters
+    example: 8.0NX312001234Expand commentComment on lines R9 to R20Resolved
+render: |
+  type: custom
</code_context>
<issue_to_address>
**issue (review_instructions):** The example value for `sn` includes extraneous text, which is inconsistent with other template parameter examples and likely violates the templates/README.md conventions.

In the other templates, `example` fields only contain the example value itself (e.g. a plain serial number) and no additional prose or tooling artefacts. Here, `example: 8.0NX312001234Expand commentComment on lines R9 to R20Resolved` appears to contain leftover UI text, which will both break the intended example and likely conflict with the formatting rules in `templates/README.md`.

Please update this line to only contain the serial number (e.g. `example: 8.0NX312001234`) in the same style as comparable templates.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `templates/**/*.yaml`

**Instructions:**
Verify that the changes comply to the rules defined in templates/README.md. Also check consistence (wording) with other files inside templates directory.

</details>
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread templates/definition/meter/kaco-blueplanet.yaml Outdated
Comment thread templates/definition/meter/kaco-blueplanet.yaml Outdated
Comment thread templates/definition/meter/kaco-blueplanet.yaml
en: The IP address of the inverter to query
de: Die IP-Adresse des Kaco-Wechselrichters
example: 192.168.0.123
- name: sn
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use serial as in every other template, only override the example if needed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed sn to serial.

@andig andig marked this pull request as draft May 28, 2026 17:03
@friko21 friko21 marked this pull request as ready for review May 29, 2026 08:32
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The usage parameter is defined but never used in the rendered template; either wire it into the output or remove it to avoid confusion.
  • Consider making the protocol configurable or at least validating/normalizing host, since http://{{ .host }} will behave oddly if users supply a value that already includes a scheme.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `usage` parameter is defined but never used in the rendered template; either wire it into the output or remove it to avoid confusion.
- Consider making the protocol configurable or at least validating/normalizing `host`, since `http://{{ .host }}` will behave oddly if users supply a value that already includes a scheme.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread templates/definition/meter/kaco-blueplanet.yaml Outdated
@andig andig changed the title Meter: Add support for Kaco blueplanet Add Kaco Blueplanet May 29, 2026
Co-authored-by: andig <cpuidle@gmail.com>
@andig andig added the devices Specific device support label May 31, 2026
@andig andig enabled auto-merge (squash) May 31, 2026 09:04
@andig andig merged commit 5fa62d5 into evcc-io:master May 31, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devices Specific device support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KACO new energy blueplanet 5.0 NX3 M2 - PV Überschussladen

2 participants