Viessmann VitoConnect API

Begonnen von ritschi, 22 März 2018, 06:53:24

Vorheriges Thema - Nächstes Thema

Mave

Jetzt hat es funktioniert, aber ich bekomme dieselben Fehlermeldungen wie Du...  :-[

sepultura30

#151
Zitat von: Aladin222 am 27 Oktober 2018, 15:18:41
@mave

installiere mal php !
sudo apt install php7.0-cli

@all

ich bekomme folgende Fehlermeldung


fhem@ubuntu:/opt/fhem$ /opt/fhem/vissmann.php --dump -user xxx -passwd xxx
PHP Notice:  Use of undefined constant CURLOPT_URL - assumed 'CURLOPT_URL' in /opt/fhem/vissmann.php on line 189
PHP Notice:  Use of undefined constant CURLOPT_HTTPHEADER - assumed 'CURLOPT_HTTPHEADER' in /opt/fhem/vissmann.php on line 190
PHP Notice:  Use of undefined constant CURLOPT_SSL_VERIFYPEER - assumed 'CURLOPT_SSL_VERIFYPEER' in /opt/fhem/vissmann.php on line 191
PHP Notice:  Use of undefined constant CURLOPT_RETURNTRANSFER - assumed 'CURLOPT_RETURNTRANSFER' in /opt/fhem/vissmann.php on line 192
PHP Notice:  Use of undefined constant CURLOPT_USERPWD - assumed 'CURLOPT_USERPWD' in /opt/fhem/vissmann.php on line 193
PHP Notice:  Use of undefined constant CURLOPT_HTTPAUTH - assumed 'CURLOPT_HTTPAUTH' in /opt/fhem/vissmann.php on line 194
PHP Notice:  Use of undefined constant CURLAUTH_BASIC - assumed 'CURLAUTH_BASIC' in /opt/fhem/vissmann.php on line 194
PHP Notice:  Use of undefined constant CURLOPT_POST - assumed 'CURLOPT_POST' in /opt/fhem/vissmann.php on line 195
PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in /opt/fhem/vissmann.php:197
Stack trace:
#0 /opt/fhem/vissmann.php(34): getCode()
#1 {main}
  thrown in /opt/fhem/vissmann.php on line 197


Diese Fehler bekomme ich auch, obwohl PHP7.0 und curl installiert ist.

Die Lösung ist: apt-get install php7.0-curl

Grüse

Sandro

Frini

Mir raucht der Schädel.
Ich versuche den ganzen Abend die Einmalladung irgendwie in ein brauchbares php-Script zu bringen, damit ich diese aus FHEM anstoßen kann.
"links":[{"rel":["self"],"href":"https://api.viessmann-platform.io/operational-data/installations/XXXXXX/gateways/7571381802091109/devices/0/features/heating.dhw.oneTimeCharge"},
{"rel":["up"],"href":"https://api.viessmann-platform.io/operational-data/installations/XXXXXX/gateways/7571381802091109/devices/0/features"},
{"rel":["http://schema.viessmann.com/link-relations#live-updates","https://wiki.viessmann.com/display/VPL/Relations#Relations-live-updates"],
"href":"/operational-data/installations/XXXXXX/gateways/7571381802091109/devices/0/features/heating.dhw.oneTimeCharge"}],
"class":["heating.dhw.oneTimeCharge","feature"],
"properties":{"active":{"type":"boolean","value":false}},
"entities":[{"rel":["http://schema.viessmann.com/link-relations#feature-meta-information",
"https://wiki.viessmann.com/display/VPL/Relations#Relations-feature-meta-information",
"https://wiki.viessmann.com/display/VPL/Amounts#Amounts-unique"],
"properties":{"apiVersion":1,"isEnabled":true,"isReady":true,"gatewayId":"7571381802091109",
"feature":"heating.dhw.oneTimeCharge",
"uri":"/v1/gateways/7571381802091109/devices/0/features/heating.dhw.oneTimeCharge",
"deviceId":"0","timestamp":"2018-10-27T22:57:50.269Z"}}],
"actions":[{"method":"POST","isExecutable":true,"href":"https://api.viessmann-platform.io/operational-data/installations/XXXXXX/gateways/7571381802091109/devices/0/features/heating.dhw.oneTimeCharge/activate",
"name":"activate",
"title":"activate",
"fields":[],
"type":"application/json"},
{"method":"POST","isExecutable":true,
"href":"https://api.viessmann-platform.io/operational-data/installations/XXXXXX/gateways/7571381802091109/devices/0/features/heating.dhw.oneTimeCharge/deactivate",
"name":"deactivate",
"title":"deactivate",
"fields":[],
"type":"application/json"}]},
{"rel":["http://schema.viessmann.com/link-relations#feature","https://wiki.viessmann.com/display/VPL/Relations#Relations-feature","https://wiki.viessmann.com/display/VPL/Amounts#Amounts-collection"],


Das Setzen der Temperatur konnte ich mir aus einer Mischung von  thetrueavatar und der Hilfe von heiko73 zusammenbasteln. Beide Heizkreise können nun aus FHEM gesteuert werden.

Kann mir vielleicht jemand einen Tip geben, wie ich die Einmalladung in eine php packen kann?

renardfm

Ich habe das Feature leider nicht.
Vitoladens300c mit vitocell100B 400l Speicher.. merkwürdig.
Wie taucht das in der Vicare App bei dir auf?

Frini

Unten rechts über den Button.

renardfm

Was hast du für eine Heizung?
Bei mir fehlt der Punkt leider.


Frini

Vitodens 333f. Meine App ist in Version 2.1

Mave

Nach Installation von PHP-CURL kann ich die Werte auslesen!

sudo apt-get install php-curl


Jetzt habe ich "nur" noch diese Meldungen im Log:

PHP Notice:  Undefined offset: 0 in /opt/fhem/viessmann.php on line 193
PHP Warning:  Invalid argument supplied for foreach() in /opt/fhem/viessmann.php on line 194
PHP Notice:  Undefined offset: 0 in /opt/fhem/viessmann.php on line 193
PHP Warning:  Invalid argument supplied for foreach() in /opt/fhem/viessmann.php on line 194
PHP Notice:  Undefined offset: 0 in /opt/fhem/viessmann.php on line 193
PHP Warning:  Invalid argument supplied for foreach() in /opt/fhem/viessmann.php on line 194
PHP Notice:  Undefined offset: 0 in /opt/fhem/viessmann.php on line 193
PHP Warning:  Invalid argument supplied for foreach() in /opt/fhem/viessmann.php on line 194
PHP Notice:  Undefined offset: 0 in /opt/fhem/viessmann.php on line 193
PHP Warning:  Invalid argument supplied for foreach() in /opt/fhem/viessmann.php on line 194
PHP Notice:  Undefined offset: 0 in /opt/fhem/viessmann.php on line 193
PHP Warning:  Invalid argument supplied for foreach() in /opt/fhem/viessmann.php on line 194
PHP Notice:  Undefined offset: 0 in /opt/fhem/viessmann.php on line 193
PHP Warning:  Invalid argument supplied for foreach() in /opt/fhem/viessmann.php on line 194

Frini

Hallo,
schau mal ein zwei Seiten vor. Ich hatte ähnliche Probleme. läuft jetzt aber. Hast Du die Datei ausführbar gemacht?
Besitzer und group sind korrekt?

Das ist mein Befehl zum Ausführen
php7.0 /opt/fhem/vissmann.php -user xxxx -passwd xxxx

Das ist der Def Bereich von meinem AT:
+*00:02 "php7.0 /opt/fhem/viessmann/viessmann2410.php -user xxxx@gmail.com -passwd xxxx"

Die XXXX mit Deinen Anmeldedaten aus der ViCare App ersetzen.

Mave

Da scheint aber die Definition des Array falsch zu sein....


Mave

Funktionieren tut es jetzt mit php7.0
Die Fehlermeldungen im Log sind aber nachwievor da.


Frini

Ich habe seit heute morgen auch wieder die oben genannten Fehlermeldungen.
Wo finde ich denn die Log-Einträge die ich mit --dump öffne? Im FHEM Log finde ich nichts.

Ich habe noch einmal den Schedule mit GetFeature extrahiert hier der Aufbau
"mon":[{"start":"05:00","end":"07:00","mode":"normal","position":0},{"start":"05:00","end":"07:00","mode":"normal","position":1},{"start":"05:00","end":"07:00","mode":"normal","position":2}],"tue":[{"start":"05:00","end":"07:00","mode":"normal","position":0}],"wen":[{"start":"05:00","end":"07:00","mode":"normal","position":0}],"thu":[{"start":"05:00","end":"07:00","mode":"normal","position":0},{"start":"11:00","end":"13:00","mode":"normal","position":1},{"start":"16:00","end":"22:00","mode":"normal","position":2}],"fri":[{"start":"05:00","end":"07:00","mode":"normal","position":0}],"sat":[{"start":"05:00","end":"07:00","mode":"normal","position":0}],"sun":[{"start":"05:00","end":"07:00","mode":"normal","position":0}],



andreas13

#162
Führt einfach mal /opt/fhem/vissmann —debug -user xxx -passwd xxx auf der Console (putty oder ssh) aus. Dann seht ihr was falsch läuft.
Das Skript hat leider kein vernünftiges Errorhandling wegen Zeitmangel meinerseits [emoji853]


Gesendet von iPad mit Tapatalk Pro
Maintainer des Vitoconnect Moduls
In Betrieb: FritzBox 7590, Homematic
piko Wechelrichter (HTTPMOD). Sonos ....
noch: IT

Frini

Ok. Check ich heute abend. Auf meinem Handy ist das zu unübersichtlich.

opus42

Ich melde mich als brandneuer Besitzer einer Vitodens333 mit VitoControl  in den Kreis.

Erstmal vielen Dank/ Merci beaucoup an alle die diesen Zugang erkundet und das Script zur Verfügung gestellt haben.

Eine erste (dumme?) Frage, im Script werden harcoded "clientID" und ClientSecret" genutzt, sollte das unverändert bleiben??? Ein erster Test mit den unveränderten Werten hat funktioniert, aber sollte nicht jeder Client anderes sein?