1
0

debug + réglage rdc_store

This commit is contained in:
2022-06-13 19:22:08 +02:00
parent b2f79dd49c
commit 413c25c0b7
5 changed files with 198 additions and 141 deletions

View File

@ -275,7 +275,7 @@ function getDevicesValues($topic)
function changeValue(&$property, $value, &$parentDevice, $propertyTree, $key)
{
global $mohaDB, $properties2log;
global $mohaDB, $properties2log, $hooks;
//$changed[$fn]["key"] = $key;
//$changed[$fn]["value"] = $value;
@ -293,13 +293,14 @@ function changeValue(&$property, $value, &$parentDevice, $propertyTree, $key)
{
try
{
logger(INFO, print_r($function, true), __FILE__ . ":" . __LINE__);
if ( $function[0]->active === true )
$active = $hooks[$function[0]->hookName]->active;
logger(INFO, "active = " . bool2string($active), __FILE__ . ":" . __LINE__);
if ( $active === true )
{
$function($parentDevice, $key, $value);
}else
{
logger(INFO, $function . _(" is disabled"), __FILE__ . ":" . __LINE__ );
logger(INFO, $function[0]->hookName . _(" is disabled"), __FILE__ . ":" . __LINE__ );
}
}catch (Exception $e)