. */ if (!isConnect('admin')) { throw new Exception('401 Unauthorized'); } /* DEPLACE DANS public static function ScanAmazonAlexa($_logical_id = null, $_exclusion = 0) de core class alexaapi.class.php $json=file_get_contents("http://192.168.0.21:3456/devices"); $json = json_decode($json,true); foreach($json as $item) { $device = $item['name']; $serial = $item['serial']; $type = $item['type']; $online = $item['online']; $alexaapi = alexaapi::byLogicalId($serial, 'alexaapi'); if (!is_object($alexaapi)) { $alexaapi = new alexaapi(); $alexaapi->setName($device); $alexaapi->setLogicalId($serial); $alexaapi->setEqType_name('alexaapi'); $alexaapi->setIsEnable(1); $alexaapi->setIsVisible(1); } $alexaapi->setConfiguration('serial',$serial); $alexaapi->setConfiguration('device',$device); $alexaapi->setConfiguration('type',$type); $alexaapi->setStatus('online',$online); $alexaapi->save(); } */ $eqLogics = alexaapi::byType('alexaapi'); ?> getStatus('online') == 'true') { $present = 1; } if ($present == 1) { $presentText = ''; } else { $presentText = ''; } if ((strstr($eqLogic->getName(), "Alexa Apps"))) $presentText = ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } ?>
{{Module}} {{ID}} {{Device}} {{Serial}} {{Type}} {{Présent *}} {{Date création}}
' . $eqLogic->getHumanName(true,true) . '' . $eqLogic->getId() . '' . $eqLogic->getConfiguration('device') . '' . $eqLogic->getConfiguration('serial') . '' . $eqLogic->getConfiguration('type') . '' . $presentText . '' . $eqLogic->getConfiguration('createtime') . '
* Pour actualiser la colonne Présent, Faites un Scan sur l'écran précédent.