1
0

debuggage

This commit is contained in:
2022-01-23 09:46:06 +01:00
parent 10f2a1087a
commit fc4eaf2238
14 changed files with 294 additions and 157 deletions

View File

@ -199,7 +199,7 @@ function iterateDevice($topic, $fn, $parentDevice, &$device, $payloadArray, $pro
$device->{$key} = array("value" => null);
$device->$key["functions"] = array();
}
echo $key . 'oldvalue = ' . $oldValue . " value = " . $value . EOL;
echo $key . ' ===> oldvalue = ' . $oldValue . " value = " . $value . EOL;
if ($oldValue !== $value)
{
$device->$key["value"] = $value;
@ -207,14 +207,14 @@ function iterateDevice($topic, $fn, $parentDevice, &$device, $payloadArray, $pro
//$changed[$fn]["value"] = $value;
logger(INFO, sprintf(_("Device %s property %s, %s"), $fn, $propertyTree . $key, bool2string($value)));
$mohaDB->logProperty($parentDevice, $propertyTree . $key, $value, $oldValue);
print_r($device->$key);
if (!empty($device->$key["functions"]))
}
if (!empty($device->$key["functions"]))
{
logger(DEBUG,_("executing notifications functions"));
foreach($device->$key["functions"] as $function)
{
logger(DEBUG,_("executing notifications functions"));
foreach($device->$key["functions"] as $function)
{
$function($device, $key, $value);
}
$function($device, $key, $value);
}
}
//}