-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Viessmann: read real power and temperature from the API #32219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
e99f186
02a043d
37f0767
bebc46e
a2f2d98
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| template: viessmann | ||
| products: | ||
| - brand: Viessmann | ||
| description: | ||
| generic: Heatpump consumption (API) | ||
| requirements: | ||
| # evcc: ["sponsorship"] | ||
| evcc: ["skiptest"] | ||
| description: | ||
| de: | | ||
| Liest die aktuelle elektrische Leistungsaufnahme der Wärmepumpe (heating.power.consumption.current) | ||
| als zusätzlichen Verbraucher (aux). Dadurch erscheint die Wärmepumpe im Energiefluss unter "Verbrauch" | ||
| und ihr Verbrauch fließt in die evcc-Statistik ein - unabhängig davon, ob evcc die Wärmepumpe steuert. | ||
| en: | | ||
| Reads the heat pump's current electrical power consumption (heating.power.consumption.current) as an | ||
| additional consumer (aux). The heat pump then appears under "Consumption" in the energy flow and its | ||
| usage feeds the evcc statistics - independent of whether evcc controls the heat pump. | ||
| params: | ||
| - name: usage | ||
| choice: ["aux"] | ||
| - name: clientid | ||
| required: true | ||
| help: | ||
| de: Konfigurieren in [app.developer.viessmann-climatesolutions.com](https://app.developer.viessmann-climatesolutions.com) | ||
| en: Configure at [app.developer.viessmann-climatesolutions.com](https://app.developer.viessmann-climatesolutions.com) | ||
| - name: redirecturi | ||
| help: | ||
| en: "Redirect URI of the evcc instance. Must match the redirect URI set in the Viessmann developer portal." | ||
| de: "Redirect-URI der evcc-Instanz. Muss mit der Redirect URI übereinstimmen, die im Viessmann Developer Portal konfiguriert ist." | ||
| service: auth/redirecturi | ||
| - name: gateway_serial | ||
| required: true | ||
| description: | ||
| de: Gateway Serial | ||
| en: Gateway Serial | ||
| help: | ||
| de: Seriennummer des VitoConnect modul (VitoCare App -> Einstellungen -> Kommunikationsmodul -> Seriennummer) | ||
| en: VitoConnect serial number (VitoCare App -> Settings -> Communication module -> Serial number) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (review_instructions): The wording here uses "VitoCare App", which is inconsistent with other templates that reference the "ViCare" app. Other templates in the Review instructions:Path patterns: Instructions: |
||
| - name: installation_id | ||
| required: true | ||
| description: | ||
| de: Installation ID | ||
| en: Installation ID | ||
| help: | ||
| de: Ermittlung wie beim Viessmann Wärmepumpen-Charger-Template beschrieben (equipment/installations). | ||
| en: Determine as described in the Viessmann heat pump charger template (equipment/installations). | ||
| - name: device_id | ||
| required: true | ||
| description: | ||
| de: Device ID | ||
| en: Device ID | ||
| help: | ||
| de: normalerweise `0` | ||
| en: typically `0` | ||
| default: 0 | ||
| - name: uri | ||
| advanced: true | ||
| default: https://api.viessmann-climatesolutions.com/iot/v2 | ||
| description: | ||
| de: API-Basis-URL | ||
| en: API base URL | ||
| help: | ||
| de: Nur ändern, falls Viessmann die API-Domain erneut umzieht oder ein Proxy verwendet wird | ||
| en: Only change if Viessmann moves the API domain again or a proxy is used | ||
| auth: | ||
| type: viessmann | ||
| params: [clientid, redirecturi, gateway_serial] | ||
| render: | | ||
| {{- $device := printf "%s/features/installations/%s/gateways/%s/devices/%s" .uri .installation_id .gateway_serial .device_id }} | ||
| type: custom | ||
| power: | ||
| # heating.power.consumption.current: real electrical input power in kW -> W. | ||
| # Uses the same device feature-list URL + cache as the Viessmann charger, so when | ||
| # both are configured this shares one cached request instead of doubling API calls | ||
| # (the Viessmann API has a strict daily quota shared with the ViCare app). | ||
| source: http | ||
| uri: {{ $device }}/features | ||
| cache: 120s | ||
| auth: | ||
| source: viessmann | ||
| clientid: {{ .clientid }} | ||
| redirecturi: {{ .redirecturi }} | ||
| gateway_serial: {{ .gateway_serial }} | ||
| jq: '.data[] | select(.feature == "heating.power.consumption.current") | .properties.value.value * 1000' # kW -> W | ||
| soc: | ||
| # heating.dhw.sensors.temperature.dhwCylinder: domestic hot water temperature (°C). | ||
| source: http | ||
| uri: {{ $device }}/features | ||
| cache: 120s | ||
| auth: | ||
| source: viessmann | ||
| clientid: {{ .clientid }} | ||
| redirecturi: {{ .redirecturi }} | ||
| gateway_serial: {{ .gateway_serial }} | ||
| jq: '.data[] | select(.feature == "heating.dhw.sensors.temperature.dhwCylinder") | .properties.value.value' | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (bug_risk): Boolean parameter
measurementsis treated as a string in the template condition, which is likely to misbehave.The parameter is declared as
type: boolbut evaluated with{{- if eq .measurements "true" }}, which assumes a string. This will fail if evcc passes a real boolean (true/falsewithout quotes). Use a boolean check such as{{- if .measurements }}or{{- if eq .measurements true }}so the condition matches the declared type and avoids misconfiguration.