added notify command to webserver
This commit is contained in:
26
utils.php
26
utils.php
@ -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;
|
||||
|
Reference in New Issue
Block a user