1
0

debbuging

This commit is contained in:
2022-09-09 16:53:49 +02:00
parent 918a571b5c
commit 5b4d6ba9d5
4 changed files with 29 additions and 9 deletions

View File

@ -124,7 +124,13 @@ function searchPropertyKey($fn, &$device, $inputObject, $listPropertiesKeys)
{
$device->properties[$string]["value"] = null;
$device->properties[$string]["functions"] = array();
$device->properties[$string]["method"] = IDLE;
if(array_key_exists("access", $inputObject))
{
if ($inputObject["access"] && 2)
{
$device->properties[$string]["method"] = IDLE;
}
}
}
foreach($inputObject as $key2 => $value2)
{
@ -223,7 +229,13 @@ function iterateDevice($topic, $fn, &$parentDevice, &$properties, $payloadArray,
{
$properties[$key] = array("value" => $value);
$properties[$key]["functions"] = array();
$properties[$key]["method"] = IDLE;
if (array_key_exists("access", $properties[$key]))
{
if ($properties[$key]["access]"] && 2)
{
$properties[$key]["method"] = IDLE;
}
}
}elseif ($properties[$key]["value"] !== $value)
{
changeValue($properties[$key], $value, $parentDevice, $propertyTree, $key);
@ -290,7 +302,7 @@ function changeValue(&$property, $value, &$parentDevice, $propertyTree, $key)
logger(DEBUG, _("Changed value of ") . $r . "=> " . bool2string($value) , __FILE__ . ":" . __LINE__);
if (!empty($property["functions"]))
{
logger(DEBUG,_("executing notifications functions"), __FILE__ . ":" . __LINE__);
logger(DEBUG,_("executing CallBack"), __FILE__ . ":" . __LINE__);
foreach($property["functions"] as $function)
{
try