Skip to content

Add DSMR API v2 support (Ethernet P1 Dongle Pro+)#29871

Merged
andig merged 3 commits into
evcc-io:masterfrom
hbourmorck:support_dsmr_v2
May 14, 2026
Merged

Add DSMR API v2 support (Ethernet P1 Dongle Pro+)#29871
andig merged 3 commits into
evcc-io:masterfrom
hbourmorck:support_dsmr_v2

Conversation

@hbourmorck
Copy link
Copy Markdown
Contributor

This PR adds compatibility for DSMR API v2 endpoints used by Smartstuff Ethernet P1 Dongle Pro+ devices.

Documentations

Suggested change

  • Extend the dsmrlogger-aandewiel template to allow selecting the DSMR API version
  • Add a new optional configuration parameter: apiversion
  • Default to existing behavior (v1) for backward compatibility
  • Use the selected version to build endpoint URLs dynamically

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:

  • There is a typo in the help text for apiversion ("smarstuff" instead of "Smartstuff") in both the German and English variants; correcting this will avoid confusion in the UI.
  • Consider aligning the new product entry with the existing brand/description structure (e.g., brand: Smartstuff and a more specific description.generic) to keep product metadata consistent with the rest of the template.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- There is a typo in the help text for `apiversion` ("smarstuff" instead of "Smartstuff") in both the German and English variants; correcting this will avoid confusion in the UI.
- Consider aligning the new product entry with the existing brand/description structure (e.g., `brand: Smartstuff` and a more specific `description.generic`) to keep product metadata consistent with the rest of the template.

## Individual Comments

### Comment 1
<location path="templates/definition/meter/dsmrlogger-aandewiel.yaml" line_range="24-26" />
<code_context>
+        de: API Version
+        en: API version
+    help:
+        de: "API v1 für DSMR-logger API v1, API v2 für DSMR-logger API v2 (smarstuff P1 Dongle mit DSMR-logger API v2)"
+        en: "Use API v1 for DSMR-logger API v1, use API v2 for DSMR-logger API v2 (smarstuff P1 Dongle with DSMR-logger API v2)"
 render: |
</code_context>
<issue_to_address>
**issue (typo):** Fix the "smarstuff" typo in the German help text.

The product name appears as "Smartstuff" elsewhere, so this should be `Smartstuff P1 Dongle` for consistency in the user-facing text.

```suggestion
    help:
        de: "API v1 für DSMR-logger API v1, API v2 für DSMR-logger API v2 (Smartstuff P1 Dongle mit DSMR-logger API v2)"
        en: "Use API v1 for DSMR-logger API v1, use API v2 for DSMR-logger API v2 (Smartstuff P1 Dongle with DSMR-logger API v2)"
```
</issue_to_address>

### Comment 2
<location path="templates/definition/meter/dsmrlogger-aandewiel.yaml" line_range="26" />
<code_context>
+        en: API version
+    help:
+        de: "API v1 für DSMR-logger API v1, API v2 für DSMR-logger API v2 (smarstuff P1 Dongle mit DSMR-logger API v2)"
+        en: "Use API v1 for DSMR-logger API v1, use API v2 for DSMR-logger API v2 (smarstuff P1 Dongle with DSMR-logger API v2)"
 render: |
   {{- define "uri" -}}
</code_context>
<issue_to_address>
**nitpick (review_instructions):** "smarstuff" is a typo and inconsistent with the "Smartstuff DSMR-logger API" wording used above.

The brand is spelled "Smartstuff" in the `products` section, but in this help text it is spelled "smarstuff". Please correct the spelling to keep wording consistent across this template and with other 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/dsmrlogger-aandewiel.yaml Outdated
Comment thread templates/definition/meter/dsmrlogger-aandewiel.yaml Outdated
hbourmorck and others added 2 commits May 14, 2026 12:05
Aligning the naming

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
@andig andig added the devices Specific device support label May 14, 2026
@andig andig changed the title feat: Add support for DSMR API v2 (Ethernet P1 Dongle Pro+) Add DSMR API v2 support (Ethernet P1 Dongle Pro+) May 14, 2026
@andig andig merged commit 726bea6 into evcc-io:master May 14, 2026
13 checks passed
hbourmorck pushed a commit to hbourmorck/evcc that referenced this pull request May 15, 2026
@hbourmorck hbourmorck deleted the support_dsmr_v2 branch May 16, 2026 08:41
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.

3 participants