Skip to content

Commit

Permalink
Amélioration du debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ticed35 committed Mar 25, 2019
1 parent 7b0a6c3 commit bf4d5ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions core/class/teleinfo.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public static function runDeamon($debug = false, $type = 'conso')
$cmd .= ' --socketport ' . config::byKey('socketport', 'teleinfo', '55062');
$cmd .= ' --cycle ' . config::byKey('cycle', 'teleinfo','0.3');
$cmd .= ' --callback ' . network::getNetworkAccess('internal', 'proto:127.0.0.1:port:comp') . '/plugins/teleinfo/core/php/jeeTeleinfo.php';
$cmd .= ' --loglevel info'; // . log::convertLogLevel(log::getLogLevel('teleinfo'));
$cmd .= ' --loglevel debug'; // . log::convertLogLevel(log::getLogLevel('teleinfo'));
$cmd .= ' --cyclesommeil ' . config::byKey('cycle_sommeil', 'teleinfo', '0.5');
} else {
log::add('teleinfo', 'info', '[runDeamon] Fonctionnement en mode 1 compteur');
Expand All @@ -209,7 +209,7 @@ public static function runDeamon($debug = false, $type = 'conso')
$cmd .= ' --socketport ' . config::byKey('socketport', 'teleinfo', '55062');
$cmd .= ' --cycle ' . config::byKey('cycle', 'teleinfo','0.3');
$cmd .= ' --callback ' . network::getNetworkAccess('internal', 'proto:127.0.0.1:port:comp') . '/plugins/teleinfo/core/php/jeeTeleinfo.php';
$cmd .= ' --loglevel info'; // . log::convertLogLevel(log::getLogLevel('teleinfo'));
$cmd .= ' --loglevel debug'; // . log::convertLogLevel(log::getLogLevel('teleinfo'));
$cmd .= ' --cyclesommeil ' . config::byKey('cycle_sommeil', 'teleinfo', '0.5');
}

Expand Down Expand Up @@ -289,7 +289,7 @@ public static function runProductionDeamon($debug = false, $type = 'prod')
$cmd .= ' --socketport ' . (config::byKey('socketport', 'teleinfo', '55062') + 1);
$cmd .= ' --cycle ' . config::byKey('cycle', 'teleinfo','0.3');
$cmd .= ' --callback ' . network::getNetworkAccess('internal', 'proto:127.0.0.1:port:comp') . '/plugins/teleinfo/core/php/jeeTeleinfo.php';
$cmd .= ' --loglevel info'; // . log::convertLogLevel(log::getLogLevel('teleinfo'));
$cmd .= ' --loglevel debug'; // . log::convertLogLevel(log::getLogLevel('teleinfo'));
$cmd .= ' --cyclesommeil ' . config::byKey('cycle_sommeil', 'teleinfo', '0.5');
} else {
log::add('teleinfo', 'info', '[Production] Fonctionnement en mode 1 compteur');
Expand All @@ -302,7 +302,7 @@ public static function runProductionDeamon($debug = false, $type = 'prod')
$cmd .= ' --socketport ' . (config::byKey('socketport', 'teleinfo', '55062') + 1);
$cmd .= ' --cycle ' . config::byKey('cycle', 'teleinfo','0.3');
$cmd .= ' --callback ' . network::getNetworkAccess('internal', 'proto:127.0.0.1:port:comp') . '/plugins/teleinfo/core/php/jeeTeleinfo.php';
$cmd .= ' --loglevel info'; //. log::convertLogLevel(log::getLogLevel('teleinfo'));
$cmd .= ' --loglevel debug'; //. log::convertLogLevel(log::getLogLevel('teleinfo'));
$cmd .= ' --cyclesommeil ' . config::byKey('cycle_sommeil', 'teleinfo', '0.5');
}

Expand Down
2 changes: 1 addition & 1 deletion ressources/teleinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def read(self):
content[name] = value;
else:
logging.error("TELEINFO------ ** FRAME CORRUPTED ! **")
logging.debug('** FRAME : ' + resp + '**')
logging.error('** FRAME : ' + resp + '**')
#This frame is corrupted, we need to wait until the next one
while '\x02' not in resp:
resp = globals.TELEINFO_SERIAL.readline()
Expand Down

0 comments on commit bf4d5ec

Please sign in to comment.