diff --git a/sigri_linky/LICENSE b/LICENSE similarity index 100% rename from sigri_linky/LICENSE rename to LICENSE diff --git a/sigri_linky/core/class/sigri_linky.class.php b/core/class/sigri_linky.class.php similarity index 100% rename from sigri_linky/core/class/sigri_linky.class.php rename to core/class/sigri_linky.class.php diff --git a/sigri_linky/desktop/js/sigri_linky.js b/desktop/js/sigri_linky.js similarity index 100% rename from sigri_linky/desktop/js/sigri_linky.js rename to desktop/js/sigri_linky.js diff --git a/desktop/php/sigri_linky.php b/desktop/php/sigri_linky.php new file mode 100644 index 0000000..45734a9 --- /dev/null +++ b/desktop/php/sigri_linky.php @@ -0,0 +1,119 @@ + + +
+
+ +
+ +
+ {{Mes comptes enedis}} + + +
+
+
+ +
+
{{Ajouter}}
+
+ getId() . '" style="background-color : #ffffff; height : 200px;margin-bottom : 10px;padding : 5px;border-radius: 2px;width : 160px;margin-left : 10px;" >'; + echo "
"; + echo ''; + echo "
"; + echo '
' . $eqLogic->getHumanName(true, true) . '
'; + echo '
'; + } + ?> +
+
+ + + + + + \ No newline at end of file diff --git a/sigri_linky/doc/fr_FR/configuration.asciidoc b/doc/fr_FR/configuration.asciidoc similarity index 100% rename from sigri_linky/doc/fr_FR/configuration.asciidoc rename to doc/fr_FR/configuration.asciidoc diff --git a/sigri_linky/doc/fr_FR/index.asciidoc b/doc/fr_FR/index.asciidoc similarity index 100% rename from sigri_linky/doc/fr_FR/index.asciidoc rename to doc/fr_FR/index.asciidoc diff --git a/sigri_linky/doc/fr_FR/presentation.asciidoc b/doc/fr_FR/presentation.asciidoc similarity index 100% rename from sigri_linky/doc/fr_FR/presentation.asciidoc rename to doc/fr_FR/presentation.asciidoc diff --git a/sigri_linky/doc/images/sigri_linky_icon.png b/doc/images/sigri_linky_icon.png similarity index 100% rename from sigri_linky/doc/images/sigri_linky_icon.png rename to doc/images/sigri_linky_icon.png diff --git a/plugin_info/configuration.php b/plugin_info/configuration.php new file mode 100644 index 0000000..4948591 --- /dev/null +++ b/plugin_info/configuration.php @@ -0,0 +1,42 @@ +. + */ + + require_once dirname(__FILE__) . '/../../../core/php/core.inc.php'; + include_file('core', 'authentification', 'php'); + if (!isConnect()) { + include_file('desktop', '404', 'php'); + die(); + } +?> +
+
+
+ +
+ Ce plugin utilise le site Enedis pour obtenir les informations de votre consommation depuis votre compteur Linky
+ Si vous n'avez pas encore de compte Enedis, vous pouvez l'ouvrir + en cliquant ici.
+ Ce plugin historise vos donnees, vous devez avoir donc un equipement non visible pour ne pas l'avoir en dashboard.
+ Pour acceder aux donnees : creer une vue, un design pour charger le graphique, ou consulter l'historique. +

+ *Librement inspiré du module d'Edouard Marchand, sous license AGPL. +

+ Contributions : Bugdamon, glenan +
+
+
+
\ No newline at end of file diff --git a/sigri_linky/plugin_info/info.json b/plugin_info/info.json similarity index 99% rename from sigri_linky/plugin_info/info.json rename to plugin_info/info.json index 8254f86..fa568d9 100644 --- a/sigri_linky/plugin_info/info.json +++ b/plugin_info/info.json @@ -8,4 +8,4 @@ "hasDependency" : false, "hasOwnDeamon" : false, "maxDependancyInstallTime" : 0 -} +} \ No newline at end of file diff --git a/plugin_info/install.php b/plugin_info/install.php new file mode 100644 index 0000000..a0c32fe --- /dev/null +++ b/plugin_info/install.php @@ -0,0 +1,60 @@ +. + */ + + 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(); + } + } +?> \ No newline at end of file diff --git a/sigri_linky/desktop/php/sigri_linky.php b/sigri_linky/desktop/php/sigri_linky.php deleted file mode 100644 index fc3fa8f..0000000 --- a/sigri_linky/desktop/php/sigri_linky.php +++ /dev/null @@ -1,119 +0,0 @@ - - -
-
- -
- -
- {{Mes comptes enedis}} - - -
-
-
- -
-
{{Ajouter}}
-
- getId() . '" style="background-color : #ffffff; height : 200px;margin-bottom : 10px;padding : 5px;border-radius: 2px;width : 160px;margin-left : 10px;" >'; - echo "
"; - echo ''; - echo "
"; - echo '
' . $eqLogic->getHumanName(true, true) . '
'; - echo '
'; - } - ?> -
-
- - - - - - \ No newline at end of file diff --git a/sigri_linky/plugin_info/configuration.php b/sigri_linky/plugin_info/configuration.php deleted file mode 100644 index 4fe4620..0000000 --- a/sigri_linky/plugin_info/configuration.php +++ /dev/null @@ -1,40 +0,0 @@ -. - */ - - require_once dirname(__FILE__) . '/../../../core/php/core.inc.php'; - include_file('core', 'authentification', 'php'); - if (!isConnect()) { - include_file('desktop', '404', 'php'); - die(); - } -?> -
-
-
- -
- Ce plugin utilise le site Enedis pour obtenir les informations de votre consommation depuis votre compteur Linky
- Si vous n'avez pas encore de compte Enedis, vous pouvez l'ouvrir - en cliquant ici.
- Ce plugin historise vos donnees, vous devez avoir donc un equipement non visible pour ne pas l'avoir en dashboard.
- Pour acceder aux donnees : creer une vue, un design pour charger le graphique, ou consulter l'historique. -

- *Librement inspiré du module d'Edouard Marchand, sous license AGPL. -
-
-
-
diff --git a/sigri_linky/plugin_info/install.php b/sigri_linky/plugin_info/install.php deleted file mode 100644 index 3c76c2f..0000000 --- a/sigri_linky/plugin_info/install.php +++ /dev/null @@ -1,60 +0,0 @@ -. - */ - - 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(); - } - } -?> \ No newline at end of file