added custom script plus some debugging
This commit is contained in:
@ -87,7 +87,10 @@ function searchPropertyKey($fn, &$device, $object, $listPropertiesKeys)
|
||||
{
|
||||
foreach($object as $key => $value)
|
||||
{
|
||||
|
||||
if (gettype($value) == "object" or gettype($value) == "array")
|
||||
{
|
||||
searchPropertyKey($fn, $device, $value, $listPropertiesKeys);
|
||||
}
|
||||
if ( isset($value->property))
|
||||
{
|
||||
//echo "property ===> " . $value->property . EOL;
|
||||
@ -116,7 +119,14 @@ function changeDevice($topic, $fn, &$device, $payloadArray)
|
||||
{
|
||||
//$fnTree = explode("/", $fn);
|
||||
//print_r($payloadArray);
|
||||
iterateDevice($topic, $fn, $device, $payloadArray);
|
||||
if (!empty($payloadArray))
|
||||
{
|
||||
iterateDevice($topic, $fn, $device, $payloadArray);
|
||||
}else
|
||||
{
|
||||
logger(ERROR, _("payloadArray is empty!"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function iterateDevice($topic, $fn, &$device, $payloadArray)
|
||||
@ -173,7 +183,7 @@ function iterateDevice($topic, $fn, &$device, $payloadArray)
|
||||
|
||||
if (!empty($device->functions))
|
||||
{
|
||||
echo "executing notifications functions " . EOL;
|
||||
//echo "executing notifications functions " . EOL;
|
||||
foreach($device->functions as $function)
|
||||
{
|
||||
//print_r($function);
|
||||
|
Reference in New Issue
Block a user