예제 #1
0
 * 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', 'zwave');
include_file('3rdparty', 'jsonTree/jsonTree', 'js', 'zwave');
$json = zwave::callRazberry('/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>
예제 #2
0
			<th>1</th>
			<th>2</th>
			<th>3</th>
			<th>4</th>
			<th>5</th>
			<th>6</th>
			<th>7</th>
			<th>8</th>
			<th>9</th>
			<th>10</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<?php 
$data = zwave::callRazberry('/ZWaveAPI/Run/devices[' . init('logical_id') . '].instances[0].commandClasses[0x63].data');
for ($i = 1; $i < 11; $i++) {
    echo '<td>';
    echo '<a class="btn btn-success pull-right btn-xs bt_ziptatoKeypadSaveNewCode" data-position="' . $i . '"><i class="fa fa-floppy-o"></i></a>';
    if (isset($data[$i])) {
        echo '<i class="fa fa-check"></i>';
        //echo '<a class="btn btn-danger pull-right btn-xs"><i class="fa fa-times"></i></a>';
    } else {
        echo '<i class="fa fa-times"></i>';
    }
    echo '</td>';
}
?>
		</tr>
	</tbody>
</table>
예제 #3
0
 * 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_adminRazberryAlert' style="display: none;"></div>


    <?php 
foreach (zwave::listServerZway() as $id => $server) {
    if (isset($server['name'])) {
        $infos = zwave::callRazberry('/ZWaveAPI/Data/0', $id);
        ?>
        <center>
        <span class="label label-success" style="font-size : 1em;margin-right : 3px;"> {{Serveur}} : <?php 
        echo $server['name'];
        ?>
</span>
        <span class="label label-primary" style="font-size : 1em;margin-right : 3px;"> {{Version Z-Way}} : <?php 
        echo $infos['controller']['data']['softwareRevisionVersion']['value'];
        ?>
</span>
        <span class="label label-primary" style="font-size : 1em;margin-right : 3px;"> {{Version puce zwave}} : <?php 
        echo $infos['controller']['data']['ZWaveChip']['value'];
        ?>
 </span>
        <span class="label label-primary" style="font-size : 1em;margin-right : 3px;"> {{SDK}} : <?php 
예제 #4
0
 * 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>
			<th>{{ID}}</th>
			<th>{{Serveur}}</th>
			<th>{{Interview}}</th>
			<th>{{Statut}}</th>
			<th>{{Batterie}}</th>
예제 #5
0
     $eqLogic = zwave::byId(init('id'));
     if (!is_object($eqLogic)) {
         throw new Exception(__('Zwave eqLogic non trouvé : ', __FILE__) . init('id'));
     }
     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);
예제 #6
0
 public function sendZwaveResquest($_url)
 {
     $eqLogic = $this->getEqLogic();
     $result = zwave::callRazberry($_url, $eqLogic->getConfiguration('serverID', 1));
     if ($this->getType() == 'action') {
         return;
     }
     if (is_array($result)) {
         $value = self::handleResult($result);
         if (isset($result['updateTime'])) {
             $this->setCollectDate(date('Y-m-d H:i:s', $result['updateTime']));
         }
     } else {
         $value = $result;
         if ($value === true || $value == 'true') {
             return 1;
         }
         if ($value === false || $value == 'false') {
             return 0;
         }
         if (is_numeric($value)) {
             return round($value, 1);
         }
     }
     return $value;
 }