diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-11-06 21:01:32 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-11-06 21:01:32 +0300 |
commit | ac76b1c1153ae1f93d880b625112965d5661a680 (patch) | |
tree | b2e6569c2b41c821a64aac77ff547774e799ee81 | |
parent | 75ee161b6eb64cf19c8a9718d15047443f3e4ebe (diff) |
inverter_bot: fix monitor
-rwxr-xr-x | src/inverter_bot.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/inverter_bot.py b/src/inverter_bot.py index c2e138f..807710d 100755 --- a/src/inverter_bot.py +++ b/src/inverter_bot.py @@ -915,7 +915,7 @@ if __name__ == '__main__': inverter.init(host=config['inverter']['ip'], port=config['inverter']['port']) bot.set_database(InverterStore()) - # bot.enable_logging(BotType.INVERTER) + bot.enable_logging(BotType.INVERTER) bot.add_conversation(SettingsConversation(enable_back=True)) bot.add_conversation(ConsumptionConversation(enable_back=True)) @@ -928,10 +928,11 @@ if __name__ == '__main__': monitor.set_osp_need_change_callback(osp_change_cb) setacmode(getacmode()) - bot.run() if not config.get('monitor.disabled'): logging.info('starting monitor') monitor.start() + bot.run() + monitor.stop() |