1
0

added notify command to webserver

This commit is contained in:
2022-01-30 00:21:50 +01:00
parent 719a45fa4e
commit 4b226c1d0a
7 changed files with 97 additions and 8 deletions

View File

@ -41,6 +41,32 @@ function mktopic($device)
return $device->topic . "/" . $device->friendlyName;
}
function getDevice($topic, $fn)
{
global $topics, $devices;
if (array_key_exists($topic, $topics))
{
$var = $devices[$topic];
$path = explode("/", $fn);
foreach($path as $tmp)
{
if (array_key_exists($tmp, $var))
{
$var = $var[$tmp];
}else
{
return false;
}
}
return $var;
}else
{
return false;
}
}
function getValue($ieeeAddress, $property)
{
global $indexDevices;