2021-12-30 16:18:32 +01:00
|
|
|
<?php
|
|
|
|
|
2022-01-28 23:05:58 +01:00
|
|
|
logger(DEBUG,_("Including db_functions.php"), __FILE__ . ":" . __LINE__);
|
2022-01-17 00:18:50 +01:00
|
|
|
|
2022-02-07 16:58:42 +01:00
|
|
|
//to save or not to save the DB, that is the question ...
|
2021-12-30 16:18:32 +01:00
|
|
|
function storeDB($db, $filepath)
|
|
|
|
{
|
2022-03-13 22:33:26 +01:00
|
|
|
logger(DEBUG,_("Storing database ") . $filepath, __FILE__ . ":" . __LINE__);
|
|
|
|
$data = serialize($db);
|
|
|
|
if (file_put_contents($filepath, $data) === false)
|
|
|
|
{
|
2022-04-23 02:00:52 +02:00
|
|
|
logger(ALERT,_("Failed storing database ") . $filepath , __FILE__ . ":" . __LINE__);
|
2022-03-13 22:33:26 +01:00
|
|
|
return false;
|
|
|
|
}else
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
2022-01-17 00:18:50 +01:00
|
|
|
|
2022-03-13 22:33:26 +01:00
|
|
|
function loadDB($filepath)
|
2022-01-17 00:18:50 +01:00
|
|
|
{
|
2022-03-13 22:33:26 +01:00
|
|
|
logger(DEBUG,_("Loading database ") . $filepath, __FILE__ . ":" . __LINE__);
|
2022-01-17 00:18:50 +01:00
|
|
|
$data = file_get_contents($filepath);
|
2022-02-07 16:58:42 +01:00
|
|
|
if ($data === false)
|
|
|
|
{
|
2022-04-23 02:00:52 +02:00
|
|
|
logger(ALERT,_("Failed loading database ") . $filepath , __FILE__ . ":" . __LINE__);
|
2022-02-07 16:58:42 +01:00
|
|
|
return false;
|
|
|
|
}
|
2022-04-23 02:00:52 +02:00
|
|
|
if (($db = unserialize($data)) === false)
|
|
|
|
{
|
|
|
|
logger(ALERT,_("Failed unserializing database ") . $filepath , __FILE__ . ":" . __LINE__);
|
|
|
|
}
|
2022-03-13 22:33:26 +01:00
|
|
|
return $db;
|
2021-12-30 16:18:32 +01:00
|
|
|
}
|
|
|
|
|
2021-12-31 14:34:20 +01:00
|
|
|
function mkDevicesDB($topic, $json, $group=false)
|
2021-12-30 16:18:32 +01:00
|
|
|
{
|
2022-03-04 22:30:16 +01:00
|
|
|
global $devices, $listProperties, $listPropertiesKeys, $indexDevices, $dbInit, $logFh, $hooks, $indexFriendlyNames;
|
2022-04-23 02:00:52 +02:00
|
|
|
if (!array_key_exists($topic, $devices))
|
2022-01-02 18:14:13 +01:00
|
|
|
{
|
|
|
|
$devices[$topic]= array();
|
|
|
|
}
|
2022-04-23 02:00:52 +02:00
|
|
|
//fwrite($logFh, var_export($json, true));
|
2022-02-23 10:23:16 +01:00
|
|
|
//print_r($json);
|
2021-12-31 14:34:20 +01:00
|
|
|
foreach ($json as $jsonDevice)
|
2021-12-30 16:18:32 +01:00
|
|
|
{
|
2022-04-07 01:44:17 +02:00
|
|
|
$fn = $jsonDevice["friendly_name"];
|
|
|
|
addDevice($topic, $fn, $jsonDevice, $group);
|
2021-12-30 16:18:32 +01:00
|
|
|
}
|
2021-12-31 23:09:58 +01:00
|
|
|
$dbInit += 1;
|
2022-03-13 22:33:26 +01:00
|
|
|
mkIndexes();
|
2021-12-31 14:34:20 +01:00
|
|
|
fwrite($logFh, "################################START##################################################");
|
2022-02-02 21:18:44 +01:00
|
|
|
fwrite($logFh, var_export($devices, true));
|
2021-12-31 14:34:20 +01:00
|
|
|
fwrite($logFh, "################################END##################################################");
|
2022-03-04 22:30:16 +01:00
|
|
|
logger(INFO, _("Devices DB made"), __FILE__ . ":" . __LINE__);
|
2021-12-30 16:18:32 +01:00
|
|
|
//print_r($devices);
|
|
|
|
}
|
|
|
|
|
2022-04-07 01:44:17 +02:00
|
|
|
function addDevice($topic, $fn, $jsonDevice, $group=false )
|
2022-01-02 18:14:13 +01:00
|
|
|
{
|
2022-04-07 01:44:17 +02:00
|
|
|
global $devices, $listProperties, $listPropertiesKeys, $hooks, $indexDevices, $indexFriendlyNames;
|
|
|
|
$fnTree = explode("/", $fn);
|
|
|
|
$device = & $devices[$topic];
|
2022-04-23 02:00:52 +02:00
|
|
|
//print_r($jsonDevice);
|
2022-04-07 01:44:17 +02:00
|
|
|
foreach($fnTree as $fnPart)
|
2022-01-02 18:14:13 +01:00
|
|
|
{
|
2022-04-07 01:44:17 +02:00
|
|
|
if (!array_key_exists($fnPart, $device))
|
|
|
|
{
|
|
|
|
$device[$fnPart] = array();
|
|
|
|
}
|
|
|
|
$device = & $device[$fnPart];
|
2022-01-02 18:14:13 +01:00
|
|
|
}
|
2022-04-07 01:44:17 +02:00
|
|
|
if (!array_key_exists("device", $device))
|
2022-01-02 18:14:13 +01:00
|
|
|
{
|
2022-04-07 01:44:17 +02:00
|
|
|
$device["device"] = new device;
|
|
|
|
}
|
|
|
|
$device["device"]->topic = $topic;
|
|
|
|
//$device["device"]->device = $jsonDevice;
|
|
|
|
$device["device"]->friendlyName = $fn;
|
|
|
|
if ($group)
|
|
|
|
{
|
|
|
|
//print_r($device);
|
|
|
|
$device["device"]->groupID = $jsonDevice["id"];
|
|
|
|
$device["device"]->ieeeAddress = $jsonDevice["id"];
|
|
|
|
//$indexDevices[$device["device"]->groupID] = & $device["device"];
|
|
|
|
//$indexFriendlyNames[$topic][$fn] = & $device["device"];
|
|
|
|
}else
|
|
|
|
{
|
|
|
|
$device["device"]->type = $jsonDevice["type"];
|
|
|
|
$device["device"]->ieeeAddress = $jsonDevice["ieee_address"];
|
|
|
|
if ( !empty($jsonDevice["power_source"] ))
|
|
|
|
{
|
|
|
|
$device["device"]->powerSource = $jsonDevice["power_source"];
|
|
|
|
}
|
|
|
|
if ($jsonDevice["definition"] != null)
|
|
|
|
{
|
|
|
|
$device["device"]->description = $jsonDevice["definition"]["description"];
|
|
|
|
if (array_key_exists("exposes", $jsonDevice["definition"]))
|
|
|
|
{
|
|
|
|
searchPropertyKey($fn, $device["device"], $jsonDevice["definition"]["exposes"], $listPropertiesKeys);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
searchPropertyValue($fn, $device["device"], $jsonDevice, $listProperties);
|
2022-01-02 18:14:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//indexing device
|
2022-03-13 22:33:26 +01:00
|
|
|
//$indexDevices[$device->ieeeAddress] = & $device;
|
|
|
|
//$indexFriendlyNames[$topic][$fn] = & $device;
|
2022-01-02 18:14:13 +01:00
|
|
|
}
|
|
|
|
|
2022-02-23 10:23:16 +01:00
|
|
|
function searchPropertyKey($fn, &$device, $inputObject, $listPropertiesKeys)
|
2021-12-31 23:09:58 +01:00
|
|
|
{
|
2022-02-23 10:23:16 +01:00
|
|
|
//foreach($listPropertiesKeys as $propertyKey)
|
|
|
|
//{
|
2022-04-23 02:00:52 +02:00
|
|
|
//logger(DEBUG, _("searching for property"), __FILE__ . ":" . __LINE__ );
|
2022-04-07 01:44:17 +02:00
|
|
|
//if (is_object($inputObject))
|
|
|
|
//{
|
|
|
|
//print_r($inputObject);
|
|
|
|
if (array_key_exists("property", $inputObject))
|
2021-12-31 23:09:58 +01:00
|
|
|
{
|
2022-04-23 02:00:52 +02:00
|
|
|
//logger(DEBUG, _("property Key exists filling properties"), __FILE__ . ":" . __LINE__ );
|
2022-04-07 01:44:17 +02:00
|
|
|
$string = $inputObject["property"];
|
2022-03-04 22:30:16 +01:00
|
|
|
if (!array_key_exists($string, $device->properties))
|
|
|
|
{
|
|
|
|
$device->properties[$string]["value"] = null;
|
|
|
|
$device->properties[$string]["functions"] = array();
|
2022-04-07 01:44:17 +02:00
|
|
|
$device->properties[$string]["method"] = IDLE;
|
2022-03-13 22:33:26 +01:00
|
|
|
}
|
2022-02-23 10:23:16 +01:00
|
|
|
foreach($inputObject as $key2 => $value2)
|
2022-01-03 21:11:52 +01:00
|
|
|
{
|
2022-02-23 10:23:16 +01:00
|
|
|
if ($key2 != "property")
|
|
|
|
{
|
|
|
|
$device->properties[$string][$key2] = $value2;
|
2022-03-04 22:30:16 +01:00
|
|
|
//logger(DEBUG, sprintf(_("property %s value %s"), $key2, print_r($device->properties[$string][$key2])), __FILE__ . ":" . __LINE__ );
|
2022-02-23 10:23:16 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}else
|
|
|
|
{
|
2022-04-07 01:44:17 +02:00
|
|
|
if (array_key_exists("type", $inputObject))
|
2022-02-23 10:23:16 +01:00
|
|
|
{
|
2022-04-07 01:44:17 +02:00
|
|
|
$device->type = $inputObject["type"];
|
2022-01-03 21:11:52 +01:00
|
|
|
}
|
2022-04-23 02:00:52 +02:00
|
|
|
foreach($inputObject as $key => $value)
|
2021-12-31 23:09:58 +01:00
|
|
|
{
|
2022-04-23 02:00:52 +02:00
|
|
|
//logger(DEBUG, sprintf(_("key = %s"), $key), __FILE__ . ":" . __LINE__ );
|
|
|
|
if (is_array($value))
|
|
|
|
{
|
|
|
|
searchPropertyKey($fn, $device, $value, $listPropertiesKeys);
|
|
|
|
}
|
|
|
|
}
|
2021-12-31 23:09:58 +01:00
|
|
|
}
|
|
|
|
//print_r($device);
|
2022-04-07 01:44:17 +02:00
|
|
|
//}
|
|
|
|
|
|
|
|
/*elseif (is_array($inputObject))
|
2022-02-23 10:23:16 +01:00
|
|
|
{
|
|
|
|
foreach($inputObject as $value)
|
|
|
|
{
|
|
|
|
logger(DEBUG, _("value is object or group, iterating"), __FILE__ . ":" . __LINE__ );
|
|
|
|
searchPropertyKey($fn, $device, $value, $listPropertiesKeys);
|
|
|
|
}
|
2022-04-07 01:44:17 +02:00
|
|
|
}*/
|
2022-02-23 10:23:16 +01:00
|
|
|
|
2021-12-31 23:09:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
function searchPropertyValue($fn, &$device, $object, $listProperties)
|
2021-12-30 16:18:32 +01:00
|
|
|
{
|
|
|
|
$objectArray = (array)$object;
|
|
|
|
foreach($listProperties as $key => $value)
|
|
|
|
{
|
|
|
|
if (in_array($value, $objectArray))
|
|
|
|
{
|
|
|
|
//echo "$value trouvé =>";
|
|
|
|
$device->$key = $value;
|
|
|
|
//echo $device->$key . EOL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-01-02 12:14:30 +01:00
|
|
|
function changeDevice($topic, $fn, &$device, $payloadArray)
|
2021-12-30 16:18:32 +01:00
|
|
|
{
|
2022-01-02 12:14:30 +01:00
|
|
|
//print_r($payloadArray);
|
2022-01-03 21:11:52 +01:00
|
|
|
if (!empty($payloadArray))
|
|
|
|
{
|
2022-02-24 21:46:10 +01:00
|
|
|
iterateDevice($topic, $fn, $device, $device->properties, $payloadArray);
|
2022-01-03 21:11:52 +01:00
|
|
|
}else
|
|
|
|
{
|
2022-01-30 00:21:50 +01:00
|
|
|
logger(ERROR, $fn . _(" => payloadArray is empty!"), __FILE__ . ":" . __LINE__);
|
2022-01-03 21:11:52 +01:00
|
|
|
}
|
2021-12-30 16:18:32 +01:00
|
|
|
}
|
|
|
|
|
2022-03-13 22:33:26 +01:00
|
|
|
function iterateDevice($topic, $fn, &$parentDevice, &$properties, $payloadArray, $propertyTree="")
|
2021-12-30 16:18:32 +01:00
|
|
|
{
|
2022-01-17 21:01:11 +01:00
|
|
|
global $changed, $mohaDB, $testMode;
|
2022-02-24 21:46:10 +01:00
|
|
|
//if (is_a($device, "device")) // = true if object
|
|
|
|
|
2022-02-02 21:18:44 +01:00
|
|
|
//echo "==================== New iterate =====================" .EOL;
|
2022-02-23 10:23:16 +01:00
|
|
|
//echo "deviceType = "; var_dump($deviceType); echo EOL;
|
2021-12-30 16:18:32 +01:00
|
|
|
//echo "device =>";print_r($device);echo EOL;
|
2022-01-17 00:18:50 +01:00
|
|
|
//echo "PropertyTree ==============> " . $propertyTree . EOL;
|
2022-01-02 12:14:30 +01:00
|
|
|
foreach($payloadArray as $key => $value)
|
2021-12-30 16:18:32 +01:00
|
|
|
{
|
2022-02-25 20:42:33 +01:00
|
|
|
//$oldValue = null;
|
2021-12-30 16:18:32 +01:00
|
|
|
//echo "key =>"; print_r($key); echo EOL;
|
2022-02-23 10:23:16 +01:00
|
|
|
//echo "value =>"; var_dump($value); echo EOL;
|
2021-12-30 16:18:32 +01:00
|
|
|
//echo "type : " . gettype($value) .EOL;
|
2022-01-17 00:18:50 +01:00
|
|
|
$valueType = gettype($value);
|
2022-02-02 21:18:44 +01:00
|
|
|
|
2022-02-24 21:46:10 +01:00
|
|
|
if ($valueType == "array")
|
2021-12-30 16:18:32 +01:00
|
|
|
{
|
2022-03-13 22:33:26 +01:00
|
|
|
//logger(DEBUG,_("valueType == array"), __FILE__ . ":" . __LINE__);
|
2022-01-17 00:18:50 +01:00
|
|
|
$propertyTree .= $key . "/";
|
2022-03-13 22:33:26 +01:00
|
|
|
if(!array_key_exists($key, $properties))
|
|
|
|
{
|
|
|
|
$properties[$key] = array();
|
|
|
|
}
|
2022-02-24 21:46:10 +01:00
|
|
|
iterateDevice($topic, $fn, $parentDevice, $properties[$key], $value, $propertyTree);
|
2021-12-30 16:18:32 +01:00
|
|
|
}else
|
|
|
|
{
|
2022-03-13 22:33:26 +01:00
|
|
|
//logger(DEBUG,_("valueType is ") . $valueType, __FILE__ . ":" . __LINE__);
|
2022-02-24 21:46:10 +01:00
|
|
|
//var_dump($properties);echo EOL;
|
|
|
|
if (!array_key_exists($key, $properties))
|
2022-02-23 10:23:16 +01:00
|
|
|
{
|
2022-02-24 21:46:10 +01:00
|
|
|
$properties[$key] = array("value" => $value);
|
|
|
|
$properties[$key]["functions"] = array();
|
2022-04-07 01:44:17 +02:00
|
|
|
$properties[$key]["method"] = IDLE;
|
2022-03-04 22:30:16 +01:00
|
|
|
}elseif ($properties[$key]["value"] !== $value)
|
|
|
|
{
|
|
|
|
changeValue($properties[$key], $value, $parentDevice, $propertyTree, $key);
|
2022-02-23 10:23:16 +01:00
|
|
|
}
|
2021-12-30 16:18:32 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-07 16:58:42 +01:00
|
|
|
function getDevicesValues($topic)
|
2022-01-06 13:03:26 +01:00
|
|
|
{
|
2022-02-07 16:58:42 +01:00
|
|
|
global $indexDevices, $topics;
|
2022-02-23 10:23:16 +01:00
|
|
|
logger(DEBUG, _("getDevicesValues function" ), __FILE__ . ":" . __LINE__ );
|
2022-03-13 22:33:26 +01:00
|
|
|
foreach($indexDevices as &$device)
|
2022-02-07 16:58:42 +01:00
|
|
|
{
|
|
|
|
if ($device->topic == $topic)
|
|
|
|
{
|
2022-02-23 10:23:16 +01:00
|
|
|
logger(DEBUG, "device: " . $device->friendlyName, __FILE__ . ":" . __LINE__ );
|
|
|
|
$device->payload = array();
|
2022-02-07 16:58:42 +01:00
|
|
|
$flag = false;
|
2022-02-12 15:23:58 +01:00
|
|
|
//$properties = array_slice($device, 12);
|
|
|
|
//logger(DEBUG, print_r($properties, true));
|
2022-02-23 10:23:16 +01:00
|
|
|
if (!empty($device->properties))
|
2022-02-07 16:58:42 +01:00
|
|
|
{
|
2022-02-23 10:23:16 +01:00
|
|
|
foreach($device->properties as $property => $value)
|
2022-02-07 16:58:42 +01:00
|
|
|
{
|
2022-03-04 22:30:16 +01:00
|
|
|
if (array_key_exists("access", $value))
|
|
|
|
{
|
2022-03-13 22:33:26 +01:00
|
|
|
if ($value["access"] & 4)
|
2022-03-04 22:30:16 +01:00
|
|
|
{
|
|
|
|
$device->payload[$property] = "";
|
2022-04-23 02:00:52 +02:00
|
|
|
$flag = true;
|
2022-03-13 22:33:26 +01:00
|
|
|
break;
|
2022-03-04 22:30:16 +01:00
|
|
|
}
|
|
|
|
}
|
2022-02-07 16:58:42 +01:00
|
|
|
}
|
2022-02-23 10:23:16 +01:00
|
|
|
//logger(DEBUG, print_r($device->payload, true), __FILE__ . ":" . __LINE__ );
|
2022-04-23 02:00:52 +02:00
|
|
|
if ($flag === true)
|
|
|
|
{
|
|
|
|
$device->get();
|
|
|
|
}
|
2022-02-23 10:23:16 +01:00
|
|
|
}else
|
|
|
|
{
|
|
|
|
logger(DEBUG, _("no properties to get for device: " . $device->friendlyName ), __FILE__ . ":" . __LINE__ );
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-24 21:46:10 +01:00
|
|
|
function changeValue(&$property, $value, &$parentDevice, $propertyTree, $key)
|
2022-02-23 10:23:16 +01:00
|
|
|
{
|
|
|
|
global $mohaDB;
|
|
|
|
//$changed[$fn]["key"] = $key;
|
|
|
|
//$changed[$fn]["value"] = $value;
|
2022-02-24 21:46:10 +01:00
|
|
|
logger(INFO, sprintf(_("Logging Device property %s, %s"), $propertyTree . $key, bool2string($value)), __FILE__ . ":" . __LINE__);
|
|
|
|
$mohaDB->logProperty($parentDevice, $key, $value, $property["value"]);
|
2022-02-25 20:42:33 +01:00
|
|
|
logger(DEBUG, sprintf(_("old value was %s, new is %s" ), bool2string($property["value"]), bool2string($value)), __FILE__ . ":" . __LINE__);
|
2022-02-24 21:46:10 +01:00
|
|
|
$property["value"] = $value;
|
|
|
|
if (!empty($property["functions"]))
|
2022-02-23 10:23:16 +01:00
|
|
|
{
|
|
|
|
logger(DEBUG,_("executing notifications functions"), __FILE__ . ":" . __LINE__);
|
2022-02-24 21:46:10 +01:00
|
|
|
foreach($property["functions"] as $function)
|
2022-02-23 10:23:16 +01:00
|
|
|
{
|
2022-03-28 00:40:34 +02:00
|
|
|
try
|
|
|
|
{
|
|
|
|
$function($parentDevice, $key, $value);
|
|
|
|
}catch (Exception $e)
|
|
|
|
{
|
|
|
|
$s = 'Exception reçue : ' . $e->getMessage();
|
|
|
|
logger(ERROR, $parentDevice->friendlyName . "/" . $property .": " . $s);
|
|
|
|
}
|
2022-02-07 16:58:42 +01:00
|
|
|
}
|
|
|
|
}
|
2022-01-06 13:03:26 +01:00
|
|
|
}
|
2021-12-30 16:18:32 +01:00
|
|
|
|
2022-03-13 22:33:26 +01:00
|
|
|
function mkIndexes()
|
2022-03-06 01:30:33 +01:00
|
|
|
{
|
2022-03-13 22:33:26 +01:00
|
|
|
global $devices, $indexDevices, $indexFriendlyNames;
|
|
|
|
$device = null;
|
2022-03-06 01:30:33 +01:00
|
|
|
logger(INFO, _("function mkIndexes"), __FILE__ . ":" . __LINE__);
|
2022-03-13 22:33:26 +01:00
|
|
|
foreach ($devices as $key => &$object)
|
2022-03-06 01:30:33 +01:00
|
|
|
{
|
2022-03-13 22:33:26 +01:00
|
|
|
print "======####" . $key . EOL;
|
|
|
|
$r = iterate2device($object);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function iterate2device(&$object)
|
|
|
|
{
|
2022-04-23 02:00:52 +02:00
|
|
|
global $indexDevices, $indexFriendlyNames, $indexTypes, $indexProperties;
|
2022-03-13 22:33:26 +01:00
|
|
|
foreach ($object as $key => &$device)
|
|
|
|
{
|
|
|
|
if (is_a($device, "device"))
|
2022-03-06 01:30:33 +01:00
|
|
|
{
|
2022-03-13 22:33:26 +01:00
|
|
|
|
2022-04-23 02:00:52 +02:00
|
|
|
//$object = &$device;
|
2022-03-13 22:33:26 +01:00
|
|
|
//print("=============" . $device->friendlyName);
|
2022-04-07 01:44:17 +02:00
|
|
|
//if (!array_key_exists($object->ieeeAddress, $indexDevices))
|
|
|
|
//{
|
2022-03-13 22:33:26 +01:00
|
|
|
//print("============>");
|
2022-04-23 02:00:52 +02:00
|
|
|
$indexDevices[$device->ieeeAddress] = &$device;
|
|
|
|
$indexFriendlyNames[$device->friendlyName] = &$device;
|
|
|
|
if (property_exists($device, "type"))
|
2022-03-13 22:33:26 +01:00
|
|
|
{
|
2022-04-23 02:00:52 +02:00
|
|
|
$indexTypes[$device->type][] = &$object;
|
|
|
|
}
|
|
|
|
$properties = array_keys($device->properties);
|
|
|
|
foreach($properties as $property)
|
|
|
|
{
|
|
|
|
$indexProperties[$property][$device->ieeeAddress] = &$device;
|
2022-03-13 22:33:26 +01:00
|
|
|
}
|
2022-04-07 01:44:17 +02:00
|
|
|
//}
|
2022-04-23 02:00:52 +02:00
|
|
|
//return true;
|
|
|
|
}elseif (empty($device))
|
|
|
|
{
|
2022-03-13 22:33:26 +01:00
|
|
|
return true;
|
2022-03-06 01:30:33 +01:00
|
|
|
}else
|
|
|
|
{
|
2022-03-13 22:33:26 +01:00
|
|
|
iterate2device($device);
|
2022-03-06 01:30:33 +01:00
|
|
|
}
|
|
|
|
}
|
2022-03-13 22:33:26 +01:00
|
|
|
return false;
|
2022-03-06 01:30:33 +01:00
|
|
|
}
|
|
|
|
|
2021-12-30 16:18:32 +01:00
|
|
|
?>
|