MessageBus
A Message Bus is mechanism for independent systems to communicate with each other using a set of Messages for common commands or notifiers. In the Mycroft ecosystem, the Messagebus is a websocket.
What is a Message Bus?
Message TypesMycroftSkill Interaction
Connecting Message handlers
from mycroft import MycroftSkill
class ListenForMessageSkill(MycroftSkill):
def initialize(self):
self.add_event('recognizer_loop:record_begin',
self.handle_listener_started)
self.add_event('recognizer_loop:record_end',
self.handle_listener_ended)
def handle_listener_started(self, message):
# code to excecute when active listening begins...
def handle_listener_ended(self, message):
# code to excecute when active listening begins...
def create_skill():
return ListenForMessageSkill()Generating Messages
Mycroft MessageBus Client
MycroftBusClient()
Message()
Sending a Message
Listening for a Message
Manually connecting to the MessageBus
Command Line Interaction
Generating Messages
Guidelines for Message Usage
Additional Support
Last updated
Was this helpful?