hooks are now classes and devices scan exposes to add properties
This commit is contained in:
@@ -8,8 +8,8 @@ function checkEvents()
|
||||
{
|
||||
if (!empty($event->dateTimeEvent) and $event->dateTimeEvent <= now())
|
||||
{
|
||||
//echo "---->sending command" . EOL;
|
||||
publish($devices[$event->topic][$indexDevices[$event->ieeeAddress]], array($event->param => $event->value), "set", $key);
|
||||
echo "---->sending command" . EOL;
|
||||
publish($event->device, array($event->param => $event->value), "set", $key);
|
||||
//$event->published = now();
|
||||
//echo "#################################\nUnsetting event $key \n###########################" . EOL;
|
||||
unset($events[$key]);
|
||||
@@ -62,10 +62,13 @@ function setDelay(&$device, $delay, $unit="sec", $param, $value, $replace=false)
|
||||
$events[$key]->topic = $device->topic;
|
||||
$events[$key]->param = $param;
|
||||
$events[$key]->value = $value;
|
||||
$events[$key]->device = & $device;
|
||||
echo "new event";
|
||||
}
|
||||
|
||||
function searchEvent($device, $param , $value)
|
||||
|
||||
|
||||
function searchEvent($device, $param , $value): int
|
||||
{
|
||||
global $events;
|
||||
echo "searching event" . EOL;
|
||||
|
Reference in New Issue
Block a user