Exemplo n.º 1
0
     ajax::success(zwave::showNotification(init('serverID')));
 }
 if (init('action') == 'updateZwayServer') {
     zwave::updateZwayServer(init('version'));
     ajax::success();
 }
 if (init('action') == 'getCommandClassInfo') {
     ajax::success(zwave::getCommandClassInfo(init('class')));
 }
 if (init('action') == 'launchInDebug') {
     log::clear('zwavecmd');
     zwave::restartZwayServer(true);
     ajax::success();
 }
 if (init('action') == 'restartZwayServer') {
     zwave::restartZwayServer();
     ajax::success();
 }
 if (init('action') == 'restartDeamon') {
     $cron = cron::byClassAndFunction('zwave', 'pull');
     if (is_object($cron)) {
         $cron->stop();
     }
     ajax::success();
 }
 if (init('action') == 'autoDetectModule') {
     $eqLogic = zwave::byId(init('id'));
     if (!is_object($eqLogic)) {
         throw new Exception(__('Zwave eqLogic non trouvé : ', __FILE__) . init('id'));
     }
     $result = zwave::callRazberry('/ZWaveAPI/Run/devices[' . $eqLogic->getLogicalId() . ']', $eqLogic->getConfiguration('serverID', 1));