Mycroft-MQTT-adapter - control Mycroft via MQTT

Hi there! I just finished a small but useful skill for Mycroft (open source voice assistant) and suppose someone may find it useful too. This plugin connected to MQTT server and allows to control some features of the Mycroft instance:

  • Expose current listener and speaker states as binary sensors (you can check if Mycroft listening command or speaking something, it may be usefull if you want, for example, to pause music when speaking command or listening response)

  • Mute microphone or speaker

  • Activate command listening

  • Send text directly to Mycroft as if you speaked it into microphone (It can be used for example to reuse some Mycroft skills in automation scenarios - like send “remind me about meeting named {meeting title} at {HH}:{MM}” automatically instead of using it via notification component - so you can ask Mycroft about time before meeting etc)

MQTT discovery also implemented, so all these sensors/buttons (except last one) will be advertised to your Home Automation server. As HomeAssistant user I used it’s MQTT discovery implementation, but as far as I know at least OpenHab can use it too.

I have some features in my TODO list, like adding ability to ask question and pass result to home automation server - so, for example, Mycroft will ask you if you want to switch on lamp when light sensor indicates there is too dark in the room, and some less interesting but still usefull features like exposing internal noise level measurement as a sensor or control speaker volume via MQTT. May be you’ll give me some interesting ideas?

You can find source code and installation instructions on the github - GitHub - jumper047/mycroft-mqtt-adapter: Skill for Mycroft Voice Assistant to be controlled via MQTT protocol.