Skip to content

Commit

Permalink
Merge pull request #46 from jeedom/beta
Browse files Browse the repository at this point in the history
Stable
  • Loading branch information
zoic21 authored Sep 24, 2024
2 parents 498e4f9 + 955bc02 commit b9fd0f8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions core/class/z2m.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,12 @@ public static function configure_z2m_deamon() {
}
}
$configuration['external_converters'] = $converters;
$configuration['advanced']['log_level'] = 'error';

if (log::convertLogLevel(log::getLogLevel('z2m')) == 'debug') {
$configuration['advanced']['log_level'] = 'debug';
} else if (log::convertLogLevel(log::getLogLevel('z2m')) == 'info') {
$configuration['advanced']['log_level'] = 'info';
} else if (log::convertLogLevel(log::getLogLevel('z2m')) == 'error' || log::convertLogLevel(log::getLogLevel('z2m')) == 'none') {
$configuration['advanced']['log_level'] = 'error';
}
file_put_contents($data_path . '/configuration.yaml', yaml_emit($configuration));
}
Expand All @@ -324,9 +323,6 @@ public static function deamon_start() {
$z2m_path = realpath(dirname(__FILE__) . '/../../resources/zigbee2mqtt');
$cmd = '';
$cmd .= 'ZIGBEE2MQTT_DATA=' . $data_path;
if (log::convertLogLevel(log::getLogLevel('z2m')) == 'debug') {
//$cmd .= ' DEBUG=zigbee-herdsman*';
}
$cmd .= ' npm start --prefix ' . $z2m_path;
log::add(__CLASS__, 'info', __('Démarrage du démon Z2M', __FILE__) . ' : ' . $cmd);
exec(system::getCmdSudo() . $cmd . ' >> ' . log::getPathToLog('z2md') . ' 2>&1 &');
Expand Down

0 comments on commit b9fd0f8

Please sign in to comment.