diff --git a/background.py b/background.py index e670c9e..5827fb0 100755 --- a/background.py +++ b/background.py @@ -13,10 +13,12 @@ def main(): "Main function" logging.basicConfig(level=logging.DEBUG) mycroft = MessageBusClient() - mycroft.run_in_thread() daemon = Daemon(config.OSD_URL, config.CAR_API_URL, mycroft) for plugin in plugins: daemon.register_plugin(plugin) + # Start mycroft after registering plugins so that an .on events by plugins + # get registered + mycroft.run_in_thread() while True: daemon.check_all() time.sleep(config.DELAY)