1
0

modified init and some debugging

This commit is contained in:
2022-01-06 13:03:26 +01:00
parent 85a7fd7ed9
commit 004c6aa572
10 changed files with 178 additions and 34 deletions

View File

@ -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()
{
}
?>