- lots of debugging
- beginning to add graphical stats - beginning to add device by type - added a dashboard "etage" - begining to add notification to multiple recipients in freemobile hook
This commit is contained in:
11
utils.php
11
utils.php
@ -18,6 +18,12 @@ function bool2string($var)
|
||||
}
|
||||
}
|
||||
|
||||
function validateDate($date, $format = 'Y-m-d H:i:s')
|
||||
{
|
||||
$d = DateTime::createFromFormat($format, $date);
|
||||
return $d && $d->format($format) == $date;
|
||||
}
|
||||
|
||||
function now()
|
||||
{
|
||||
$now = new datetime();
|
||||
@ -75,7 +81,10 @@ function getDevice($topic, $fn)
|
||||
function getValue($ieeeAddress, $property)
|
||||
{
|
||||
global $indexDevices;
|
||||
return $indexDevices[$ieeeAddress]->properties[$property]["value"];
|
||||
$r = $indexDevices[$ieeeAddress]->properties[$property]["value"];
|
||||
logger(DEBUG, "device: " . $indexDevices[$ieeeAddress]->friendlyName . " value: " . $r, __FILE__ . ":" . __LINE__ );
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
function setValue($fn, $property, $value)
|
||||
|
Reference in New Issue
Block a user