debugging
This commit is contained in:
@ -1,28 +1,19 @@
|
||||
<?php
|
||||
class alerte_intrusion
|
||||
class alerte_intrusion extends hook
|
||||
{
|
||||
public $hookName = "alerte_intrusion";
|
||||
public $active = true;
|
||||
|
||||
private $devicelist = array(ENTREE_PORTE => "contact", GARAGE_PORTE => "contact", RDC_CHAMBRE_BAIE => "contact", RDC_SALON_BAIE => "contact");
|
||||
protected $devicelist = array(
|
||||
ENTREE_PORTE => array("contact", false),
|
||||
GARAGE_PORTE => array("contact", false),
|
||||
RDC_CHAMBRE_BAIE => array("contact", false),
|
||||
RDC_SALON_BAIE => array("contact", false));
|
||||
|
||||
public $delay = 3; // amount of time in $timeunit
|
||||
public $delayManual = 10; // amount of time in $timeunit for manual mode
|
||||
public $timeUnit = "minute"; // unit of time for delay, second, minute, day, week, month, year
|
||||
|
||||
function __construct()
|
||||
{
|
||||
global $indexDevices;
|
||||
// assigne the function to the sensors devices
|
||||
if ($this->active === true)
|
||||
{
|
||||
foreach ($this->devicelist as $ieeeAddress => $param)
|
||||
{
|
||||
$indexDevices[$ieeeAddress]->$param["functions"][] = array($this,"callback");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// callback fonction. Is called with these 4 parameters
|
||||
public function callBack(&$device, $param, $value)
|
||||
{
|
||||
|
Reference in New Issue
Block a user