modified init and some debugging
This commit is contained in:
@ -73,7 +73,7 @@ function addDevice(& $device, $fn, $jsonDevice )
|
||||
|
||||
// adding callback function for availability
|
||||
//print_r($hooks);
|
||||
$device["device"]->functions[] = $hooks["availability"]->getHook();
|
||||
//$device["device"]->availability["functions"][] = $hooks["availability"]->getHook();
|
||||
|
||||
//indexing device
|
||||
$indexDevices[$device["device"]->ieeeAddress] = & $device["device"];
|
||||
@ -187,13 +187,13 @@ function iterateDevice($topic, $fn, &$device, $payloadArray)
|
||||
echo " to " . $value . EOL;*/
|
||||
}
|
||||
//print_r($device->functions); print_r($value);
|
||||
print_r($device);
|
||||
//print_r($device);
|
||||
if (!empty($device->$key["functions"]))
|
||||
{
|
||||
echo "executing notifications functions " . EOL;
|
||||
foreach($device->$key["functions"] as $function)
|
||||
{
|
||||
print_r($function);
|
||||
//print_r($function);
|
||||
$function($device, $key, $value);
|
||||
}
|
||||
}
|
||||
@ -202,5 +202,9 @@ function iterateDevice($topic, $fn, &$device, $payloadArray)
|
||||
}
|
||||
}
|
||||
|
||||
function getDevicesValues()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user