예제 #1
0
function zwave_update()
{
    $cron = cron::byClassAndFunction('zwave', 'pull');
    if (config::byKey('jeeNetwork::mode') != 'slave') {
        if (!is_object($cron)) {
            $cron = new cron();
        }
        $cron->setClass('zwave');
        $cron->setFunction('pull');
        $cron->setEnable(1);
        $cron->setDeamon(1);
        $cron->setTimeout(1440);
        $cron->setSchedule('* * * * *');
        $cron->save();
        $cron->stop();
    } else {
        if (is_object($cron)) {
            $cron->remove();
        }
    }
    foreach (zwave::byType('zwave') as $zwave) {
        if ($zwave->getConfiguration('serverID') == '') {
            $zwave->setConfiguration('serverID', 1);
        }
        $zwave->save();
    }
    config::save('zwaveAddr1', config::byKey('zwaveAddr1', 'zwave', config::byKey('zwaveAddr', 'zwave')), 'zwave');
    config::save('zwavePort1', config::byKey('zwavePort1', 'zwave', config::byKey('zwavePort', 'zwave')), 'zwave');
    config::save('isOpenZwave1', config::byKey('isOpenZwave1', 'zwave', config::byKey('isOpenZwave', 'zwave')), 'zwave');
    if (method_exists('zwave', 'listServerZway')) {
        foreach (zwave::listServerZway() as $serverID => $server) {
            if (config::byKey('lastNotificationCheck' . $serverID, 'zwave', 0) == 0) {
                config::save('lastNotificationCheck' . $serverID, strtotime('now'), 'zwave');
            }
        }
    }
}
예제 #2
0
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Jeedom. If not, see <http://www.gnu.org/licenses/>.
 */
if (!isConnect('admin')) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
?>
<div id='div_routingTableAlert' style="display: none;"></div>
<span class='pull-left'>
    <select class="form-control expertModeVisible" style="width : 200px;" id="sel_routingTableServerId">
        <?php 
foreach (zwave::listServerZway() as $id => $server) {
    if (isset($server['name'])) {
        echo '<option value="' . $id . '">' . $server['name'] . '</option>';
    }
}
?>
  </select>
</span>
<a class='btn btn-warning btn-xs pull-right updateRoute' data-id="" style='color : white;'><i class="fa fa-refresh"></i> {{Forcer la mise à jour des routes}}</a><br/><br/>

<div id="div_routingTable"></div>

<table class="table table-bordered table-condensed" style="width: 500px;">
    <thead>
        <tr><th colspan="2">{{Légende}}</th></tr>
    </thead>
예제 #3
0
 * (at your option) any later version.
 *
 * Jeedom is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Jeedom. If not, see <http://www.gnu.org/licenses/>.
 */
if (!isConnect('admin')) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
$infos = array();
$communicationStatistics = array();
$serverList = zwave::listServerZway();
foreach ($serverList as $id => $server) {
    if (isset($server['name'])) {
        $infos[$id] = zwave::callRazberry('/ZWaveAPI/Data/0', $id);
        try {
            $communicationStatistics[$id] = zwave::callRazberry('/ZWaveAPI/CommunicationStatistics', $id);
        } catch (Exception $e) {
        }
    }
}
?>
<div id='div_networkHealthAlert' style="display: none;"></div>
<table class="table table-condensed">
	<thead>
		<tr>
			<th>{{Module}}</th>
예제 #4
0
     }
     if (init('command') == 'removeFailed') {
         ajax::success($eqLogic->removeFailed());
     }
     if (init('command') == 'markBatteryFailed') {
         ajax::success($eqLogic->markAsBatteryFailed());
     }
     if (init('command') == 'InterviewForce') {
         ajax::success($eqLogic->InterviewForce(init('instanceId'), init('classId')));
     }
 }
 if (init('action') == 'callRazberry') {
     ajax::success(zwave::callRazberry(init('call'), init('serverId', 1)));
 }
 if (init('action') == 'listServerZway') {
     ajax::success(zwave::listServerZway());
 }
 if (init('action') == 'uploadConfZwave') {
     $uploaddir = dirname(__FILE__) . '/../config';
     if (!file_exists($uploaddir)) {
         mkdir($uploaddir);
     }
     $uploaddir .= '/devices/';
     if (!file_exists($uploaddir)) {
         mkdir($uploaddir);
     }
     if (!file_exists($uploaddir)) {
         throw new Exception(__('Répertoire d\'upload non trouvé : ', __FILE__) . $uploaddir);
     }
     if (!isset($_FILES['file'])) {
         throw new Exception(__('Aucun fichier trouvé. Vérifiez le paramètre PHP (post size limit)', __FILE__));