. */ 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'); ?>
{{Module}} | {{ID}} | {{Device}} | {{Serial}} | {{Type}} | {{Présent *}} | {{Date création}} |
---|---|---|---|---|---|---|
' . $eqLogic->getHumanName(true,true) . ' | '; echo '' . $eqLogic->getId() . ' | '; echo '' . $eqLogic->getConfiguration('device') . ' | '; echo '' . $eqLogic->getConfiguration('serial') . ' | '; echo '' . $eqLogic->getConfiguration('type') . ' | '; echo '' . $presentText . ' | '; echo '' . $eqLogic->getConfiguration('createtime') . ' |