<?
$headers = array("X-MitsContextKey: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","Content-Type: application/json");
$devideid = getArg('deviceid');
$buildid = getArg('buildid');
$onoff = getArg('power',false,"");
$fanspeed = getArg('fanspeed',false,"");
$temperature = getArg('temperature',false,"");
$mode = getArg('mode',false,'');
$json = httpQuery("https://app.melcloud.com/Mitsubishi.Wifi.Client/Device/Get?id=$devideid&buildingID=$buildid","GET","","",$headers,false);
$device = sdk_json_decode($json);
// Metttre a jour le retour d'etat de la clim concernée
switch ($devideid) {
case "XXXXXX":
// remplacer les 999 par le code API du peripherique
setValue(999999,$device['SetTemperature']); // temperature
setValue(999999,$device['SetFanSpeed']); // vitesse ventilateur
if ($device['Power'] == 'true'){
setValue(999999,1); // true ou false
}else{
setValue(999999,0); // true ou false
}
setValue(999999,$device['RoomTemperature']); // temperature de la piece
setValue(999999,$device['OperationMode']); // mode chauffage voir mes messages
break;
case "XXXXX":
if ($device['Power'] == 'true'){
setValue(999999,1); // true ou false
}else{
setValue(999999,0); // true ou false
}
// remplacer les 999 par le code API du peripherique
setValue(999999,$device['SetTemperature']); // temperature
setValue(999999,$device['SetFanSpeed']); // vitesse ventilateur
setValue(999999,$device['RoomTemperature']); // temperature de la piece
setValue(999999,$device['OperationMode']); // mode chauffage voir mes messages
break;
case "XXXXX":
if ($device['Power'] == 'true'){
setValue(999999,1); // true ou false
}else{
setValue(999999,0); // true ou false
}
// remplacer les 999 par le code API du peripherique
setValue(999999,$device['SetTemperature']); // temperature
setValue(999999,$device['SetFanSpeed']); // vitesse ventilateur
setValue(999999,$device['RoomTemperature']); // temperature de la piece
setValue(999999,$device['OperationMode']); // mode chauffage voir mes messages
break;
case "XXXXX":
if ($device['Power'] == 'true'){
setValue(999999,1); // true ou false
}else{
setValue(999999,0); // true ou false
}
// remplacer les 999 par le code API du peripherique
setValue(999999,$device['SetTemperature']); // temperature
setValue(999999,$device['SetFanSpeed']); // vitesse ventilateur
setValue(999999,$device['RoomTemperature']); // temperature de la piece
setValue(999999,$device['OperationMode']); // mode chauffage voir mes messages
break;
}
$resultat = "";
if ($onoff != ""){
$aremplacer = array('"Power":false','"Power":true');
$json = str_replace($aremplacer, '"Power":'.$onoff, $json);
$aremplacer = '"EffectiveFlags":'.$device['EffectiveFlags'];
$json = str_replace($aremplacer, '"EffectiveFlags":1' , $json);
$aremplacer = '"HasPendingCommand":false';
$json = str_replace($aremplacer, '"HasPendingCommand":true' , $json);
$resultat = httpQuery('https://app.melcloud.com/Mitsubishi.Wifi.Client/Device/SetAta','POST',$json,'',$headers,false);
}
if ($fanspeed != ""){
$aremplacer = '"SetFanSpeed":'.$device['SetFanSpeed'];
$json = str_replace($aremplacer, '"SetFanSpeed":'.$fanspeed, $json);
$aremplacer = '"EffectiveFlags":'.$device['EffectiveFlags'];
$json = str_replace($aremplacer, '"EffectiveFlags":8' , $json);
$aremplacer = '"HasPendingCommand":false';
$json = str_replace($aremplacer, '"HasPendingCommand":true' , $json);
$resultat = httpQuery('https://app.melcloud.com/Mitsubishi.Wifi.Client/Device/SetAta','POST',$json,'',$headers,false);
}
if ($temperature != ""){
$aremplacer = '"SetTemperature":'.$device['SetTemperature'];
$json = str_replace($aremplacer, '"SetTemperature":'.$temperature, $json);
$aremplacer = '"EffectiveFlags":'.$device['EffectiveFlags'];
$json = str_replace($aremplacer, '"EffectiveFlags":4' , $json);
$aremplacer = '"HasPendingCommand":false';
$json = str_replace($aremplacer, '"HasPendingCommand":true' , $json);
$resultat = httpQuery('https://app.melcloud.com/Mitsubishi.Wifi.Client/Device/SetAta','POST',$json,'',$headers,false);
}
if ($mode != ""){
$aremplacer = '"OperationMode":'.$device['OperationMode'];
$json = str_replace($aremplacer, '"OperationMode":'.$mode, $json);
$aremplacer = '"EffectiveFlags":'.$device['EffectiveFlags'];
$json = str_replace($aremplacer, '"EffectiveFlags":6' , $json);
$aremplacer = '"HasPendingCommand":false';
$json = str_replace($aremplacer, '"HasPendingCommand":true' , $json);
$resultat = httpQuery('https://app.melcloud.com/Mitsubishi.Wifi.Client/Device/SetAta','POST',$json,'',$headers,false);
}
// Metttre a jour le retour d'etat de la clim concernée, oui si modif de power ou autres
if ($resultat != ""){
$contenu = sdk_json_decode($resultat );
// remplacer les 999 par le code API du peripherique
setValue(999999,$contenu['NextCommunication']); // prochaine synchro avec la clim
switch ($devideid) {
case "XXXXX":
if ($device['Power'] == 'true'){
setValue(999999,1); // true ou false
}else{
setValue(999999,0); // true ou false
}
// remplacer les 999 par le code API du peripherique
setValue(999999,$contenu['SetTemperature']); // temperature
setValue(999999,$contenu['SetFanSpeed']); // vitesse ventilateur
setValue(999999,$contenu['RoomTemperature']); // temperature de la piece
setValue(999999,$contenu['OperationMode']); // mode chauffage voir mes messages
break;
case "XXXXX":
if ($device['Power'] == 'true'){
setValue(999999,1); // true ou false
}else{
setValue(999999,0); // true ou false
}
// remplacer les 999 par le code API du peripherique
setValue(999999,$contenu['SetTemperature']); // temperature
setValue(999999,$contenu['SetFanSpeed']); // vitesse ventilateur
setValue(999999,$contenu['RoomTemperature']); // temperature de la piece
setValue(999999,$contenu['OperationMode']); // mode chauffage voir mes messages
break;
case "XXXXX":
if ($device['Power'] == 'true'){
setValue(999999,1); // true ou false
}else{
setValue(999999,0); // true ou false
}
// remplacer les 999 par le code API du peripherique
setValue(999999,$contenu['SetTemperature']); // temperature
setValue(999999,$contenu['SetFanSpeed']); // vitesse ventilateur
setValue(999999,$contenu['RoomTemperature']); // temperature de la piece
setValue(999999,$contenu['OperationMode']); // mode chauffage voir mes messages
break;
case "XXXXX":
if ($device['Power'] == 'true'){
setValue(999999,1); // true ou false
}else{
setValue(999999,0); // true ou false
}
// remplacer les 999 par le code API du peripherique
setValue(999999,$contenu['SetTemperature']); // temperature
setValue(999999,$contenu['SetFanSpeed']); // vitesse ventilateur
setValue(999999,$contenu['RoomTemperature']); // temperature de la piece
setValue(999999,$contenu['OperationMode']); // mode chauffage voir mes messages
break;
}
}
?>
http://IP....../script/?exec=mitsuonoff.php&deviceid=XXXXX&buildid=YYYYY&power=true
Khoen a écrit:Oui, je viens de mon configurer mon PAC dans MELCloud & eedomus et tout marche
<?php
/*
**** modifié par Merguez07 le 08 Mai 2020
**** Indice 1.4 du 17/10/20---Merguez07---correction d'un bug
**** Indice 1.5 du 03/01/21---Merguez07---prise en compte des différentes structures d'info
**** Indice 1.6 du 13/04/21---Merguez07---prise en compte de plusieurs commandes simultanées
Ajout des commandes des ventelles verticales et horizontales
*/
function sdk_getHeader(){
$contextKey = loadVariable('ContextKey');
return array("X-MitsContextKey: $contextKey", "Content-Type: application/json");
}
/**
* Get Building Id and DeviceId from deviceName
* DeviceNme could be full name or serial number recored in melcloud
*
* */
function sdk_setIds($moduleId, $deviceName, $username, $password){
$json = httpQuery("https://app.melcloud.com/Mitsubishi.Wifi.Client/User/ListDevices?", "GET", "", "", sdk_getHeader(), false);
$result = sdk_json_decode($json);
if (isset($result['Success'])) {
sdk_connect($username, $password);
$json = httpQuery("https://app.melcloud.com/Mitsubishi.Wifi.Client/User/ListDevices?", "GET", "", "", sdk_getHeader(), false);
$result = sdk_json_decode($json);
}
$devices=$result[0]['Structure']['Devices'];
$Floors=$result[0]['Structure']['Floors'];
if (!empty($Floors)) {
foreach ($Floors as $Floor){
$Tdevices=$Floor['Devices'];
foreach ($Tdevices as $device) $devices[]=$device;
}
}
$Areas=$result[0]['Structure']['Areas'];
if (!empty($Areas)) {
foreach ($Areas as $Area){
$Tdevices=$Area['Devices'];
foreach ($Tdevices as $device) $devices[]=$device;
}
}
foreach ($devices as $device){
if ($device['DeviceName'] == $deviceName || $device['SerialNumber'] == $deviceName){
saveVariable($moduleId.'-buildingId', $device['BuildingID']);
saveVariable($moduleId.'-deviceId' , $device['DeviceID']);
}
}
}
/**
* Log and set ContextId
*
* */
function sdk_connect( $username, $password ){
$headers = sdk_getHeader();
$jsonTest = '{Email: "' . $username . '", Password: "' . $password . '", Language: 7, AppVersion: "1.15.3.0", Persist: true}';
$login = httpQuery('https://app.melcloud.com/Mitsubishi.Wifi.Client/Login/ClientLogin', 'POST', $jsonTest, '', $headers, false);
$loginResult= sdk_json_decode($login);
if ($loginResult['ErrorId'] == null) {
$contextKey = $loginResult['LoginData']['ContextKey'];
saveVariable('ContextKey', $contextKey);
} else
echo "Erreur de login " . "<br>";//TODO : handle exceptions*/
}
/**
* Get informations from MelCloud
* rebuild context if needed
* rebuild buildingId and DeviceId if needed
*
* */
function sdk_get($moduleId, $deviceName, $username, $password){
$contextKey = loadVariable('ContextKey');
if ($contextKey == '') sdk_connect($username, $password);
//get building ids
$buildingId = loadVariable($moduleId.'-buildingId');
$deviceId = loadVariable($moduleId.'-deviceId');
if ($buildingId == ''){
sdk_setIds($moduleId, $deviceName, $username, $password);
$buildingId = loadVariable($moduleId.'-buildingId');
$deviceId = loadVariable($moduleId.'-deviceId');
}
$json = httpQuery("https://app.melcloud.com/Mitsubishi.Wifi.Client/Device/Get?id=$deviceId&buildingID=$buildingId", "GET", "", "", sdk_getHeader(), false);
$result = sdk_json_decode($json);
//if (count($device) == 2) {//if no session only 2 datas are raised : { Success: false, ErrorMessage: ""}
if (isset($result['Success']) && $result['Success'] == false) {
sdk_connect($username, $password);
$json = httpQuery("https://app.melcloud.com/Mitsubishi.Wifi.Client/Device/Get?id=$deviceId&buildingID=$buildingId", "GET", "", "", sdk_getHeader(), false);
}
return $json;
}
$deviceName = getArg('deviceName');
$userPass = getArg('userpass');
$tabUserPass = explode(":", $userPass);
$username = $tabUserPass[0];
$password = $tabUserPass[1];
//get parameters
$onoff = getArg('power' , false, "");
$fanspeed = getArg('fanspeed' , false, "");
$temperature = getArg('temperature', false, "");
$mode = getArg('mode' , false, "");
$vaneh = getArg('vaneh' , false, "");
$vanev = getArg('vanev' , false, "");
/*
* 1 => Heating
* 8 => Auto
* 7 => Fan
* 2 => Drying
* 3 => Cooling
*/
$moduleId = getArg('eedomus_controller_module_id');
/**
* Session managing
*
* off => nothing recorded
* contextOnly => buildingid and contextid not recorded
* idsOnly => contextKey not recorded
* azzerty => change contextKey to defaut value to test timeouts
*
*/
$resetSession = getArg('session', false, '');
if ($resetSession == "off") {
saveVariable('ContextKey', '');
saveVariable($moduleId.'-buildingId', '');
saveVariable($moduleId.'-deviceId', '');
}else if ($resetSession == "contextOnly") {
saveVariable($moduleId.'-buildingId', '');
saveVariable($moduleId.'-deviceId', '');
} else if ($resetSession == "idsOnly") {
saveVariable('ContextKey', '');
sdk_connect($username, $password);
} else if ($resetSession == "azerty") {
saveVariable('ContextKey', 'azerty');
}
$json = sdk_get($moduleId, $deviceName, $username, $password);
$device = sdk_json_decode($json);
$EffectiveFlags=0;
if ($onoff != "") $EffectiveFlags = 1;
if ($fanspeed != "") $EffectiveFlags = 8;
if ($temperature != "") $EffectiveFlags = 4;
if ($mode != "") $EffectiveFlags = 6;
if ($vaneh != "") $EffectiveFlags = 256;
if ($vanev != "") $EffectiveFlags = 16;
if ($EffectiveFlags!=0) {
$LastCommunication = $device['LastCommunication'];
$save_json = LoadVariable($moduleId.'Lastjson');
$save_device = sdk_json_decode($save_json);
$save_LastCommunication = $save_device['LastCommunication'];
$new_EffectiveFlags = $EffectiveFlags;
if ($LastCommunication == $save_LastCommunication) { // on a un ordre supplémentaire à faire passer en plus du premier
$save_EffectiveFlags = $save_device['EffectiveFlags'];
if ($save_EffectiveFlags != $new_EffectiveFlags) {
$new_EffectiveFlags += $save_EffectiveFlags;
$json = $save_json;
}
}
//$device = sdk_json_decode($json);
$aremplacer = '"EffectiveFlags":' . $device['EffectiveFlags'];
$json = str_replace($aremplacer, '"EffectiveFlags":'.$new_EffectiveFlags, $json);
saveVariable($moduleId.'Lastjson', $json);
$json = str_replace('"HasPendingCommand":false', '"HasPendingCommand":true', $json);
if ($EffectiveFlags == 1) {
$aremplacer = array('"Power":false', '"Power":true');
$json = str_replace($aremplacer, '"Power":' . $onoff, $json);
}
if ($EffectiveFlags == 256) {
$aremplacer = '"VaneHorizontal":' . $device['VaneHorizontal'];
$json = str_replace($aremplacer, '"VaneHorizontal":' . $vaneh, $json);
}
if ($EffectiveFlags == 16) {
$aremplacer = '"VaneVertical":' . $device['VaneVertical'];
$json = str_replace($aremplacer, '"VaneVertical":' . $vanev, $json);
}
if ($EffectiveFlags == 4) {
$aremplacer = '"SetTemperature":' . $device['SetTemperature'];
$json = str_replace($aremplacer, '"SetTemperature":' . $temperature, $json);
}
if ($EffectiveFlags == 6) {
$aremplacer = '"OperationMode":' . $device['OperationMode'];
$json = str_replace($aremplacer, '"OperationMode":' . $mode, $json);
}
if ($EffectiveFlags == 8) {
$aremplacer = '"SetFanSpeed":' . $device['SetFanSpeed'];
$json = str_replace($aremplacer, '"SetFanSpeed":' . $fanspeed, $json);
}
$json = httpQuery('https://app.melcloud.com/Mitsubishi.Wifi.Client/Device/SetAta', 'POST', $json, '', sdk_getHeader(), false);
}
echo jsonToXML($json);
BRUNO.LUCAT a écrit:Merci pour vos lumières....
<?php
/*
**** modifié par Merguez07 le 08 Mai 2020
**** Indice 1.4 du 17/10/20---Merguez07---correction d'un bug
**** Indice 1.5 du 03/01/21---Merguez07---prise en compte des différentes structures d'info
**** Indice 1.6 du 15/04/21---Merguez07---prise en compte de plusieurs commandes simultanées
Ajout des commandes des ventelles verticales et horizontales
Ajout d'un cache de 1mn
**** Indice 1.7 du 25/05/21---Merguez07---modification de la recherche du deviceID et BuildingID
*/
function sdk_getHeader(){
$contextKey = loadVariable('ContextKey');
return array("X-MitsContextKey: $contextKey", "Content-Type: application/json");
}
/**
* Get Building Id and DeviceId from deviceName
* $tab_Device contains the values
**/
function sdk_array_recursive($tab = array(),$search, $niveau = 0,$path=array()) {
global $tab_Device;
foreach($tab as $key => $value) {
$path[$niveau]=$key;
if((gettype( $value ) === "array") ) { //|| (count($value)!=0)
sdk_array_recursive($value, $search,$niveau + 1,$path );
continue;
}
if ($value===$search) {
$tab_Device = $tab;
break;
}
}
}
function sdk_setIds($moduleId, $deviceName, $username, $password){
global $tab_Device;
$json = httpQuery("https://app.melcloud.com/Mitsubishi.Wifi.Client/User/ListDevices?", "GET", "", "", sdk_getHeader(), false);
$result = sdk_json_decode($json);
if (isset($result['Success'])) {
sdk_connect($username, $password);
$json = httpQuery("https://app.melcloud.com/Mitsubishi.Wifi.Client/User/ListDevices?", "GET", "", "", sdk_getHeader(), false);
$result = sdk_json_decode($json);
}
sdk_array_recursive($result,$deviceName );
/*
echo "DeviceName = ".$tab_Device["DeviceName"];
echo "DeviceID = ".$tab_Device["DeviceID"];
echo "BuildingID = ".$tab_Device["BuildingID"];*/
saveVariable($moduleId.'-buildingId', $tab_Device["BuildingID"]);
saveVariable($moduleId.'-deviceId' , $tab_Device["DeviceID"]);
}
function sdk_connect( $username, $password ){
$headers = sdk_getHeader();
$jsonTest = '{Email: "' . $username . '", Password: "' . $password . '", Language: 7, AppVersion: "1.15.3.0", Persist: true}';
$login = httpQuery('https://app.melcloud.com/Mitsubishi.Wifi.Client/Login/ClientLogin', 'POST', $jsonTest, '', $headers, false);
$loginResult= sdk_json_decode($login);
if ($loginResult['ErrorId'] == null) {
$contextKey = $loginResult['LoginData']['ContextKey'];
saveVariable('ContextKey', $contextKey);
} else echo "Erreur de login " . "<br>";
}
function sdk_get($moduleId, $deviceName, $username, $password){
$contextKey = loadVariable('ContextKey');
if ($contextKey == '') sdk_connect($username, $password);
//get building ids
$buildingId = loadVariable($moduleId.'-buildingId');
$deviceId = loadVariable($moduleId.'-deviceId');
if ($buildingId == ''){
sdk_setIds($moduleId, $deviceName, $username, $password);
$buildingId = loadVariable($moduleId.'-buildingId');
$deviceId = loadVariable($moduleId.'-deviceId');
}
$json = httpQuery("https://app.melcloud.com/Mitsubishi.Wifi.Client/Device/Get?id=$deviceId&buildingID=$buildingId", "GET", "", "", sdk_getHeader(), false);
$result = sdk_json_decode($json);
//if (count($device) == 2) {//if no session only 2 datas are raised : { Success: false, ErrorMessage: ""}
if (isset($result['Success']) && $result['Success'] == false) {
sdk_connect($username, $password);
$json = httpQuery("https://app.melcloud.com/Mitsubishi.Wifi.Client/Device/Get?id=$deviceId&buildingID=$buildingId", "GET", "", "", sdk_getHeader(), false);
}
return $json;
}
$deviceName = getArg('deviceName');
$userPass = getArg('userpass');
$tabUserPass = explode(":", $userPass);
$username = $tabUserPass[0];
$password = $tabUserPass[1];
//get parameters
$onoff = getArg('power' , false, "");
$fanspeed = getArg('fanspeed' , false, "");
$temperature = getArg('temperature', false, "");
$mode = getArg('mode' , false, "");
$vaneh = getArg('vaneh' , false, "");
$vanev = getArg('vanev' , false, "");
$moduleId = getArg('eedomus_controller_module_id');
$EffectiveFlags=0;
if ($onoff != "") $EffectiveFlags = 1;
if ($fanspeed != "") $EffectiveFlags = 8;
if ($temperature != "") $EffectiveFlags = 4;
if ($mode != "") $EffectiveFlags = 6;
if ($vaneh != "") $EffectiveFlags = 256;
if ($vanev != "") $EffectiveFlags = 16;
/**
* Session managing
*
* off => nothing recorded
* contextOnly => buildingid and contextid not recorded
* idsOnly => contextKey not recorded
* azzerty => change contextKey to defaut value to test timeouts
*
*/
$resetSession = getArg('session', false, '');
if ($resetSession == "off") {
saveVariable('ContextKey', '');
saveVariable($moduleId.'-buildingId', '');
saveVariable($moduleId.'-deviceId', '');
}else if ($resetSession == "contextOnly") {
saveVariable($moduleId.'-buildingId', '');
saveVariable($moduleId.'-deviceId', '');
} else if ($resetSession == "idsOnly") {
saveVariable('ContextKey', '');
sdk_connect($username, $password);
} else if ($resetSession == "azerty") {
saveVariable('ContextKey', 'azerty');
}
//Gestion du cache
$CACHE_DURATION = 1; // minutes
$last_xml_success = loadVariable(str_replace(" ","",$deviceName).'last_xml_success');
if (((time() - $last_xml_success) / 60 < $CACHE_DURATION)&&($EffectiveFlags==0)){
sdk_header('text/xml');
$cached_xml = loadVariable(str_replace(" ","",$deviceName).'cached_xml');
echo $cached_xml;
die();
}
$json = sdk_get($moduleId, $deviceName, $username, $password);
$device = sdk_json_decode($json);
if ($EffectiveFlags!=0) {
$LastCommunication = $device['LastCommunication'];
$save_json = LoadVariable($moduleId.'Lastjson');
$save_device = sdk_json_decode($save_json);
$save_LastCommunication = $save_device['LastCommunication'];
$new_EffectiveFlags = $EffectiveFlags;
if ($LastCommunication == $save_LastCommunication) { // on a un ordre supplémentaire à faire passer en plus du premier
$save_EffectiveFlags = $save_device['EffectiveFlags'];
if ($save_EffectiveFlags != $new_EffectiveFlags) {
$new_EffectiveFlags += $save_EffectiveFlags;
$json = $save_json;
}
}
$aremplacer = '"EffectiveFlags":' . $device['EffectiveFlags'];
$json = str_replace($aremplacer, '"EffectiveFlags":'.$new_EffectiveFlags, $json);
saveVariable($moduleId.'Lastjson', $json);
$json = str_replace('"HasPendingCommand":false', '"HasPendingCommand":true', $json);
if ($EffectiveFlags == 1) {
$aremplacer = array('"Power":false', '"Power":true');
$json = str_replace($aremplacer, '"Power":' . $onoff, $json);
}
if ($EffectiveFlags == 256) {
$aremplacer = '"VaneHorizontal":' . $device['VaneHorizontal'];
$json = str_replace($aremplacer, '"VaneHorizontal":' . $vaneh, $json);
}
if ($EffectiveFlags == 16) {
$aremplacer = '"VaneVertical":' . $device['VaneVertical'];
$json = str_replace($aremplacer, '"VaneVertical":' . $vanev, $json);
}
if ($EffectiveFlags == 4) {
$aremplacer = '"SetTemperature":' . $device['SetTemperature'];
$json = str_replace($aremplacer, '"SetTemperature":' . $temperature, $json);
}
if ($EffectiveFlags == 6) {
$aremplacer = '"OperationMode":' . $device['OperationMode'];
$json = str_replace($aremplacer, '"OperationMode":' . $mode, $json);
}
if ($EffectiveFlags == 8) {
$aremplacer = '"SetFanSpeed":' . $device['SetFanSpeed'];
$json = str_replace($aremplacer, '"SetFanSpeed":' . $fanspeed, $json);
}
$json = httpQuery('https://app.melcloud.com/Mitsubishi.Wifi.Client/Device/SetAta', 'POST', $json, '', sdk_getHeader(), false);
}
$aremplacer = '"EffectiveFlags"';
$json = str_replace($aremplacer, '"cache":0,"EffectiveFlags"', $json);
$json = htmlentities($json, ENT_QUOTES, "UTF-8");
$cached_xml = jsonToXML($json);
echo $cached_xml;
$cached_xml = str_replace('<cache>0</cache>', '<cache>1</cache>', $cached_xml);
saveVariable(str_replace(" ","",$deviceName).'cached_xml', $cached_xml);
saveVariable(str_replace(" ","",$deviceName).'last_xml_success', time());
merguez07 a écrit:Khoen a écrit:Oui, je viens de mon configurer mon PAC dans MELCloud & eedomus et tout marche
Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 35 invité(s)