Mitsubishi Klimaanlage MELCLOUD

Hey Lundig… if this works you are great! I will try today or through weekend! But most important would be to switch on and off some of the devices. Does this work too and do you have samples!? Best

I have not come so far yet.
But i agree that we have to figure out how to turn on and off devices, change temperature, fan speed and stuff like that.

Maybe someone else with better PHP knowledge can manage something?

/Lundig

schaue euch mal die Produkt von dieser firma an…

hat jemand service manual von den Asien Serien MSY-JP09VF und PLY-Serien ??
Die Geräte funktionier nur wenn auf dem Controller ein CN105 oder CN92 Stecker vorhanen ist.

die WMP products lassen sich über API/ASCII und TCP steueren.

Danke.

A update regarding retrieving variables from MELcloud.
I am sure that this can be done smoother by someone with more PHP -skills :smiley:

/Lundig


<? 

//Parameters
$username = 'email@email.com';
$password = 'password123';
$loginurl = 'https://app.melcloud.com/Mitsubishi.Wifi.Client/Login/ClientLogin';
$url = 'https://app.melcloud.com/Mitsubishi.Wifi.Client/User/ListDevices/';
$appversion = "1.7.1.0";

$ch = curl_init();

//Curl options
curl_setopt($ch, CURLOPT_URL, $loginurl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'Email='.$username.'&password='.$password.'&AppVersion='.$appversion);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);

//execute the the login
$login = curl_exec($ch);
$data = json_decode($login);
$token = $data->LoginData->ContextKey;
//print_r($token);

//execute the request (get info)
$ch = curl_init();

//Curl options
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_BINARYTRANSFER,true);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
curl_setopt($ch, CURLOPT_VERBOSE, true);

//Add the token in the request
$headers = array(
    'X-MitsContextKey: ' . $token,
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

//Execute 
$response = curl_exec($ch);
curl_close($ch);

//Print the result in output
$response_json = json_decode($response, true);
print_r($response_json);



//Create variables from recieved output

//Power status
$power = $response_json[0]['Structure']['Devices'][0]['Device']['Power'];
if (preg_match('/\b1\b/',$power)){
    SetValueBoolean(11592, true);
	}
else{     
	SetValueBoolean(11592, false);
} 

//Room temperature
$romtemperatur = $response_json[0]['Structure']['Devices'][0]['Device']['RoomTemperature'];
setValueFloat (20842, "$romtemperatur");

//Set temperature
$settemperatur = $response_json[0]['Structure']['Devices'][0]['Device']['SetTemperature'];
setValueFloat (18744, "$settemperatur");

//Fan speed
$fanspeed = $response_json[0]['Structure']['Devices'][0]['Device']['FanSpeed'];
setValueInteger (57594, "$fanspeed");

//Automatic fanspeed
$autofan = $response_json[0]['Structure']['Devices'][0]['Device']['AutomaticFanSpeed'];
if (preg_match('/\b1\b/',$autofan)){
    SetValueBoolean(25045, true);
	}
else{     
	SetValueBoolean(25045, false);
} 

//WiFi status
$Wifistatus = $response_json[0]['Structure']['Devices'][0]['Device']['WifiAdapterStatus'];
setValueString (39622, "$Wifistatus");

?>

A update regarding retrieving variables from MELcloud.
I am sure that this can be done smoother by someone with more PHP -skills :smiley:

/Lundig


<? 

//Parameters
$username = 'email@email.com';
$password = 'password123';
$loginurl = 'https://app.melcloud.com/Mitsubishi.Wifi.Client/Login/ClientLogin';
$url = 'https://app.melcloud.com/Mitsubishi.Wifi.Client/User/ListDevices/';
$appversion = "1.7.1.0";

$ch = curl_init();

//Curl options
curl_setopt($ch, CURLOPT_URL, $loginurl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'Email='.$username.'&password='.$password.'&AppVersion='.$appversion);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);

//execute the the login
$login = curl_exec($ch);
$data = json_decode($login);
$token = $data->LoginData->ContextKey;
//print_r($token);

//execute the request (get info)
$ch = curl_init();

//Curl options
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_BINARYTRANSFER,true);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
curl_setopt($ch, CURLOPT_VERBOSE, true);

//Add the token in the request
$headers = array(
    'X-MitsContextKey: ' . $token,
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

//Execute 
$response = curl_exec($ch);
curl_close($ch);

//Print the result in output
$response_json = json_decode($response, true);
print_r($response_json);



//Create variables from recieved output

//Power status
$power = $response_json[0]['Structure']['Devices'][0]['Device']['Power'];
if (preg_match('/\b1\b/',$power)){
    SetValueBoolean(11592, true);
	}
else{     
	SetValueBoolean(11592, false);
} 

//Room temperature
$romtemperatur = $response_json[0]['Structure']['Devices'][0]['Device']['RoomTemperature'];
setValueFloat (20842, "$romtemperatur");

//Set temperature
$settemperatur = $response_json[0]['Structure']['Devices'][0]['Device']['SetTemperature'];
setValueFloat (18744, "$settemperatur");

//Fan speed
$fanspeed = $response_json[0]['Structure']['Devices'][0]['Device']['FanSpeed'];
setValueInteger (57594, "$fanspeed");

//Automatic fanspeed
$autofan = $response_json[0]['Structure']['Devices'][0]['Device']['AutomaticFanSpeed'];
if (preg_match('/\b1\b/',$autofan)){
    SetValueBoolean(25045, true);
	}
else{     
	SetValueBoolean(25045, false);
} 

//WiFi status
$Wifistatus = $response_json[0]['Structure']['Devices'][0]['Device']['WifiAdapterStatus'];
setValueString (39622, "$Wifistatus");

?>

Sorry for double post.

//Lundig

Hello Ludig,
sorry for my nice english :wink:
i have install the script and they funktion beautiful, i have one klima with two indoor units and they can cooling and heating.
i have updated the script und the statusfunktion (heating/cooling) implementation
now you can see the OperationMode.

<? 
//Parameters
$username = '++++++++++++++';
$password = '***************';
$loginurl = 'https://app.melcloud.com/Mitsubishi.Wifi.Client/Login/ClientLogin';
$url = 'https://app.melcloud.com/Mitsubishi.Wifi.Client/User/ListDevices/';
$appversion = "1.7.1.0";


$ch = curl_init();

//Curl options
curl_setopt($ch, CURLOPT_URL, $loginurl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'Email='.$username.'&password='.$password.'&AppVersion='.$appversion);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);

//execute the the login
$login = curl_exec($ch);
$data = json_decode($login);
$token = $data->LoginData->ContextKey;
//print_r($token);

//execute the request (get info)
$ch = curl_init();

//Curl options
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_BINARYTRANSFER,true);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
curl_setopt($ch, CURLOPT_VERBOSE, true);

//Add the token in the request
$headers = array(
    'X-MitsContextKey: ' . $token,
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

//Execute 
$response = curl_exec($ch);
curl_close($ch);

//Print the result in output
$response_json = json_decode($response, true);
print_r($response_json);



//Create variables from recieved output

// 1.OG

//OperationMode
$OperationMode = $response_json[0]['Structure']['Floors'][0]['Devices'][0]['Device']['OperationMode'];
setValueInteger (22705 /*[Geräte\Klimaanlage\Klima1OG\Anlagenstatus]*/, "$OperationMode");


//Power status
$power = $response_json[0]['Structure']['Floors'][0]['Devices'][0]['Device']['Power'];
if (preg_match('/\b1\b/',$power)){
    SetValueBoolean(30423 /*[Geräte\Klimaanlage\Klima1OG\Power]*/, true);
	}
else{     
	SetValueBoolean(30423 /*[Geräte\Klimaanlage\Klima1OG\Power]*/, false);
} 

//Room temperature
$romtemperatur = $response_json[0]['Structure']['Floors'][0]['Devices'][0]['Device']['RoomTemperature'];
setValueFloat (10149 /*[Geräte\Klimaanlage\Klima1OG\Raumtemperatur]*/, "$romtemperatur");

//Set temperature
$settemperatur = $response_json[0]['Structure']['Floors'][0]['Devices'][0]['Device']['SetTemperature'];
setValueFloat (30426 /*[Geräte\Klimaanlage\Klima1OG\Settemperatur]*/, "$settemperatur");

//Fan speed
$fanspeed = $response_json[0]['Structure']['Floors'][0]['Devices'][0]['Device']['FanSpeed'];
setValueInteger (17082 /*[Geräte\Klimaanlage\Klima1OG\FanSpeed]*/, "$fanspeed");

//Automatic fanspeed
$autofan = $response_json[0]['Structure']['Floors'][0]['Devices'][0]['Device']['AutomaticFanSpeed'];
if (preg_match('/\b1\b/',$autofan)){
    SetValueBoolean(10148 /*[Geräte\Klimaanlage\Klima1OG\autofan]*/, true);
	}
else{     
	SetValueBoolean(10148 /*[Geräte\Klimaanlage\Klima1OG\autofan]*/, false);
} 

//WiFi status
$Wifistatus = $response_json[0]['Structure']['Floors'][0]['Devices'][0]['Device']['WifiAdapterStatus'];
setValueString (17084 /*[Geräte\Klimaanlage\Klima1OG\WIFIstatus]*/, "$Wifistatus");

// Dachgeschoss

//OperationMode
$OperationMode = $response_json[0]['Structure']['Floors'][0]['Devices'][1]['Device']['OperationMode'];
setValueInteger (37111 /*[Geräte\Klimaanlage\Klima DG\Anlagenstatus]*/, "$OperationMode");

//Power status
$power = $response_json[0]['Structure']['Floors'][0]['Devices'][1]['Device']['Power'];
if (preg_match('/\b1\b/',$power)){
    SetValueBoolean(27387 /*[Geräte\Klimaanlage\Klima DG\Power]*/, true);
	}
else{     
	SetValueBoolean(27387 /*[Geräte\Klimaanlage\Klima DG\Power]*/, false);
	
} 

//Room temperature
$romtemperatur = $response_json[0]['Structure']['Floors'][0]['Devices'][1]['Device']['RoomTemperature'];
setValueFloat (22702 /*[Geräte\Klimaanlage\Klima DG\Raumtemperatur]*/, "$romtemperatur");

//Set temperature
$settemperatur = $response_json[0]['Structure']['Floors'][0]['Devices'][1]['Device']['SetTemperature'];
setValueFloat (42529 /*[Geräte\Klimaanlage\Klima DG\Settemperatur]*/, "$settemperatur");

//Fan speed
$fanspeed = $response_json[0]['Structure']['Floors'][0]['Devices'][1]['Device']['FanSpeed'];
setValueInteger (31246 /*[Geräte\Klimaanlage\Klima DG\FanSpeed]*/, "$fanspeed");


//Automatic fanspeed
$autofan = $response_json[0]['Structure']['Floors'][0]['Devices'][1]['Device']['AutomaticFanSpeed'];
if (preg_match('/\b1\b/',$autofan)){
    SetValueBoolean(16361 /*[Geräte\Klimaanlage\Klima DG\autofan]*/, true);
	}
else{     
	SetValueBoolean(16361 /*[Geräte\Klimaanlage\Klima DG\autofan]*/, false);
} 

//WiFi status
$Wifistatus = $response_json[0]['Structure']['Floors'][0]['Devices'][1]['Device']['WifiAdapterStatus'];
setValueString (39891 /*[Geräte\Klimaanlage\Klima DG\WIFIstatus]*/, "$Wifistatus");

?>

and this ist the Variable for the OperationMode

I hope another user can tell us we will be able to change the installations of the air conditioning with the IPS

lg
Christian

da es jetzt ja cooler weise mit ip-symcon funktioniert dachte ich kauf au einen Melcloud Adapter für meine Ecodan Hydro Innenmodul ERSC-VM2B. Das hab ich auch in dem Menü in der Melcloud so hinzugefügt. Aber meine Heizung / Wärmepumpe wird fälschlicherweise als Klimaanlage erkannt und nicht als Heizung.

Was mache ich falsch :frowning:

Hatte jetzt schonmal jemand geschaltet?

Hallo!

wie schauts aus, hat es schon jemand geschafft über IPS die Einstellungen der Geräte zu ändern?

Bevor sich jemand gleichzeitig die Mühe macht - bin auf Wunsch einer bestimmten Person aktuell dabei ein Modul für MELCloud zu erstellen.
Geräte auslesen, jeweils die Daten auslesen, steuern (Temperatur, Betriebsmode, …), usw. :slight_smile:

Viele Grüße,
Chris

1 „Gefällt mir“

Hey Chris, da freue ich mich aber schweinisch drauf!

Gesendet von iPhone mit Tapatalk

wenn mir jetzt noch jemand helfen könnte dass meine Wärmepumpe in der Melcloud nicht als Klimaanlage erkannt wird wärs super?

Gesendet von meinem SM-G965F mit Tapatalk

Dabei kann ich leider nicht helfen :frowning:

Ich habe hier nur einen Account mit einer Klimaanlage im Zugriff und ich weiß nicht welche Daten eine Wärmepumpe so anzeigt und zum Steuern anbietet - deshalb kann ich auch nicht sagen, was passiert, wenn man mein Modul dann zum Auslesen/Steuern einer Wärmepumpe verwendet. Ich vermute, dass dort komplett andere Daten vorhanden sind.

Viele Grüße,
Chris

Hast du eine Ahnung zum Zeitplan wann du etwa zu dem Modul kommst? Ich weiss ist immer eine doofe Frage aber ist mehr gedacht wenn du Betatesterchen suchst bin ich gerne da:-)

Gesendet von iPhone mit Tapatalk

Bin schon dran :slight_smile: Die Funktionen habe ich fast alle fertig und grad steck ich alles in ein Modul.

Da ich das mit den mehreren möglichen Geräten in MELCloud aber richtig machen will, muss ich mit einer eigenen Konfigurator-Instanz arbeiten - und das ist alles neu für mich und deshalb etwas „fummelig“.

Wäre aber sowieso bald auf dich zugekommen, da ein 2. Cloud-Account mir weiterhelfen würde den ein oder anderen Wert zu verstehen.

Erstmal mache ich aber die Basis mit den verschiedenen Modul-Instanzen fertig und dann sehen wir weiter :slight_smile:

Viele Grüße,
Chris

Hi das ließt sich ech super wenn du noch ein Betatester suchst kannst du dich auch bei mir gerne melden :wink:

Gut zu wissen - besten Dank schon mal :slight_smile:
Welche Geräte hast du bei dir? Auch Klimaanlagen? 1? Mehr?

Brauche aber noch ein paar Tage - der sch**** Konfigurator kostet mich ordentlich Zeit und besonders Nerven :rolleyes: :smiley: Das schlimmste hab ich aber wohl hinter mir (hoffentlich) :smiley:

Viele Grüße,
Chris

Hätte klimatechnisch 2 Klimageräte anzubieten: MSZ-LN25VGR/W und ein MSZ-LN35VGR/W. Wenn irgendwelche Fragen sind hab auch noch einen kurzen Dienstwegansprechpartner bei Mitsubishi

Da die API eigentlich nicht öffentlich ist, bin ich mir nicht so sicher, ob die da sonderlich gesprächig und begeistert wären :smiley:
Da sollte man den Hersteller dann vlt. eher außen vor lassen?! :slight_smile:

Viele Grüße,
Chris