debug
This commit is contained in:
parent
d13529251b
commit
d0489c7353
@ -230,7 +230,7 @@ function removeEvent(device $deviceObject, string $property , $value, int $metho
|
||||
}
|
||||
}
|
||||
|
||||
function searchEvent(device $deviceObject, string $property, $function, $value)
|
||||
function searchEvent(device $deviceObject, string $property, $value, $function=null)
|
||||
{
|
||||
global $events;
|
||||
logger(DEBUG, sprintf(_("searching event for device %s, property %s and value %s"), $deviceObject->friendlyName, $property, bool2string($value)), __FILE__ . ":" . __LINE__);
|
||||
|
@ -25,8 +25,8 @@ class notificationFreemobile
|
||||
$ch = curl_init();
|
||||
// set url
|
||||
curl_setopt($ch, CURLOPT_URL, $this->url . $this->dest[$destinataire] . "&msg=" . urlencode(trim($message)));
|
||||
|
||||
//return the transfer as a string
|
||||
|
||||
// return the transfer as a string
|
||||
//curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
// $result contains the output string
|
||||
if ($this->curlErr <= 5)
|
||||
@ -42,7 +42,7 @@ class notificationFreemobile
|
||||
$error = true;
|
||||
}else
|
||||
{
|
||||
logger(DEBUG, sprintf(_("Curl return: %s when sending notification"), $result), false, __FILE__ . ":" . __LINE__);
|
||||
logger(DEBUG, sprintf(_("Curl return: %s when sending notification"), curl_error($ch)), false, __FILE__ . ":" . __LINE__);
|
||||
$this->curlErr = 0;
|
||||
}
|
||||
}else
|
||||
@ -53,12 +53,9 @@ class notificationFreemobile
|
||||
}
|
||||
$error = true;
|
||||
}
|
||||
|
||||
|
||||
//TODO managing curl errors
|
||||
// close curl resource to free up system resources
|
||||
curl_close($ch);
|
||||
|
||||
}
|
||||
return $error;
|
||||
}
|
||||
|
@ -44,7 +44,6 @@ class rdc_sdb_eclairage extends hook
|
||||
{
|
||||
if($deviceTarget->properties["state_l1"]["method"] == IDLE)
|
||||
{
|
||||
|
||||
logger(DEBUG, _("lighting with method auto"), __FILE__ . ":" . __LINE__);
|
||||
//$deviceTarget->properties["state_l1"]["method"] = AUTO;
|
||||
$this->send("ON", AUTO);
|
||||
|
Loading…
Reference in New Issue
Block a user