

benj70b a écrit:je pense qu'il y a moyen sur le portail en javascript:
Il faut faire un POST vers : /radio_config_save.php?channel_controller_module_id=[ID DU MODULE]
avec les bonnes données :
ex des données pour avoir le niveaux de batterie ( COMMAND_CLASS_BATTERY, BATTERY_GET)
function_id: 13
command_class_id: 80
command_name_id: 2
par contre le retour est asynchrone, il faut donc scruter pour savoir le retour.
<?php
$login = 'Nom utilisateur eedomus';
$password = 'mot de passe eedomus';
$of = md5($password);
$postfields = '{"of":"'.$of.'","user_login":"'.$login.'","user_pass":"'.$password.'","save":"on","connexion":""}';
  $return = httpQuery('https://https://secure.eedomus.com/log_post.php','POST',$postfields,NULL,array("Content-Type: application/json","Accept: application/json","X-Gizwits-Application-Id: ".$appid));
  $obj = sdk_json_decode($return);
print_r($obj); // on devrait avoir un success : true si la connexion est OK
?><?php
$login_page = 'https://secure.eedomus.com/log_post.php';
$data_page =  'https://secure.eedomus.com/radio_config_save.php';
$email_login = '';
$pwd_login = '';
$of = md5($pwd_login);
$periph_id = ''; // code du périphérique
$fonction_id = '13';
$command_class_id = ''; // 85 : command_class_association / 20 : command_class_basic / 70 : command_class_configuration / 32 : command_class_meter / 8E : COMMAND_CLASS_MULTI_CHANNEL_ASSOCIATION / 00 : COMMAND_CLASS_NO_OPERATION / 1 : Optimize node / 73 : COMMAND_CLASS_POWERLEVEL / 75 : COMMAND_CLASS_PROTECTION / 31 : COMMAND_CLASS_SENSOR_MULTILEVEL / -3 : ZW_IS_FAILED_NODE / -1 : Remove failed node / -2 : Replace failed node
$command_name_id = '';
$param_id = '';
$taille = '';
$valeur = '';
      $headers = array(
         "Accept: */*",
         "Connection: Keep-Alive",
      );
      $cookie_file = 'connect'.$frs.'.txt';
    $ch = curl_init(); 
      curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
      curl_setopt($ch, CURLOPT_HEADER, FALSE);
      curl_setopt($ch, CURLOPT_NOBODY, FALSE);
      curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
      curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
      curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
      curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0");
$fields = array(
   'of' => $of,
   'user_login' => $email_login,
   'user_pass' => $pwd_login,
   'save' => 'on',
   'connexion' => ''
);
      curl_setopt($ch, CURLOPT_URL, $login_page);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
      curl_setopt($ch, CURLOPT_POST, TRUE);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
      $response2 = curl_exec($ch);
$fields = array(
   'function_id' => $fonction_id,
   'command_class_id' => $command_class_id,
   'command_name_id' => $command_name_id,
   'b1' => $param_id,
   'b2' => $taille,
   'b3' => $valeur,
   'b4' => '-1',
   'b5' => '-1',
   'b6' => '-1',
   'data_comment' => ''
);
      curl_setopt($ch, CURLOPT_URL, $data_page.'?channel_controller_module_id='.$periph_id);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
      curl_setopt($ch, CURLOPT_POST, TRUE);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
      $response2 = curl_exec($ch);
echo $response2;
?> mais comme ça fait avancer un souhait : MERCI d'avance !
 mais comme ça fait avancer un souhait : MERCI d'avance !  

## ERROR: Querying [https://secure.eedomus.com/log_post.php] Error 0:
 Je l'ai acquis avant la fin de l'hiver dernier. Le support ne pas jamais fait de retour. Je me suis dit que c'était peut être un problème de firmware alors j'ai cherché la solution cet été pour le mettre à jour, ce que j'ai finalement réussi à faire mais ça ne solutionne pas le problème.
 Je l'ai acquis avant la fin de l'hiver dernier. Le support ne pas jamais fait de retour. Je me suis dit que c'était peut être un problème de firmware alors j'ai cherché la solution cet été pour le mettre à jour, ce que j'ai finalement réussi à faire mais ça ne solutionne pas le problème.Retour vers Périphériques Z-Wave
Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 40 invité(s)