debuggage
This commit is contained in:
		@@ -3,6 +3,7 @@
 | 
			
		||||
class rdc_sdb_eclairage extends hook
 | 
			
		||||
{
 | 
			
		||||
	public $hookName = "rdc_sdb_eclairage";
 | 
			
		||||
	public $active = true;
 | 
			
		||||
 | 
			
		||||
	/*			already defined in hook class			*/
 | 
			
		||||
	// public $active = true;
 | 
			
		||||
@@ -26,7 +27,7 @@ class rdc_sdb_eclairage extends hook
 | 
			
		||||
	public function callBack(&$device, $property, $value)
 | 
			
		||||
	{
 | 
			
		||||
		global $devices, $indexDevices;
 | 
			
		||||
		var_dump($value);
 | 
			
		||||
		//var_dump($value);
 | 
			
		||||
		switch($property)
 | 
			
		||||
		{
 | 
			
		||||
			case "occupancy":
 | 
			
		||||
@@ -56,9 +57,10 @@ class rdc_sdb_eclairage extends hook
 | 
			
		||||
		global $devices, $indexDevices;
 | 
			
		||||
		$msg = array("state_l1" => $state);
 | 
			
		||||
		$device = & $indexDevices[RDC_SDB_WC_ECLAIRAGE];
 | 
			
		||||
		logger(INFO, sprintf(_("publishing message: %s to %s"), $msg, $device->friendlyName));
 | 
			
		||||
		logger(INFO, sprintf(_("publishing message: %s to %s"), $state, $device->friendlyName));
 | 
			
		||||
		$device->payload = $msg;
 | 
			
		||||
		$device->set(null);
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
$hooks["rdc_sdb_eclairage"] = new rdc_sdb_eclairage();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user