- changed webserver to apiserver
- added webserver - a lot of debugging - install shell script
This commit is contained in:
12
utils.php
12
utils.php
@@ -81,9 +81,15 @@ function getDevice($topic, $fn)
|
||||
function getValue($ieeeAddress, $property)
|
||||
{
|
||||
global $indexDevices;
|
||||
$r = $indexDevices[$ieeeAddress]->properties[$property]["value"];
|
||||
logger(DEBUG, "device: " . $indexDevices[$ieeeAddress]->friendlyName . " value: " . $r, __FILE__ . ":" . __LINE__ );
|
||||
|
||||
if (array_key_exists($property, $indexDevices[$ieeeAddress]->properties))
|
||||
{
|
||||
$r = $indexDevices[$ieeeAddress]->properties[$property]["value"];
|
||||
logger(DEBUG, "device: " . $indexDevices[$ieeeAddress]->friendlyName . " value: " . $r, __FILE__ . ":" . __LINE__ );
|
||||
}else
|
||||
{
|
||||
$r = false;
|
||||
logger(ERROR, "device: " . $indexDevices[$ieeeAddress]->friendlyName . "property " . $property . "does not exists", __FILE__ . ":" . __LINE__ );
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user