debugging
This commit is contained in:
@@ -3,14 +3,14 @@
|
||||
class rdc_chambre_eclairage extends hook
|
||||
{
|
||||
public $hookName = "rdc_chambre_eclairage";
|
||||
public $active = false; //enable/disable hook (true => enabled)
|
||||
public $active = true; //enable/disable hook (true => enabled)
|
||||
public $delay = 5; // amount of time in $timeunit
|
||||
public $timeUnit = "minute"; // unit of time for delay, second, minute, hour, day, week, month, year
|
||||
public $luminance_min = 60;
|
||||
public $luminance_max = 3000;
|
||||
protected $devicelist = array(
|
||||
"RDC_CHAMBRE_AMBIANCE" => array("state", false),
|
||||
"RDC_CHAMBRE_ECLAIRAGE" => array("state_l1", false),
|
||||
"RDC_CHAMBRE_AMBIANCE" => array("state", false), // "ON"/"OFF"
|
||||
"RDC_CHAMBRE_ECLAIRAGE" => array("state_l1", false), // "ON"/"OFF"
|
||||
"RDC_CHAMBRE_MVMT" => array("occupancy", false),
|
||||
"RDC_CHAMBRE_ARMOIRE_GAUCHE" => array("contact", false)
|
||||
);
|
||||
@@ -25,7 +25,10 @@ class rdc_chambre_eclairage extends hook
|
||||
$lux = $indexDevices[RDC_CHAMBRE_LUMINOSITE]->illuminance_lux;
|
||||
if ($property == "occupancy" and $value == "ON")
|
||||
{
|
||||
$this->send(RDC_CHAMBRE_LUMINOSITE, "ON", "OFF", AUTO);
|
||||
$this->send(RDC_CHAMBRE_AMBIANCE, "ON", "OFF", AUTO);
|
||||
}elseif ($property == "contact" and $value = true and getValue(RDC_CHAMBRE_ECLAIRAGE) == "OFF")
|
||||
{
|
||||
$this->send(RDC_CHAMBRE_ECLAIRAGE, "ON", "OFF", AUTO);
|
||||
}
|
||||
logger (INFO, sprintf(_("%s: notification received from MQTT from %s => parameter: %s value: %s"), $this->hookName, $device->friendlyName, $property, $value), __FILE__ . ":" . __LINE__);
|
||||
}
|
||||
|
Reference in New Issue
Block a user