debugged notification of availability of devices
This commit is contained in:
		| @@ -10,19 +10,31 @@ class hook | ||||
| 	// list of devices we are listening to | ||||
| 	function __construct() | ||||
| 	{ | ||||
| 		logger(INFO, _("Initializing hook: ") . $this->hookName); | ||||
| 		//$this->installHooks(); | ||||
| 		foreach ($this->devicelist as $ieeeAddress => $property) | ||||
| 		if ($this->active === true) | ||||
| 		{ | ||||
| 			$this->propertyInitialized[$ieeeAddress][$property] = false; | ||||
| 		} | ||||
| 		if (method_exists($this, "init")) | ||||
| 			logger(INFO, _("Initializing hook: ") . $this->hookName); | ||||
| 			//$this->installHooks(); | ||||
| 			if (method_exists($this, "init")) | ||||
| 			{ | ||||
| 				$this->init(); | ||||
| 			} | ||||
| 			if (method_exists($this, "iterate")) | ||||
| 			{ | ||||
| 				$this->iterate(); | ||||
| 			} | ||||
| 			foreach ($this->devicelist as $ieeeAddress => $property) | ||||
| 			{ | ||||
| 				$this->propertyInitialized[$ieeeAddress][$property] = false; | ||||
| 			} | ||||
| 		}else | ||||
| 		{ | ||||
| 			$this->init(); | ||||
| 			logger(INFO, _("Not initializing inactive hook: ") . $this->hookName); | ||||
| 		} | ||||
|  | ||||
|  | ||||
| 	} | ||||
|  | ||||
| 	function installHooks(&$indexDevices) | ||||
| 	function installHooksFunction(&$indexDevices) | ||||
| 	{ | ||||
| 		global $devices, $devicesRequest; | ||||
| 		static $requestflag = 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user