1
0

- 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:
2022-03-28 00:40:34 +02:00
parent 80234fc505
commit 0d35b1ff3f
24 changed files with 491 additions and 205 deletions

View File

@ -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)