1
0

debuggage

This commit is contained in:
2022-06-20 10:34:55 +02:00
parent da3f4ab51f
commit 58812c442f
13 changed files with 130 additions and 87 deletions

View File

@ -16,6 +16,30 @@
print ("MOHA-" . $logString . EOL);
}
}*/
function testActionneurs(array $actionneurs)
{
global $indexDevices;
$r = 0;
foreach ($actionneurs as $device)
{
if (array_key_exists($device[0], $indexDevices))
{
if (array_key_exists($device[1], $indexDevices[$device[0]]->properties))
{
$s = ($indexDevices[$device[0]]->properties[$device[1]]["value"] == $device[2]);
logger(DEBUG, _("testActionneurs : result is ") . bool2string($indexDevices[$device[0]]->friendlyName) . "=>" . bool2string($s), __FILE__ . ":" . __LINE__ );
$r |= $s;
}else
{
logger(ERROR, _("no property : ") . $device[1] . bool2string($r), __FILE__ . ":" . __LINE__ );
}
}else
{
logger(ERROR, _("no device : ") . $device[0] . bool2string($r), __FILE__ . ":" . __LINE__ );
}
}
return !$r;
}
function htmlGetFriendlyNames($ieeeAddress = '')
{