* the Free Software Foundation, either version 3 of the License, or
 * (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é}}');
}
if (init('id') == '') {
    throw new Exception('{{EqLogic ID ne peut être vide}}');
}
$eqLogic = eqLogic::byId(init('id'));
if (!is_object($eqLogic)) {
    throw new Exception('{{EqLogic non trouvé}}');
}
include_file('3rdparty', 'jsonTree/jsonTree', 'css', 'openzwave');
include_file('3rdparty', 'jsonTree/jsonTree', 'js', 'openzwave');
$json = openzwave::callOpenzwave('/ZWaveAPI/Run/devices[' . $eqLogic->getLogicalId() . ']', $eqLogic->getConfiguration('serverID', 1));
sendVarToJs('zwaveDataTree', $json);
?>
<div id="div_zwaveDataTree"></div>
<script>
    $('#div_zwaveDataTree').html(JSONTree.create(zwaveDataTree));
</script>
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (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 Unauthorized');
}
sendVarToJs('debugMode_slaveId', init('slave_id'));
echo '<div class="alert alert-warning">{{Attention le lancement en mode debug est très consommateur en ressources et en log, pensez bien à relancer le démon une fois l\'analyse terminée.}}</div>';
?>
<div id='div_openzwaveShowDebug' style="display: none;"></div>
<a class="btn btn-warning pull-right" data-state="1" id="bt_openzwaveLogStopStart"><i class="fa fa-pause"></i> {{Pause}}</a>
<input class="form-control pull-right" id="in_openzwaveLogSearch" style="width : 300px;" placeholder="{{Rechercher}}" />
<br/><br/><br/>
<pre id='pre_openzwavelog' style='overflow: auto; height: 80%;with:90%;'></pre>


<script>
    $('#bt_openzwaveLogStopStart').on('click',function(){
        if($(this).attr('data-state') == 1){
            $(this).attr('data-state',0);
            $(this).removeClass('btn-warning').addClass('btn-success');
            $(this).html('<i class="fa fa-play"></i> {{Reprise}}');
 * (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 Unauthorized');
}
sendVarToJs('node_id', init('id'));
$listServerZwave = openzwave::listServerZwave();
sendVarToJs('path', $listServerZwave[init('serverId')]['path'] . '/');
?>
<style media="screen" type="text/css">
	.noscrolling{
		width:99%;
		overflow: hidden;
	}
	.node-item{
		border: 1px solid;
	}
	.greeniconcolor {color:green;}
	.yellowiconcolor {color:#FFD700;}
	.rediconcolor {color:red;}
	.modal-dialog-center {
		margin: 0;
		position: absolute;
<?php

if (!isConnect()) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
$scenario = scenario::byId(init('scenario_id'));
if (!is_object($scenario)) {
    throw new Exception(__('Aucun scénario ne correspondant à : ', __FILE__) . init('scenario_id'));
}
sendVarToJs('scenarioLog_scenario_id', init('scenario_id'));
?>
<div style="display: none;width : 100%" id="div_alertScenarioLog"></div>
<a class="btn btn-danger pull-right" id="bt_scenarioLogEmpty"><i class="fa fa-trash"></i> {{Vider les logs}}</a>
<a class="btn btn-success pull-right" id="bt_scenarioLogDownload"><i class="fa fa-cloud-download"></i> {{Télécharger}}</a>
<a class="btn btn-primary pull-right" id="bt_scenarioLogRefresh"><i class="fa fa-refresh"></i> {{Rafraîchir}}</a>
<br/><br/>
<?php 
if (file_exists(dirname(__FILE__) . '/../../log/scenarioLog/scenario' . init('scenario_id') . '.log')) {
    echo '<pre id="pre_logScenarioDisplay">' . trim(file_get_contents(dirname(__FILE__) . '/../../log/scenarioLog/scenario' . init('scenario_id') . '.log')) . '</pre>';
} else {
    echo "{{Aucun log n'existe pour votre scénario : }}" . dirname(__FILE__) . '/../../log/scenarioLog/scenario' . init('scenario_id') . '.log.';
}
?>
<script>
    $('#bt_scenarioLogEmpty').on('click', function () {
     jeedom.scenario.emptyLog({
        id: <?php 
echo init('scenario_id');
?>
,
        error: function (error) {
Example #5
0
$noServer = true;
foreach (zwave::listServerZway() as $id => $server) {
    if (isset($server['addr'])) {
        $noServer = false;
        if (($server['addr'] == '127.0.0.1' || $server['addr'] == 'localhost') && $server['isOpenZwave'] != 1) {
            $localZwayServer = true;
        }
    }
}
if (!$localZwayServer && $noServer) {
    $localZwayServer = true;
}
if (!$localZwayServer) {
    throw new Exception(__('Le serveur z-way n\'est pas en local.', __FILE__));
}
sendVarToJs('zway_version', init('version'));
?>
<div id='div_updateZwayAlert' style="display: none;"></div>
<div class="alert alert-warning">{{Attention la mise à jour peut être longue (30 min)}}</div>
<pre id='pre_zwaveupdate' style='overflow: auto; height: 90%;with:90%;'></pre>


<script>
	$.ajax({
		type: 'POST',
		url: 'plugins/zwave/core/ajax/zwave.ajax.php',
		data: {
			action: 'updateZwayServer',
			version : zway_version,
		},
		dataType: 'json',
 * 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é}}');
}
$eqLogic = zwave::byId(init('id'));
if (!is_object($eqLogic)) {
    throw new Exception(__('Equipement Z-Wave introuvable : ', __FILE__) . init('id'));
}
$results = zwave::callRazberry('/ZWaveAPI/Run/devices[' . $eqLogic->getLogicalId() . ']', $eqLogic->getConfiguration('serverID', 1));
sendVarToJs('interview_eqLogic_id', init('id'));
?>
<div id='div_zwaveInterviewResult' style="display: none;"></div>
<a class="btn btn-primary pull-right" id="bt_interviewRefresh"><i class="fa fa-refresh"></i> {{Rafraichir}}</a>
<br/><br/>
<table class="table table-condensed">
	<thead>
		<tr>
			<th>Instance</th>
			<th>Class</th>
			<th>Statut</th>
			<th>Action</th>
		</tr>
	</thead>
	<tbody>
		<?php 
Example #7
0
if (!isConnect()) {
    throw new Exception('401 - Unauthorized access to page');
}
if (init('object_id') == '') {
    $_GET['object_id'] = $_SESSION['user']->getOptions('defaultDashboardObject', 'global');
}
$object = object::byId(init('object_id'));
if (!is_object($object)) {
    $object = object::rootObject();
}
if (!is_object($object)) {
    throw new Exception('Aucun objet racine trouvé');
}
$energy = energy::getObjectData($object->getId());
sendVarToJs('datas', energy::sanitizeForChart($energy));
?>

<div class="row">
    <div class="col-lg-2">
        <div class="bs-sidebar affix">
            <ul id="ul_object" class="nav nav-list bs-sidenav">
                <li class="nav-header">Liste objects </li>
                <li class="filter" style="margin-bottom: 5px;"><input class="form-control" class="filter form-control" placeholder="Rechercher" style="width: 100%"/></li>
                <?php 
if (init('object_id') == 'global') {
    echo '<li class="cursor li_object active"><a href="index.php?v=d&m=energy&p=panel&object_id=global">Global</a></li>';
} else {
    echo '<li class="cursor li_object"><a href="index.php?v=d&m=energy&p=panel&object_id=global">Global</a></li>';
}
$allObject = object::buildTree();