-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
222 additions
and
220 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
<?php | ||
if (!isConnect('admin')) { | ||
throw new Exception('{{401 - Accès non autorisé}}'); | ||
} | ||
sendVarToJS('eqType', 'sigri_linky'); | ||
$eqLogics = eqLogic::byType('sigri_linky'); | ||
?> | ||
|
||
<div class="row row-overflow"> | ||
<div class="col-lg-2 col-md-3 col-sm-4"> | ||
<div class="bs-sidebar"> | ||
<ul id="ul_eqLogic" class="nav nav-list bs-sidenav"> | ||
<a class="btn btn-default eqLogicAction" style="width : 100%;margin-top : 5px;margin-bottom: 5px;" data-action="add"><i class="fa fa-plus-circle"></i> {{Ajouter un compte enedis}}</a> | ||
<li class="filter" style="margin-bottom: 5px;"><input class="filter form-control input-sm" placeholder="{{Rechercher}}" style="width: 100%"/></li> | ||
<?php | ||
foreach ($eqLogics as $eqLogic) { | ||
echo '<li class="cursor li_eqLogic" data-eqLogic_id="' . $eqLogic->getId() . '"><a>' . $eqLogic->getHumanName(true) . '</a></li>'; | ||
} | ||
?> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<div class="col-lg-10 col-md-9 col-sm-8 eqLogicThumbnailDisplay" style="border-left: solid 1px #EEE; padding-left: 25px;"> | ||
<legend>{{Mes comptes enedis}} | ||
</legend> | ||
|
||
<div class="eqLogicThumbnailContainer"> | ||
<div class="cursor eqLogicAction" data-action="add" style="background-color : #ffffff; height : 200px;margin-bottom : 10px;padding : 5px;border-radius: 2px;width : 160px;margin-left : 10px;" > | ||
<center> | ||
<i class="fa fa-plus-circle" style="font-size : 7em;color:#94ca02;"></i> | ||
</center> | ||
<span style="font-size : 1.1em;position:relative; top : 23px;word-break: break-all;white-space: pre-wrap;word-wrap: break-word;color:#94ca02"><center>{{Ajouter}}</center></span> | ||
</div> | ||
<?php | ||
foreach ($eqLogics as $eqLogic) { | ||
echo '<div class="eqLogicDisplayCard cursor" data-eqLogic_id="' . $eqLogic->getId() . '" style="background-color : #ffffff; height : 200px;margin-bottom : 10px;padding : 5px;border-radius: 2px;width : 160px;margin-left : 10px;" >'; | ||
echo "<center>"; | ||
echo '<img src="plugins/sigri_linky/doc/images/sigri_linky_icon.png" height="105" width="95" />'; | ||
echo "</center>"; | ||
echo '<span style="font-size : 1.1em;position:relative; top : 15px;word-break: break-all;white-space: pre-wrap;word-wrap: break-word;"><center>' . $eqLogic->getHumanName(true, true) . '</center></span>'; | ||
echo '</div>'; | ||
} | ||
?> | ||
</div> | ||
</div> | ||
|
||
<div class="col-lg-10 col-md-9 col-sm-8 eqLogic" style="border-left: solid 1px #EEE; padding-left: 25px;display: none;"> | ||
<form class="form-horizontal"> | ||
<fieldset> | ||
<legend><i class="fa fa-arrow-circle-left eqLogicAction cursor" data-action="returnToThumbnailDisplay"></i> {{Général}} <i class='fa fa-cogs eqLogicAction pull-right cursor expertModeVisible' data-action='configure'></i></legend> | ||
<div class="form-group"> | ||
<label class="col-sm-3 control-label">{{Nom du compte enedis}}</label> | ||
<div class="col-sm-3"> | ||
<input type="text" class="eqLogicAttr form-control" data-l1key="id" style="display : none;" /> | ||
<input type="text" class="eqLogicAttr form-control" data-l1key="name" placeholder="{{Nom de l'équipement template}}"/> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label class="col-sm-3 control-label" >{{Objet parent}}</label> | ||
<div class="col-sm-3"> | ||
<select id="sel_object" class="eqLogicAttr form-control" data-l1key="object_id"> | ||
<option value="">{{Aucun}}</option> | ||
<?php | ||
foreach (object::all() as $object) { | ||
echo '<option value="' . $object->getId() . '">' . $object->getName() . '</option>'; | ||
} | ||
?> | ||
</select> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label class="col-sm-3 control-label" >{{Activer}}</label> | ||
<div class="col-sm-3"> | ||
<label class="checkbox-inline"><input type="checkbox" class="eqLogicAttr" data-label-text="{{Activer}}" data-l1key="isEnable" checked/>Activer</label> | ||
<label class="checkbox-inline"><input type="checkbox" class="eqLogicAttr" data-label-text="{{Visible}}" data-l1key="isVisible"/>Visible</label> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label class="col-sm-3 control-label">{{Identifiant}}</label> | ||
<div class="col-sm-3"> | ||
<input type="text" class="eqLogicAttr configuration form-control" data-l1key="configuration" data-l2key="identifiant" placeholder="Email du compte Enedis"/> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label class="col-sm-3 control-label">{{Mot de passe}}</label> | ||
<div class="col-sm-3"> | ||
<input type="password" class="eqLogicAttr configuration form-control" data-l1key="configuration" data-l2key="password" placeholder="Mot de passe du compte enedis"/> | ||
</div> | ||
</div> | ||
</fieldset> | ||
</form> | ||
|
||
<legend>{{Type de télémétrie}}</legend> | ||
<a class="btn btn-success btn-sm cmdAction" data-action="add"><i class="fa fa-plus-circle"></i> {{Commandes}}</a><br/><br/> | ||
<table id="table_cmd" class="table table-bordered table-condensed"> | ||
<thead> | ||
<tr> | ||
<th>{{Nom}}</th><th>{{Type}}</th><th>{{Action}}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
</tbody> | ||
</table> | ||
|
||
<form class="form-horizontal"> | ||
<fieldset> | ||
<div class="form-actions"> | ||
<a class="btn btn-danger eqLogicAction" data-action="remove"><i class="fa fa-minus-circle"></i> {{Supprimer}}</a> | ||
<a class="btn btn-success eqLogicAction" data-action="save"><i class="fa fa-check-circle"></i> {{Sauvegarder}}</a> | ||
</div> | ||
</fieldset> | ||
</form> | ||
|
||
</div> | ||
</div> | ||
|
||
<?php include_file('desktop', 'sigri_linky', 'js', 'sigri_linky');?> | ||
<?php include_file('core', 'plugin.template', 'js');?> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/* This file is part of Jeedom. | ||
* | ||
* Jeedom is free software: you can redistribute it and/or modify | ||
* 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/>. | ||
*/ | ||
|
||
require_once dirname(__FILE__) . '/../../../core/php/core.inc.php'; | ||
include_file('core', 'authentification', 'php'); | ||
if (!isConnect()) { | ||
include_file('desktop', '404', 'php'); | ||
die(); | ||
} | ||
?> | ||
<form class="form-horizontal"> | ||
<fieldset> | ||
<div class="form-group"> | ||
<label class="col-lg-4 control-label">{{Fonctionnement du plugin}}</label> | ||
<div class="col-lg-5"> | ||
Ce plugin utilise le site Enedis pour obtenir les informations de votre consommation depuis votre compteur Linky<br /> | ||
Si vous n'avez pas encore de compte Enedis, vous pouvez l'ouvrir | ||
<a href="https://espace-client-particuliers.enedis.fr/web/espace-particuliers/creation-de-compte" target="_blank" > en cliquant ici</a>.<br /> | ||
Ce plugin historise vos donnees, vous devez avoir donc un equipement non visible pour ne pas l'avoir en dashboard.<br /> | ||
Pour acceder aux donnees : creer une vue, un design pour charger le graphique, ou consulter l'historique. | ||
<br /><br /> | ||
*Librement inspiré du module d'Edouard Marchand, sous license AGPL. | ||
<br /><br /> | ||
Contributions : Bugdamon, glenan | ||
</div> | ||
</div> | ||
</fieldset> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ | |
"hasDependency" : false, | ||
"hasOwnDeamon" : false, | ||
"maxDependancyInstallTime" : 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
/* This file is part of Jeedom. | ||
* | ||
* Jeedom is free software: you can redistribute it and/or modify | ||
* 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/>. | ||
*/ | ||
|
||
require_once dirname(__FILE__) . '/../../../core/php/core.inc.php'; | ||
|
||
function sigri_linky_install() { | ||
$random_minutes = rand(1, 59); | ||
$crontab_schedule = $random_minutes." 5-23/5 * * *"; | ||
$cron = cron::byClassAndFunction('sigri_linky', 'launch_sigri_linky'); | ||
if (!is_object($cron)) { | ||
$cron = new cron(); | ||
$cron->setClass('sigri_linky'); | ||
$cron->setFunction('launch_sigri_linky'); | ||
$cron->setEnable(1); | ||
$cron->setDeamon(0); | ||
$cron->setSchedule($crontab_schedule); | ||
$cron->save(); | ||
} | ||
} | ||
|
||
function sigri_linky_update() { | ||
$random_minutes = rand(1, 59); | ||
$crontab_schedule = $random_minutes." 5-23/5 * * *"; | ||
$cron = cron::byClassAndFunction('sigri_linky', 'launch_sigri_linky'); | ||
if (!is_object($cron)) { | ||
$cron = new cron(); | ||
$cron->setClass('sigri_linky'); | ||
$cron->setFunction('launch_sigri_linky'); | ||
$cron->setEnable(1); | ||
$cron->setDeamon(0); | ||
$cron->setSchedule($crontab_schedule); | ||
$cron->save(); | ||
} | ||
$cron->setSchedule($crontab_schedule); | ||
$cron->save(); | ||
$cron->stop(); | ||
} | ||
|
||
function sigri_linky_remove() { | ||
$cron = cron::byClassAndFunction('sigri_linky', 'launch_sigri_linky'); | ||
if (is_object($cron)) { | ||
$cron->stop(); | ||
$cron->remove(); | ||
} | ||
} | ||
?> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.