Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

Hallo zusammen,

seit kurzem habe ich einen Warp-Charger und möchte jetzt mittels meiner HomeMatic-Steuerung permanent den maximalen Ladestrom dem Überschuss der PV-Anlage anpassen.
Dafür gibt es ja die HTML-Schnittstelle die ich gerne mit einem kleinen Script ansprechen würde. Leider habe ich da meine Schwierigkeiten.

Um zu testen, ob das überhaupt funktioniert habe ich das in der Windows (Win10) Kommandozeile getestet. Wie sich herausgestellt hat, funktioniert das Auslesen der Daten damit problemlos, aber das Schreiben hat wohl ein Problem. Ich habe einfach nur die Kommandos aus dem Api-Manual (https://www.warp-charger.com/api.html) kopiert und die IP des WARP angepasst:

C:\Users\Rio>curl -s http://192.168.0.62/evse/max_charging_current
{"max_current_configured":6000,"max_current_incoming_cable":16000,"max_current_outgoing_cable":32000}

C:\Users\Rio>curl -H 'Content-Type: application/json' -X PUT -d '{"current":8000}' 192.168.0.62/evse/current_limit
curl: (6) Could not resolve host: application
404

Habe ich irgendetwas übersehen? Leider finde ich zu dem Thema immer nur Topcis die OpenWB behandeln oder sonstiges, aber nicht den eigentlichen Zugriff auf den Warp Charger.

 

Danke und beste Grüße,

Rio

Geschrieben

Moin,

Da sind die Beispiele in der API-Dokumentation schlecht. Unter Windows funktioniert das nur, wenn du alle einfachen Anführungszeichen durch doppelte ersetzt und die "verschachtelten" (also die im JSON-Payload) mit \ escapst, zum Beispiel so:

curl -H "Content-Type: application/json" -X PUT -d "{\"current\": 8000}" 192.168.0.62/evse/current_limit

 

Geschrieben
  • Autor

Hallo,

hervorragend, dankeschön! Das war das Problem.

Dann bastel ich mal den Rest vom Skript, aber das sollte ja unabhängig von der Warp-Box funktionieren.

Danke nochmal

 

Edit:

Falls noch jemand das Problem hat. Mit Nutzung von CUXD ist der Befehl innerhalb des HomeMatic-Skriptes dann:

dom.GetObject("CUxD.CUX2801001:1.CMD_EXEC").State("LD_LIBRARY_PATH=/usr/local/addons/cuxd /usr/local/addons/cuxd/curl -H \"Content-Type: application/json\" -X PUT -d \"{\"current\": 12000}\" 192.168.0.62/evse/current_limit");

Statt dem \"{\"current\": 12000}\" muss dann natürlich eine String-Variable rein.

 

bearbeitet von Rio

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.