VZUG Home auslesen

Hallo zusammen

Ich habe einen Steamer von VZUG mit eingebautem VZUG Home. Diesen kann man via Get-request eigentlich ganz gut auslesen. Aber ich kriege da etwas komischen Output, welchen ich nicht weiterverwerten kann.

Auf der Webseite sieht es aus wie auf dem Bild Steamer_webseite.jpg.

Wenn ich die Daten via PHP-script auslese kriege ich folgenden Output:


DeviceName: Steamer
Inactive: false
Program:  Regenerieren,  100
Status:  100
 6 48 

Der simple Ausleseskript sieht wie folgt aus:

//Definitionen
$debug = 1;
$ip_steamer = "192.168.1.169";

//Status abrufen
$antwort = file_get_contents("http://".$ip_steamer."/ai?command=getDeviceStatus");

//Wenn keine Antwort vom Steamer kommt 
if ($antwort === False)
{
  if ($debug == 1) echo "
Steamer unter der IP ".$ip_steamer." derzeit nicht erreichbar

";
}
else
{
  $json = json_decode($antwort);

  echo "DeviceName: ".$json->DeviceName."
";
  echo "Inactive: ".$json->Inactive."
";
  echo "Programm: ".$json->Program."
";	// ==> Symbol, Programm, <Komma>, Symbol, Temperatur
  echo "Status: ".$json->Status."
"; 	// ==> Symbol, Temperatur <enter>, Symbol, Restdauer

Wie kann ich rauskriegen, was die komischen Zeichen genau sind, so, dass ich sie einfach ausfiltern kann ? Oder natürlich besser, wie kann ich die dekodieren, damit ich normal lesbaren Text habe ? Versuche mit htmlentities, html_entity_decode, utf8_decode haben alle nichts gebracht. Auch wenn ich den Quelltext der Webseite anschaue kriege ich keinen brauchbaren Input, da die Symbole ebenfalls nicht dargestellt werden können.

Im Quelltext des Steamers findet sich auch JavaScript code. Anhand des Codes sieht es aus, als ob die selbe Abfrage zum DeviceStatus in JavaScript stattfindet:


$.ajax({
			url : serverAddr + '/ai?command=getDeviceStatus',
			dataType : 'json',
			cache: false,
			success : function(jsonString) {
				// device name
				if (jsonString.DeviceName === "") {
					$("#deviceNameFieldLabel").html("");
				}
				else {
					$("#deviceNameFieldLabel").html('(' + jsonString.DeviceName + ')');
				}
				
				// running program with symbols embedded to nimbus font				
				$("#runningProgram").html(jsonString.Program);

				// show if device is active
				if (jsonString.Inactive === "false") {
					$('#circle').css('background-color', '#3fce00');
					
					// do not show turnoff-button for devices with serial number starting with:
				    // "31" (Kochfelder), "51" (Kuehlschrank)
				    // and zhMode is not 'Bedienen und Anzeigen(2)'
					if (jsonString.Serial.slice(0,2) != "31" && jsonString.Serial.slice(0,2) != "51" && lZhMode === 2)
					{
						$('#turnOffInput').show();
					}
					else
					{
						$('#turnOffInput').hide();
					}
				}
				else {
					$('#circle').css('background-color', 'grey');
					
					// do not show turnoff button
					$('#turnOffInput').hide();	
				}
				
				// status
				updateCurrentState(jsonString.Status);
				
				// end time
				updateProgramEnd(jsonString.ProgramEnd);
			},
			error : function() {
				console.log('error getting deviceStatus');
				setTimeout(function(){getRuntimeInfo();}, 10000);
			}
		});

Ich kann daraus aber leider nicht ableiten, wie die Anzeige der Symbole gemacht wird.

Besten Dank für euren Input.

Gruss Letraz

Steamer_webseite.jpg

Dann antworte ich mir einmal selber mit einem Update.

Ich habe VZUG angeschrieben und um eine API-Dokumentation oder der Erklärung der komischen Symbole gebeten. Nach einiger Zeit und entsprechender Nachfrage hat man mir folgendes Statement zukommen lassen:

Besten Dank für Ihre Anfrage und ihr Interesse an der Vernetzung unserer Haushaltsgeräte per API.

Im Moment dient die Vernetzung unserer Geräte lediglich dem Zugriff auf die Geräte über die V-ZUG App sowie unseres Partners digitalStrom.

Wie Sie bereits bemerkt haben, ist diese proprietäre API nicht mehr auf dem aktuellsten Stand und die Antworten beispielsweise auch nicht immer ganz sauber, was auch der Grund ist, weshalb wir sie nicht zum öffentlichen Gebrauch zur Verfügung stellen.

Aktuell überarbeiten wir aber diese API’s (u.a. REST-kompatibel, https, etc.) und bereiten den Launch eines Developer Portals vor, über welches registrierte Entwickler die API-Dokumentation nutzen können. Dieses Jahr wird das Portal erst einigen wenigen B2B-Smart Home Partnern zur Verfügung gestellt werden.

Für nächstes Jahr planen wir aber die Freigabe des Portals, so dass dann auch entsprechende Integrationen erstellt werden können.

Tja, wird dann wohl so schnell nix werden mit der Einbindung in IPS :frowning:

Hallo,
mich würde interesieren ob ihr weitergekommen seit mit der VZUG integration.
Gibt es irgendwelche Erfahrungen VZUG Home Geräte über digitalStrom in Sysmcon einzubinden?
Grüße
Marcus

Ich habe neuerdings eine v-Zug Geschirrwaschmaschine. Ich kann sehr gut die Zustände herauslesen. Das Gerät hat eine web-gui. Im Source Code findet man die Abfragen. Ebenso findet man die Abfragen im WireShark unverschlüsselt. In der App kann man noch das Gerätfernsteuern. Diese Befehle habe ich noch nicht entziffert. Ohne root access kann man wahrscheinlich kaum mit einem android Handy die Kommunikation mithören.

Habe einfach einmal mein Skript gepostet. vielleicht hilfs. Falls jemand die Befehle zum Einschalten der Programme „Vorspülen“, „Economy“, „Automatic“, „Intensive“ kennt, gerne melden. Fand nur Code zum Stoppen!


> $ip = "192.168.1.111";
> 
> //Status abrufen
> 
> $antwort1 = file_get_contents("http://".$ip."/ai?command=getDeviceStatus");
> $antwort2 = file_get_contents("http://".$ip."/ai?command=getModelDescription");
> $antwort3 = file_get_contents("http://".$ip."/hh?command=getZHMode");
> $antwort4 = file_get_contents("http://".$ip."/ai?command=getLastPUSHNotifications");
> $antwort5 = file_get_contents("http://".$ip."/hh?command=getProgram");
> $antwort6 = file_get_contents("http://".$ip."/hh?command=getCommand");
> $antwort6a = file_get_contents("http://".$ip."/hh?command=getCommands");
> $antwort7 = file_get_contents("http://".$ip."/hh?command=getCategories");
> 
> 
> $antwort80 = file_get_contents("http://".$ip."/hh?command=getCategory&value=CATEGORY_0");
> $antwort900 = file_get_contents("http://".$ip."/hh?command=getCommands&value=CATEGORY_2");
> 
> 
> $befehl1 = file_get_contents("http://".$ip."/hh?command=doTurnOff");
> 
> 
> 
> SetValue(31713,$antwort1['Inactive']);
> SetValue(23709,$antwort1['Program']);
> SetValue(35441,$antwort1['Status']);
> SetValue(58040,$antwort1['ProgramEnd']['End']);
> SetValue(15522,$antwort4['0']['date']);
> SetValue(27221,$antwort4['0']['message']);
> SetValue(37156,$antwort5[0]['status']);
> 
> if (GetValue(37156)<>"idle"){
> SetValue(33038,$antwort5[0]['name']);
> SetValue(22521,filter_var($antwort5[0]['energySaving']['set'], FILTER_VALIDATE_BOOLEAN)); >  SetValue(39818,filter_var($antwort5[0]['optiStart']['set'], FILTER_VALIDATE_BOOLEAN));
>  SetValue(17389,filter_var($antwort5[0]['partialload']['set'], FILTER_VALIDATE_BOOLEAN));
> SetValue(33799,filter_var($antwort5[0]['rinsePlus']['set'], FILTER_VALIDATE_BOOLEAN));
> SetValue(53781,filter_var($antwort5[0]['dryPlus']['set'], FILTER_VALIDATE_BOOLEAN));
> 
> if ($antwort5[0]['duration']['act']>0){
> date_default_timezone_set("Europe/Berlin");
> SetValue(47620, date('H:i:s', time() + $antwort5[0]['duration']['act']) );
>     }
> 
>     SetValue(58077,$antwort5[0]['activeStepIndex']);
>     SetValue(30427,implode(",", $antwort5[0]['stepIds']));
> 
> }
> 
> else {
> 
>     $antwort=json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=PIN_ECO"),true);
> 
>     SetValue(22521,$antwort['value']);
> 
>     $antwort=json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=PIN_PARTIALLOAD"),true);
>     SetValue(17389,$antwort['value']);
> 
>     $antwort=json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=PIN_OPTISTART"),true);
>     SetValue(39818,$antwort['value']);
> 
>     $antwort=json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=PIN_STARTTIME"),true);
>     SetValue(24596,$antwort['value']);
> 
>     $antwort=json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=PIN_RINSE_PLUS"),true);
>     SetValue(33799,$antwort['value']);
> 
>     $antwort=json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=PIN_DRY_PLUS"),true);
>     SetValue(53781,$antwort['value']);
> 
> }
> 
> $antwort=json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=PIN_STARTTIME"),true);
> SetValue(24596,$antwort['value']);
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=ECO_MGMT_INFO"),true);
> SetValue(53781,filter_var($antwort['value'], FILTER_VALIDATE_BOOLEAN));
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=ECO_MGMT_ENERGY_PROGRAM"),true);
> SetValue(58089,$antwort['value']);
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=ECO_MGMT_WATER_PROGRAM"),true);
> SetValue(20214,$antwort['value']);
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=ECO_MGMT_ENERGY_AVG"),true);
> SetValue(51702,$antwort['value']);
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=ECO_MGMT_WATER_AVG"),true);
> SetValue(31301,$antwort['value']);
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=ECO_MGMT_ENERGY_TOTAL"),true);
> SetValue(36961,$antwort['value']);
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=ECO_MGMT_WATER_TOTAL"),true);
> 
> SetValue(27219,$antwort['value']);
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=CHILD_PROOF_LOCK"),true);
> 
> SetValue(57330,$antwort['value']);
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=ALL_IN_ONE"),true);
> SetValue(19242,$antwort['value']);
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=DSP_ILLUMINATION"),true);
> SetValue(25096,$antwort['value']);
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=DSP_BUTTON_SOUND"),true);
> SetValue(22187,intval(NamesValues($antwort['value'])));
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=DSP_SIGNAL_SOUND"),true);
> SetValue(42456,intval(NamesValues($antwort['value'])));
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=BRIGHTENER"),true);
> SetValue(11975,intval(NamesValues($antwort['value'])));
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=WATER_HARDNESS_UNIT"),true);
> SetValue(57165,intval(NamesValues($antwort['value'])));
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=WATER_HARDNESS"),true);
> SetValue(30098,intval(NamesValues($antwort['value'])));
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=TEMPERATURE_UNIT"),true);
> SetValue(14618,intval(NamesValues($antwort['value'])));
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=INTERIOR_LIGHTING"),true);
> SetValue(19413,intval(NamesValues($antwort['value'])));
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=FUNCTION_LIGHT"),true);
> SetValue(47149,intval(NamesValues($antwort['value'])));
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=AUTO_DOOR_OPENER"),true);
> SetValue(41875,$antwort['value']);
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=DSP_CTRL_DOOR_ANGLE"),true);
> SetValue(45054,$antwort['value']);
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=STANDBY_AUTOMATIC"),true);
> SetValue(55854,$antwort['value']);
> 
> $antwort = json_decode(file_get_contents("http://".$ip."/hh?command=getCommand&value=HOT_WATER"),true);
> SetValue(55797,intval(NamesValues($antwort['value'])));
> 
> 
> function NamesValues($value) {
> 
>        $result = $value;
>         $result = str_replace('Vorspülen',    '1',     $result);
>         $result = str_replace('Reinigen',   '2',   $result);
>         $result = str_replace('Glanzspülen', '3',   $result);
>         $result = str_replace('Trocknen', '4',   $result);        
> 
>         $result = str_replace('false',   '0',   $result);
>         $result = str_replace('true', '1',   $result);
>         $result = str_replace('AUS', '0',   $result);
>         $result = str_replace('LEISE', '1',   $result);
>         $result = str_replace('1', '1',   $result);
>         $result = str_replace('2', '2',   $result);
>         $result = str_replace('3', '3',   $result);
>         $result = str_replace('4', '4',   $result);
>         $result = str_replace('5', '5',   $result);
>         $result = str_replace('6', '6',   $result);
>         $result = str_replace('7', '7',   $result);
>         $result = str_replace('8', '8',   $result);
>         $result = str_replace('9', '9',   $result);
>         $result = str_replace('10', '10',   $result);
>         $result = str_replace('11', '11',   $result);
>         $result = str_replace('12', '12',   $result);
>         $result = str_replace('AUTOMATISCH', '13',   $result);
>         $result = str_replace('°fH', '0',   $result);
>         $result = str_replace('°dH', '1',   $result);
>         $result = str_replace('0-5', '0',   $result);
>         $result = str_replace('6-10', '1',   $result);
>         $result = str_replace('11-15', '2',   $result);
>         $result = str_replace('16-20', '3',   $result);
>         $result = str_replace('21-25', '4',   $result);
>         $result = str_replace('26-30', '5',   $result);
>         $result = str_replace('31-35', '6',   $result);
>         $result = str_replace('36-40', '7',   $result);
>         $result = str_replace('41-50', '8',   $result);
>         $result = str_replace('51-60', '9',   $result);
>         $result = str_replace('61-70', '10',   $result);
>         $result = str_replace('71-80', '11',   $result);
>         $result = str_replace('81-120', '12',   $result);
>         $result = str_replace('0-3', '13',   $result);
>         $result = str_replace('4-6', '14',   $result);
>         $result = str_replace('7-9', '15',   $result);
>         $result = str_replace('10-12', '16',   $result);
>         $result = str_replace('13-14', '17',   $result);
>         $result = str_replace('15-16', '18',   $result);
>         $result = str_replace('17-19', '19',   $result);
>         $result = str_replace('20-22', '20',   $result);
>         $result = str_replace('23-27', '21',   $result);
>         $result = str_replace('28-32', '22',   $result);
>         $result = str_replace('33-38', '23',   $result);
>         $result = str_replace('39-45', '24',   $result);
>         $result = str_replace('46-65', '25',   $result);
>         $result = str_replace('°C', '0',   $result);
>         $result = str_replace('°F', '1',   $result);  
> 
>         $result = str_replace('EIN', '1',   $result);
>         $result = str_replace('OHNE HEIZEN', '2',   $result);
>        return $result;}

Auch noch ein Skript zum die Werte setzen:

> <?php
> 
> $ip = "192.168.1.44";
> 
> if ($_IPS['SENDER'] == 'WebFront')
> 
>     {
> 
>     SetValue($_IPS['VARIABLE'], $_IPS['VALUE']);
> 
>     switch (TRUE)
> 
>         {
> 
>             case ($_IPS['VALUE']==0) : //=setBRIGHTENER&value=1
> 
>                 file_get_contents("http://".$ip."/hh?command=setBRIGHTENER&value=AUS");  
> 
>             break;
> 
>             case ($_IPS['VALUE']>=1 and $_IPS['VALUE']<=12): 
> 
>                 file_get_contents("http://".$ip."/hh?command=setBRIGHTENER&value=".$_IPS['VALUE']);  
> 
>             break;
> 
>             
> 
>             case ($_IPS['VALUE']==13): 
> 
>                 file_get_contents("http://".$ip."/hh?command=setBRIGHTENER&value=AUTOMATISCH"); 
> 
>             break;
> 
>         }
> 
>      }

Hallo msiegw,

vielen Dank für dein Script. Ich versuche dies aktuell auf meine V-ZUG Waschmaschine umzusetzen.

Welche Variablen hast du dafür in Symcon angelegt? Ich sehe zwar deine ID’s im Script, aber leider nicht was dahinter steht.

Danke und Gruss
Andi

Als erstes musst Du die IP Adresse Deiner Waschmaschine angeben. Siehe $ip im Skrip. Dann musst Du versuchen, welche der obigen Befehle für Deine Waschmaschine passen.

Probier z.B.


>  $antwort1 = file_get_contents("http://".$ip."/ai?command=getDeviceStatus");

Versuche die $antwort1 mit

var_dump($antwort1);

zu analysieren. Dann kannst Du teile dieser Antwort in entsprechende Variablen in IP-Symcon speichern.

Hallo,
habe einen CombiSteamer V6000 soweit in HA integriert, dass ich ihn auslesen kann.
Nur sind die beiden Werte „Program“ und „Status“ immer leer. Unabhängig ob das Gerät läuft oder nicht. „Inaktiv“ wird richtig dargestellt und auch übermittelt, ebenfalls die „EndTime“ etc. In der V-Zug App wird das richtig angezeigt. Weiss jemand Bescheid oder ähnliches erkannt?

danke sehr - Gruss JJ

{„DeviceName“:„“,„Serial“:„23030 000000“,„Inactive“:„false“,„Program“:„“,„Status“:„“,„ProgramEnd“:{„EndType“:„0“,„End“:„“},„deviceUuid“:„3300600“}

Hallo jjdave

Willkommen im Forum.
Wie du in meinem 1. Post zuoberst siehst, habe ich auch Probleme mit dem Auslesen von „Program“ und „Status“ bei meinem Steamer. Seit November 2020 verspricht VZUG eine Überarbeitung der API. Angeblich ist die in Arbeit, aber veröffentlicht wird sie bisher nicht. Sprich: „Da geschieht nix.“
Ich frage alle halbe Jahr einmal beim Produktmanager nach. Zuletzt Ende letzten Jahres. Bisher wurde ich immer wieder vertröstet, aber mittlerweilen kriege ich nicht einmal mehr eine Antwort…
Gemäss dem uralten indianischen Sprichwort „Wenn Du entdeckst, dass Du ein totes Pferd reitest, steig ab“, wende ich da keinen Aufwand mehr auf.
Prädikat: Unbrauchbar für eine Integration in die Hausautomation ! Immerhin macht das Gerät bei lokaler Bedienung was es soll, was ja eigentlich auch wichtiger ist…
Gruss Letraz

OK, danke sehr für den Hinweis. Ja wirklich schade was da V-ZUG macht. Gruss JJ