Skip to content

Add Viessmann #20111

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

Merged
merged 26 commits into from
May 29, 2025
Merged

Add Viessmann #20111

merged 26 commits into from
May 29, 2025

Conversation

mpollmeier
Copy link
Contributor

@mpollmeier mpollmeier commented Mar 25, 2025

... mostly just looking for some feedback.
Based on the api investigation at #19639 (comment)

Fix #19639

open questions

  • why does getmode trigger two identical http requests?
  • authentication via oauth2 using only the viessmann client id
  • user guidance to figure out the installation id, gateway serial and device id
  • should/can we configure a longer interval between updates? If so, how? Viessmann has an api limit of ~1 request per minute

excerpt from my evcc.yaml

chargers:
  - name: viessmann
    type: template
    template: viessmann
    installation_id: 23XXXXX          # all digits
    gateway_serial: 76XXXXXXXXXXXXXX  # all digits
    device_id: 0
    target_temperature: 47
    token: eyJ.....

get status

./evcc --log trace -c ~/.evcc/evcc.yaml --database ~/.evcc/evcc.db charger viessmann
...
[viessmann] TRACE 2025/03/25 19:35:15 GET https://api.viessmann.com/iot/v2/features/installations/23XXXXX/gateways/76XXXXXXXXXXXXXX/devices/0/features/heating.dhw.oneTimeCharge
[viessmann] TRACE 2025/03/25 19:35:16 {
  "data": {
    ...
  }
}
[viessmann] TRACE 2025/03/25 19:35:16 GET https://api.viessmann.com/iot/v2/features/installations/23XXXXX/gateways/76XXXXXXXXXXXXXX/devices/0/features/heating.dhw.oneTimeCharge
[viessmann] TRACE 2025/03/25 19:35:16 {
  "data": {
    ...
  }
}
...
Charge status: B
Enabled:       false
Features:      [Heating IntegratedDevice]

enable

./evcc --log trace -c ~/.evcc/evcc.yaml --database ~/.evcc/evcc.db charger viessmann --enable
[viessmann] TRACE 2025/03/25 13:28:51 {"temperature": 47}
--
{
  "data": {
    "success": true,
    "message": null,
    "reason": "COMMAND_EXECUTION_SUCCESS"
  }
}
[viessmann] TRACE 2025/03/25 13:28:52 { }
--
{
  "data": {
    "success": true,
    "message": null,
    "reason": "COMMAND_EXECUTION_SUCCESS"
  }
}

disable

./evcc --log trace -c ~/.evcc/evcc.yaml --database ~/.evcc/evcc.db charger viessmann --disable
--
{
  "data": {
    "success": true,
    "message": null,
    "reason": "COMMAND_EXECUTION_SUCCESS"
  }
}
``

@mpollmeier mpollmeier force-pushed the charger/viessmann branch 3 times, most recently from c6ded7f to d8e4886 Compare March 25, 2025 19:03
@andig andig added the heating Heating label Mar 25, 2025
@andig andig marked this pull request as draft March 25, 2025 19:16
@andig
Copy link
Member

andig commented Mar 25, 2025

Sieht gut aus 👍🏻

@mpollmeier
Copy link
Contributor Author

Danke! Hast du evtl Ideen / Anmerkungen zu den 'open questions'?

@andig
Copy link
Member

andig commented Mar 26, 2025

why does getmode trigger two identical http requests?

It's two values and there are no cache headers. Add cache: 1s to force caching.

authentication via oauth2 using only the viessmann client id

We still need the non-browser flow for that, then I have an implementation idea.

user guidance to figure out the installation id, gateway serial and device id

up to you :)

should/can we configure a longer interval between updates?

ATM only increasing global interval.

@mpollmeier
Copy link
Contributor Author

mpollmeier commented Mar 26, 2025

Got the browserless authentication working with shell/curl/jq, based on https://documentation.viessmann.com/static/authentication

Prerequisite (only once)

The user must manually log into the Viessmann Developer Portal and create a client: disable google captcha and configure any redirect URI (the default value http://localhost:4200/ is fine):

Create an access token with two http requests

# from the viessmann developer portal (all digits)
VIESSMANN_CLIENT_ID=55f2c71XXXXXXXXXXXXXXXXXXXXXXXXX

# must equal the value configured in viessmann developer portal for this client id
VIESSMANN_REDIRECT_URI="http://localhost:4200/"

# these are static from the docs - we should generate new pairs using pkce every time
VIESSMANN_CODE_CHALLENGE="5M5nhkBfkWZCGfLZYcTL-l7esjPUN7PpZ4rq8k4cmys"
VIESSMANN_CODE_VERIFIER="6PygdmeK8JKPuuftlkc6q4ceyvjhMM_a_cJrPbcmcLc-SPjx2ZXTYr-SOofPUBydQ3McNYRy7Hibc2L2WtVLJFpOQ~Qbgic455ArKjUz9_UiTLnO6q8A3e.I_fIF8hAo"

# user credentials for the viessmann developer portal
[email protected]
 VIESSMANN_PASS='secret'
 
VIESSMANN_CODE=$(curl -X POST --silent \
  --user $VIESSMANN_USER:$VIESSMANN_PASS \
  --output /dev/null \
  --dump-header -    \
  "https://iam.viessmann.com/idp/v3/authorize?client_id=$VIESSMANN_CLIENT_ID&redirect_uri=$VIESSMANN_REDIRECT_URI&scope=IoT%20User%20offline_access&response_type=code&code_challenge=$VIESSMANN_CODE_CHALLENGE&code_challenge_method=S256" \
  | grep "^location: "            \
  | sed 's/.*\?code=\(.*\).*/\1/' \
  | tr -d '[:space:]')
  
# create access token
TOKEN_RESPONSE=$(curl -XPOST --silent \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data "grant_type=authorization_code&client_id=$VIESSMANN_CLIENT_ID&redirect_uri=$VIESSMANN_REDIRECT_URI&code_verifier=$VIESSMANN_CODE_VERIFIER&code=$VIESSMANN_CODE" \
  https://iam.viessmann.com/idp/v3/token)
echo $TOKEN_RESPONSE
VIESSMANN_TOKEN=$(echo $TOKEN_RESPONSE | jq --raw-output .access_token)
VIESSMANN_REFRESH_TOKEN=$(echo $TOKEN_RESPONSE | jq --raw-output .refresh_token)

Notes

  • the values for code_challenge and code_verifier are taken straight from https://documentation.viessmann.com/static/authentication - we should really generate new pairs using pkce every time
  • the code value is in the response header location in the first
  • trimming whitespace is important, at least for the above shell commands - the code has length 43, check e.g. via echo ${#VIESSMANN_CODE}
  • the code that we get in the first request is only valid for 20 seconds - afterwards Viessman responds with an 'invalid grant' error
  • the access token expires after 1 hour (3600s)

Token TTL and refresh token

We can generate a new token with the VIESSMANN_REFRESH_TOKEN, and according to the documentation that should have a longer TTL of 180 days, but when I tried the TTL was still always 3600s for every newly generated or refreshed token :(

Interesting / surprising: the refresh token does not seem to have a TTL - I just renewed my token with a refresh token that I received 8+ hours ago...

To keep things simple and future proof it probably makes sense to generate a new token, store it for one hour, and then start from scratch.

Either way: here's how to get a new token based on the REFRESH_TOKEN we got previously:

curl -X POST "https://iam.viessmann.com/idp/v3/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=refresh_token&client_id=$VIESSMANN_CLIENT_ID&refresh_token=$VIESSMANN_REFRESH_TOKEN"

@andig
Copy link
Member

andig commented Mar 26, 2025

Also OAuth2 code exchange mit PKCE. Da kann ich mir was einfallen lassen, dauert aber ein bisschen.

@mpollmeier
Copy link
Contributor Author

Genau. Ich hab auch den Teil über PKCE nochmal korrigiert, da sollten wir wirklich neue code challenge und verifier generieren für jeden request.

Das PKCE handling hab ich mir gerade mal von ner KI schreiben lassen, das funktioniert auch:

go mod init go-auth2-test
go get golang.org/x/oauth2

main.go:

package main

import (
	"crypto/rand"
	"crypto/sha256"
	"encoding/base64"
	"fmt"
	"golang.org/x/oauth2"
)

// GeneratePKCE creates a new OAuth2 code verifier and challenge using S256.
func GeneratePKCE() (oauth2.AuthCodeOption, oauth2.AuthCodeOption, string) {
	// Generate a random 32-byte code verifier
	verifierBytes := make([]byte, 32)
	rand.Read(verifierBytes)
	codeVerifier := base64.RawURLEncoding.EncodeToString(verifierBytes)

	// Hash the verifier using SHA256 and encode as base64 URL
	hash := sha256.Sum256([]byte(codeVerifier))
	codeChallenge := base64.RawURLEncoding.EncodeToString(hash[:])

	// Return options for OAuth2 and the code verifier
	return oauth2.SetAuthURLParam("code_challenge", codeChallenge),
		oauth2.SetAuthURLParam("code_challenge_method", "S256"),
		codeVerifier
}

func main() {
	codeChallengeOption, codeChallengeMethodOption, codeVerifier := GeneratePKCE()

	fmt.Println("PKCE Code Verifier:", codeVerifier)
	fmt.Println("PKCE Code Challenge:", codeChallengeOption)
	fmt.Println("PKCE Code Challenge Method:", codeChallengeMethodOption)
}
go run main.go
PKCE Code Verifier: NUBS81DWRCNOKHqrQvWZpqr2f7VLwiIHcY4A2jbodDI
PKCE Code Challenge: {code_challenge Zps-JR5UfvgOHTk7LeClyM7-zFydhdbRO6uwQMolUnk}
PKCE Code Challenge Method: {code_challenge_method S256}

Aber wie man das token handling / renewal am besten macht und wo genau man es in evcc unterbringt, ist vermutlich noch die schwierigere Frage, da kennst du dich besser aus.

@andig
Copy link
Member

andig commented Mar 27, 2025

Brauchst du alles nicht- pkce ist bei Go schon enthalten. Die Frage ist eher, wie wir das "pluggable" bekommen mit loser Kopplung. Meine Idee wäre, #20066 so zu erweitern, dass wir dort neben basic/ bearer auch Authorisation Plugins einführen die ihrerseits einen autorisierten http.Transport erzeugen. Damit wird das Auth Objekt wichtiger. Willst Du es mal probieren?

/cc @thecem wir hatten das Thema noch bei einer weiteren WP.

@thecem
Copy link
Contributor

thecem commented Mar 27, 2025

@andig
Copy link
Member

andig commented Mar 27, 2025

I've updated #20066 to add the required infrastructure.

@andig
Copy link
Member

andig commented Mar 27, 2025

Z.B. https://github.com/evcc-io/evcc/blob/master/vehicle/porsche/identity.go wäre ein gutes Beispiel für eine oauth2.TokenSource. Diese dann in einen http.Transport zu verwandeln ist trivial:

var tokenSource oauth2.TokenSource

tokenSource = ...

transport := &oauth2.Transport{
    Source: tokenSource,
    Base: base,
}

@andig

This comment was marked as resolved.

@andig andig changed the title viessmann charger api: first draft for a template... Add Viessmann Mar 27, 2025
@andig andig added the stale Outdated and ready to close label Apr 2, 2025
@mpollmeier
Copy link
Contributor Author

@andig ich hab mich heute mal damit beschäftigt und werde (langsam) mit go warm.

Den CODE, also den ersten request, bekomme ich jetzt schonmal. Da konnte ich tatsächlich viel von der porsche/identity.go wiederverwenden.

Ich teste lokal mit go run viessmann-test.go und mpollmeier@db223cd

Wenn du Zeit für early feedback hast: gerne. Ansonsten wollte ich nur mal ein Lebenszeichen senden, bzw die Info, dass ich dran bin. Ist halt auch immer von der verfügbaren Freizeit abhängig.

@github-actions github-actions bot removed the stale Outdated and ready to close label Apr 6, 2025
import (
"context"
"fmt"
"os"
Copy link
Member

Choose a reason for hiding this comment

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

Du brauchst gofmt oder einfach VScode

Copy link
Member

@andig andig Apr 6, 2025

Choose a reason for hiding this comment

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

Die Datei selbst muss nach plugin/auth und dann gem. #20066 Umgebaut werden. Ziel ist keine oauth2.TokenSource sondern ein http.Transport (…der dann selbst mittels oauth2.Transport umgesetzt wird).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ich verstehe nicht ganz - soll die generisch werden und als plugin/auth/identity.go dort liegen, in der Hoffnung dass alle oauth2 provider identisch sind? Oder Viessmann-spezifisch als plugin/auth/viessmann.go?

Copy link
Member

Choose a reason for hiding this comment

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

Letzteres. Deshalb muss sie sich mit eigenem Namen registrieren.

cache: 2s # to prevent making two identical requests straight after each other for "getmode"
headers:
- content-type: application/json
- authorization: Bearer {{.token}}
Copy link
Member

Choose a reason for hiding this comment

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

Siehe #20066

@mpollmeier
Copy link
Contributor Author

mpollmeier commented Apr 7, 2025

Aktueller Status auf diesem Branch: code und token abrufen klappt. Refresh token hab ich mit der go api nicht hinbekommen, vielleicht kannst du mir auf die Sprünge helfen, dann kann ich das testen.

go run viessmann-test.go

&{eyJraWQiOiI0ZWNhM2V....UjaN8NT5OJ-QcZA7LpNqec 
expires_in:3600 
refresh_token:1d51abffeb973fd8168b0869e0f3976b 
token_type:Bearer
] 0}

@andig
Copy link
Member

andig commented Apr 10, 2025

OAuth liefer expires_in, du brauchst aber Expiry. Das musst du einfach manuell ausrechnen und setzen, schau mal nach util.TokenWithExpiry.

@hbpv
Copy link
Contributor

hbpv commented Apr 11, 2025

Hey. So weit ich das sehe, kann ich nur einen Client im ViessmannDevPortal einrichten. Ich nutze diesen mit einer Config für die Viessmann HA Integration. Dort habe ich als URI „vicare://oauth-callback/everest“

Ich kann da jetzt noch eine hinzufügen, und die selbe Client ID nutzen.. aber ob das funktioniert?

IMG_8623

was aber dann auf jeden Fall für User wie mich, die die Integration zur Steuerung/Statis Info nutzen, ein Problem wird, sind die limitierten API Calls im kostenlosen Account. Die reichen im Monat für alle Entitäten einer WP aus, aber kommt dort noch evcc hinzu, wird das nicht reichen und den recht teuren pro Account erfordern..

aber trotzdem: geile Arbeit!

@mpollmeier
Copy link
Contributor Author

@hbpv die redirect URI ist für unseren use case egal, es muss nur derselbe sein für die beiden requests die wir machen. Das kannst du also auch auf dem "everest" lassen. Man kann also denselben client benutzen, wenn man schon einen anderen use case hat.

Bzgl. API call limitation: man darf 1450 api calls pro 24h mit dem kostenlosen Account machen, also einen call pro Minute. Wenn wir das mit dem caching vernünftig konfigurieren und vielleicht noch ein bisschen bewusste Trägheit einbauen, sehe ich hier überhaupt kein Problem.
Wir wollen und brauchen ja nicht ständig die aktuelle Temperatur auslesen, das reicht auch alle 20min oder so. Und genauso wollen wir ja die Warmwasserbereitung nicht alle zwei minuten an- und wieder ausschalten, sondern auch da eine gewisse Trägheit. Ich hab noch nicht danach gesucht, vermute aber, dass evcc das so schon bei anderen WP und Chargern so macht.

https://developer.viessmann.com/start/faq.html?appState=API%252Busage%253Dmaximum%252Bapi%252Bcalls

@MasterGoofy
Copy link

Da es die Integration nun ins offizielle Build geschafft hat wollte ich es nun auch testen, aber ich scheitere natürlich an der Installation_ID. Alle anderen Werte habe ich. CURL ist ebenfalls in der Powershell am Start. Könnt ihr bitte kurz beschreiben, wie ich den Aufruf nun machen muss um die Installation_ID zu erhalten?

@hbpv
Copy link
Contributor

hbpv commented May 31, 2025

Hey

Für alle die keinen Zugriff auf Curl haben, weil Sie HA auf dem Pi oder x86 direkt installiert haben und das evcc Admin nutzen, ein möglicher workaround. Vielleicht schaffe ich es die Tage einen Nodered Code zu exportieren der alles enthält was man braucht..

https://www.rustimation.eu/index.php/1_zugang_api/

Das ist zwar eine gesamte Anbindung, aber ich denke daraus kann man sicher den Part der InstallationID nutzen.

Vg

@andig
Copy link
Member

andig commented May 31, 2025

@mpollmeier der Doku fehlt noch die Erläuterung von curl, die scheint nur halb zu sein.

@Cruiserlive
Copy link

Vermutlich ganz gut beschrieben von ChatGPT, teste es heute Abend mal:

🔧 Voraussetzungen

Du brauchst:
• curl (für HTTP-Anfragen)
• jq (zum Parsen von JSON)
• Ein Viessmann Entwicklerkonto: https://app.developer.viessmann.com/
• Client ID, Benutzername, Passwort

🧩 Vorbereitung
1. Registriere dich auf https://app.developer.viessmann.com/
2. Erstelle dort eine Anwendung und notiere dir die:
• Client ID
• (Redirect URI sollte sein: http://localhost:4200/)
3. Definiere in deinem Terminal die folgenden Umgebungsvariablen:

Bash:
export VIESSMANN_USER=""
export VIESSMANN_PASS=""
export VIESSMANN_CLIENT_ID=""

🚀 Terminal-Befehl zum Abrufen der Installations-ID

Führe folgenden kompletten Block im Terminal aus:

Bash:

VIESSMANN_REDIRECT_URI="http://localhost:4200/"
VIESSMANN_CODE_CHALLENGE="5M5nhkBfkWZCGfLZYcTL-l7esjPUN7PpZ4rq8k4cmys"
VIESSMANN_CODE_VERIFIER="6PygdmeK8JKPuuftlkc6q4ceyvjhMM_a_cJrPbcmcLc-SPjx2ZXTYr-SOofPUBydQ3McNYRy7Hibc2L2WtVLJFpOQ~Qbgic455ArKjUz9_UiTLnO6q8A3e.I_fIF8hAo"

curl -X POST "https://iam.viessmann.com/idp/v2/token"
-H "Content-Type: application/x-www-form-urlencoded"
-d "grant_type=password&username=$VIESSMANN_USER&password=$VIESSMANN_PASS&client_id=$VIESSMANN_CLIENT_ID&scope=IoT%20User&redirect_uri=$VIESSMANN_REDIRECT_URI&code_challenge=$VIESSMANN_CODE_CHALLENGE&code_challenge_method=S256"

Die Antwort enthält ein access_token – benutze das dann wie folgt:

(Zuerst access_token aus Antwort extrahieren, z. B. manuell oder mit jq)

ACCESS_TOKEN=""

curl -X GET "https://api.viessmann.com/iot/v1/equipment/installations"
-H "Authorization: Bearer $ACCESS_TOKEN" | jq .

🔍 Was bekommst du?

Die Ausgabe enthält eine Liste mit deinen Installationen, und dort findest du:
• installationId
• gatewaySerial
• ggf. deviceId

Diese kannst du dann in deiner Konfiguration verwenden.

Die Codes von Viessmann könnten noch für private Zwecke funktionieren. Muss mir das heute Abend mal anschauen

@MasterGoofy
Copy link

Als alter Windowsmensch habe ich versucht in der Eingabeaufforderung folgendes zu tun :
set VIESSMANN_USER="[email protected]" #Ist ein anderer Account#
set VIESSMANN_PASS="Geheim1234" #Auch das Passwort ist ein anderes#
set VIESSMANN_CLIENT_ID="53456346345634566534653466" #Ebenso#
set VIESSMANN_REDIRECT_URI="http://localhost:4200/" #aus der Anleitung#
set VIESSMANN_CODE_CHALLENGE="5M5nhkBfkWZCGfLZYcTL-l7esjPUN7PpZ4rq8k4cmys" #aus der Anleitung#
set VIESSMANN_CODE_VERIFIER="6PygdmeK8JKPuuftlkc6q4ceyvjhMM_a_cJrPbcmcLc-SPjx2ZXTYr-SOofPUBydQ3McNYRy7Hibc2L2WtVLJFpOQ~Qbgic455ArKjUz9_UiTLnO6q8A3e.I_fIF8hAo" #aus der Anleitung#
curl -X POST "https://iam.viessmann.com/idp/v2/token" -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=password&username=$VIESSMANN_USER&password=$VIESSMANN_PASS&client_id=$VIESSMANN_CLIENT_ID&scope=IoT%20User&redirect_uri=$VIESSMANN_REDIRECT_URI&code_challenge=$VIESSMANN_CODE_CHALLENGE&code_challenge_method=S256"

Beim Absetzen des CURL Befehls kommt dann :
{"error":"invalid-token-request"}

@mpollmeier
Copy link
Contributor Author

Die Hilfe war noch nicht fertig, ich habe an der Stelle pausiert weil das Layout dann kaputt war. Ist aber keine große Sache, ich mache noch nen PR um das zu vervollständigen.

Das Layout ist zwar nicht mehr zerstört, dafür wird aber der Text einfach abgeschnitten. Der User soll diesen ja komplett kopieren, das ist zwar möglich aber so nicht ideal. Naja, ist wohl eh eher eine "Profi" Integration, solange wir die InstallationID nicht automatisiert ermitteln.
#20111 (comment)

@mpollmeier
Copy link
Contributor Author

Für alle, die es schonmal testen wollen:

VIESSMANN_USER=<your-user>
VIESSMANN_PASS=<your-password>
VIESSMANN_CLIENT_ID=<your-clientid>

Then execute the following (n.b. it's best to paste the entire block as-is, since the intermediate 'CODE' is only valid for 20 seconds):

VIESSMANN_REDIRECT_URI="http://localhost:4200/"
VIESSMANN_CODE_CHALLENGE="5M5nhkBfkWZCGfLZYcTL-l7esjPUN7PpZ4rq8k4cmys"
VIESSMANN_CODE_VERIFIER="6PygdmeK8JKPuuftlkc6q4ceyvjhMM_a_cJrPbcmcLc-SPjx2ZXTYr-SOofPUBydQ3McNYRy7Hibc2L2WtVLJFpOQ~Qbgic455ArKjUz9_UiTLnO6q8A3e.I_fIF8hAo"

VIESSMANN_CODE=$(curl -X POST --silent \
  --user $VIESSMANN_USER:$VIESSMANN_PASS \
  --output /dev/null \
  --dump-header -    \
  "https://iam.viessmann.com/idp/v3/authorize?client_id=$VIESSMANN_CLIENT_ID&redirect_uri=$VIESSMANN_REDIRECT_URI&scope=IoT%20User%20offline_access&response_type=code&code_challenge=$VIESSMANN_CODE_CHALLENGE&code_challenge_method=S256" \
  | grep "^location: "            \
  | sed 's/.*\?code=\(.*\).*/\1/' \
  | tr -d '[:space:]')

TOKEN_RESPONSE=$(curl -XPOST --silent \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data "grant_type=authorization_code&client_id=$VIESSMANN_CLIENT_ID&redirect_uri=$VIESSMANN_REDIRECT_URI&code_verifier=$VIESSMANN_CODE_VERIFIER&code=$VIESSMANN_CODE" \
  https://iam.viessmann.com/idp/v3/token)

VIESSMANN_TOKEN=$(echo $TOKEN_RESPONSE | jq --raw-output .access_token)

curl -X GET https://api.viessmann.com/iot/v1/equipment/installations?includeGateways=true -H "Authorization: Bearer $VIESSMANN_TOKEN" > viessmann-installation.json
VIESSMANN_INSTALLATION_ID=$(jq '.data[].id' viessmann-installation.json)
VIESSMANN_GATEWAY_SERIAL=$(jq '.data[].gateways[].serial' --raw-output viessmann-installation.json)

@MasterGoofy
Copy link

Dank einer Ubuntu VM habe ich die Scripte ausgeführt.
Aus der viessmann-installation.json habe ich die data.id in evcc in die Installation ID übernommen.
Klicke ich auf prüfen kommt :
Status: fehlgeschlagen
chargeStatus: dimm mode

@mpollmeier
Copy link
Contributor Author

Klicke ich auf prüfen kommt :
Status: fehlgeschlagen

Kann ich bestätigen, das ist bei mir mit master auch so. In dem Branch ging es mal... @andig hast du eine Idee was da los ist? Mit --log trace sieht man die HTTP requests und da sieht alles gut aus. Danach kommt ein error log eintrag chargeStatus: dimm mode - was bedeutet das?

@andig
Copy link
Member

andig commented May 31, 2025

Arg- modi haben neue nummern: dimm, normal, boost. Vorher wars andersrum. Entspricht jetzt sgready standard.

@mpollmeier
Copy link
Contributor Author

Ich verstehe nicht ganz. Es geht vermutlich um diese hier? Aus weishaupt-wpm.yaml:

    - case: 1 # normal
    - case: 2 # boost
    - case: 3 # dimm

In viessmann.yaml fehlt demnach case: 3 #dimm, richtig?
Was bedeutet denn dimm? Wir brauchen doch auch nur zwei modes eigentlich, boost und normal...

@mpollmeier
Copy link
Contributor Author

Hier noch die restlichen Docs: #21568

@andig kannst du noch was zum dem dimm mode sagen, damit wir es ans Laufen bekommen?

@andig
Copy link
Member

andig commented Jun 1, 2025

Es hat sich nur die Numerierung der Modi geändert, siehe https://docs.evcc.io/docs/devices/heating. Wenn wir dimm nicht haben hilft

    - source: error
      error: ErrNotAvailable

mpollmeier added a commit to mpollmeier/evcc that referenced this pull request Jun 1, 2025
@mpollmeier
Copy link
Contributor Author

👍🏻 #21574

mpollmeier added a commit to mpollmeier/evcc that referenced this pull request Jun 1, 2025
@mpollmeier
Copy link
Contributor Author

und wo wir schonmal dabei sind
#21576

@mpollmeier
Copy link
Contributor Author

hmm, mit 448ef7d bekomme ich immer noch denselben Fehler...
image

@andig
Copy link
Member

andig commented Jun 1, 2025

Kannst du das mal bitte mit

evcc charger 

testen?

@naltatis der Text hinter dimm mode erscheint abgeschnitten?

@andig
Copy link
Member

andig commented Jun 1, 2025

@naltatis nvm. Die Fehlermeldung ist so kryptisch: https://github.com/search?q=repo%3Aevcc-io%2Fevcc+%22dimm+mode%22&type=code

@andig
Copy link
Member

andig commented Jun 1, 2025

@mpollmeier …und da ist auch die Erklärung. Getmode muss natürlich mit angepasst werden!

mpollmeier added a commit to mpollmeier/evcc that referenced this pull request Jun 1, 2025
@mpollmeier
Copy link
Contributor Author

works now

image

@JanGew
Copy link

JanGew commented Jun 2, 2025

Bei mir kommt zusätzlich zum Fehler mit dem dimm-mode noch folgender:

ERROR 2025/06/02 09:33:27 charger status: unexpected status: 429 (Too Many Requests)

Im kostenlosen Basic-Plan von der Viessmann API habe ich 1450 Abfragen pro Tag, die sind anscheinend schnell weg.

@andig
Copy link
Member

andig commented Jun 2, 2025

Eine Abfrage je Minute wird nicht genügen. Dafür müssten wir evcc- ggf. optional- abgewöhnen, den Enabled() Status nachzulesen. Das passiert sonst bei jedem Durchlauf da zumindest theoretisch auch andere Einheiten steuern könnten.

@JanGew
Copy link

JanGew commented Jun 2, 2025

Ich habe gerade noch mal nachgesehen. Selbst bei den kostenpflichtigen Zugängen bei Viessmann sind es nur 3000 API calls pro Tag. Das wird also knapp... 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
heating Heating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unterstützung von Viessmann Wärmepumpen
8 participants