Skip to content

Commit

Permalink
4.8.2b
Browse files Browse the repository at this point in the history
fusion des versions stable et béta
  • Loading branch information
noyax authored Sep 9, 2023
2 parents 0b4c00a + 83e1481 commit 46b1084
Show file tree
Hide file tree
Showing 51 changed files with 3,320 additions and 2,016 deletions.
3 changes: 0 additions & 3 deletions .coveralls.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .editorconfig

This file was deleted.

13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
*.ini
*.zip
*.old
*.pyc

core/class/teleinfo.class - copie.php

ressources/teleinfo - Copie.py

.coveralls.yml

.editorconfig

.project

.travis.yml
11 changes: 0 additions & 11 deletions .project

This file was deleted.

35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

10 changes: 9 additions & 1 deletion core/ajax/teleinfo.ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
teleinfo::deamon_start();
ajax::success();
break;
case 'startMqtt':
teleinfo::start_Mqtt('', init('socketport'), init('sockethost'), init('modem'), init('mqtt'), init('mqtt_broker'), init('mqtt_port'), init('mqtt_topic'), init('mqtt_username'), init('mqtt_password'));
ajax::success();
break;
case 'stopMqtt':
teleinfo::stop_Mqtt();
ajax::success();
break;
case 'changeLogLive':
ajax::success(teleinfo::changeLogLive(init('level')));
break;
Expand Down Expand Up @@ -575,7 +583,7 @@
}
file_put_contents($monfichier, serialize('||EQLOGIC_END||'), FILE_APPEND | LOCK_EX);
}
$return["files"] = log::getPathToLog('teleinfo'). " " . log::getPathToLog('teleinfo_deamon_conso'). " " . log::getPathToLog('teleinfo_update') . " " . dirname(__FILE__) . '/../../plugin_info/info.json'. " " . $diagnosticFile . " " . $monfichier;
$return["files"] = log::getPathToLog('teleinfo'). " " . log::getPathToLog('teleinfo_deamon_conso') . log::getPathToLog('teleinfo_deamon_mqtt'). " " . log::getPathToLog('teleinfo_mqtt'). " " . log::getPathToLog('teleinfo_update') . " " . dirname(__FILE__) . '/../../plugin_info/info.json'. " " . $diagnosticFile . " " . $monfichier;
$return["path"] = jeedom::getTmpFolder("teleinfo") . '/teleinfolog.tar';
exec('rm ' . jeedom::getTmpFolder("teleinfo") . '/teleinfolog.tar');
$return["compress"] = exec('tar -cvf ' . jeedom::getTmpFolder("teleinfo") . '/teleinfolog.tar ' . $return["files"]);
Expand Down
36 changes: 18 additions & 18 deletions core/api/teleinfo.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@
throw new \Exception(__('JSONRPC object not defined', __FILE__), -32699);
}
$params = $jsonrpc->getParams();

switch ($jsonrpc->getMethod()) {
case 'deamonRunning':
$jsonrpc->makeSuccess(teleinfo::deamonRunning());
break;
case 'stopDeamon':
$jsonrpc->makeSuccess(teleinfo::deamon_stop());
break;
case 'restartDeamon':
teleinfo::deamon_stop();
if (teleinfo::deamonRunning()) {
throw new \Exception(__('Impossible d\'arrêter le démon', __FILE__));
}
log::clear('teleinfocmd');
teleinfo::cron();
$jsonrpc->makeSuccess();
break;
}

switch ($jsonrpc->getMethod()) {
case 'deamonRunning':
$jsonrpc->makeSuccess(teleinfo::deamonRunning());
break;
case 'stopDeamon':
$jsonrpc->makeSuccess(teleinfo::deamon_stop());
break;
case 'restartDeamon':
teleinfo::deamon_stop();
if (teleinfo::deamonRunning()) {
throw new \Exception(__('Impossible d\'arrêter le démon', __FILE__));
}
log::clear('teleinfocmd');
teleinfo::cron();
$jsonrpc->makeSuccess();
break;
}

throw new \Exception(__('Aucune methode correspondante pour le plugin Teleinfo : ' . $jsonrpc->getMethod(), __FILE__));
Loading

0 comments on commit 46b1084

Please sign in to comment.