Mycroft Openhab Skill

I wanted to share with the community the mycroft skill I developed to integrate this project with openhab. The idea is based on alexa skill so items in OH will need to be tagged in order to be visible by the skill. I released the version 1.0 that support all the tags, just the tag Fahrenheit used together with the tag Thermostat has not been tested. The skill takes advantage of Openhab REST API so no any installation in OH is needed.
I couldn’t run many test so any feedback is appreciated together with any help to bug fixing or new developments.

Some sample commands are:.

- Hey Mycroft, turn on Diningroom Light
- Hey Mycroft, switch off Kitchen Light
- Hey Mycroft, put on Good Night
- Hey Mycroft, set Diningroom to 50
- Hey Mycroft, dim Kitchen
- Hey Mycroft, brighten Kitchen
- Hey Mycroft, dim Kitchen by 20
- Hey Mycroft, what's Bedroom temperature?
- Hey Mycroft, what's Bedroom humidity?
- Hey Mycroft, adjust Main Thermostat to 21 degrees
- Hey Mycroft, regulate Main Thermostat to 20 degrees
- Hey Mycroft, decrease Main Thermostat by 2 degrees
- Hey Mycroft, increase Main Thermostat by 1 degrees
- Hey Mycroft, what is Main Thermostat regulated to?
- Hey Mycroft, what is Main Thermostat tuned to?

The items are searched by label, so the items for the above examples could be:

Color DiningroomLight "Diningroom Light" <light> (gKitchen) [ "Lighting" ] {channel="hue:0200:1:bloom1:color"}
Color KitchenLight "Kitchen Light" <light> (gKitchen) [ "Lighting" ] {channel="hue:0200:1:bloom1:color"}
Switch GoodNight "Good Night"	[ "Switchable" ]	

Number MqttID1Temperature "Bedroom Temperature" <temperature> [ "CurrentTemperature" ] {mqtt="<[mosquitto:mysensors/SI/1/1/1/0/0:state:default]"}
Number MqttID1Humidity "Bedroom Humidity" [ "CurrentHumidity" ] {mqtt="<[mosquitto:mysensors/SI/1/0/1/0/1:state:default]"}

Group gThermostat "Main Thermostat" [ "gMainThermostat" ]
Number MainThermostatCurrentTemp "Main Thermostat Current Temperature" (gMainThermostat) [ "CurrentTemperature" ]
Number MainThermostatTargetTemperature "Main Thermostat Target Temperature" (gMainThermostat) [ "TargetTemperature" ]
String MainThermostatHeatingCoolingMode "Main Thermostat Heating/Cooling Mode" (gMainThermostat) [ "homekit:HeatingCoolingMode" ]

If items are modified in openhab, a refresh in Mycroft is needed by the command:

- Hey Mycroft, refresh the openhab items

Please find here the resources.


Hey @mortommy,

to get this thread discussion started: Could you please explain for me and others why I would want this Mycroft thingy? I already own an Amazon Echo :slight_smile: :wink: What would I need, does it offer more than Amazon Alexa?

Hi @ThomDietrich,
the Mycroft project embraces the spirit of open source, it is an alternative to Amazon Alexa and Google Home Assistant. Core and skills can be downloaded (also as raspberrypi image) so you can set up you own environment and with no need to buy the device. I have no experience with Alexa and Google Home so I can’t tell the difference in features and skills.

1 Like

We should add the mycroft program to openHABian then! Would you like to add a PR? (See example)


I was just looking at Mycroft (again) the other day and noticed that there was a skill for OH. Very nice. :smiley:

I’m pretty well invested in the Amazon/Echo ecosystem, but honestly I much prefer the idea of an open source platform… both from a privacy standpoint as well as flexibility. The sticking point is the hardware. The only far field mic array’s I’ve come across are the Respeaker and Matrix Voice. The pricing is just hard to justify when you can get an Echo dot for as little as $35. I also couldn’t find any verification that the Matrix would work with Mycroft.

It’s a shame (and surprise) that the Echo hardware hasn’t been hacked to be reflashed, or at very least repurpose the mics/speaker.

Anyway, enough of my rambling. Great job Tommaso!

1 Like

I just realized that one can freely define their own commands. See here.

(turn|switch|put) (?P<Command>on|off) (?P<Item>.*)

This is amazing. The options to control your openHAB system with this is just endless :open_mouth:

1 Like

We should add the mycroft program to openHABian then! Would you like to add a PR? (See example)

It is interesting, some test should be done to verify the coexistence of the 2 systems. I can add the PR and the feasibility can be evaluated.

Anyway Mycroft offers also Mimic, an alternative TTS.

coexistence? We just have to install mycroft alongside your skill as described in your very README :slight_smile: Should be a no brainer, right?

It should be tested.
In my current configuration I have another rasberry-pi dedicated to Mycroft because I used the picroft image, and in my first attempt I installed only Mycroft on a new server running ubuntu (it was ok).

Nice work @mortommy !
Glad to see, that there are efforts for voice-assistant implementations besides Alexa and Google.

// Offtopic: Another interesting voice-assistant is, which is IMO a perfect fit for the cloud-less idea of openHAB. There is already a MQTT-based implementation for HomeAssistant.

Have not tested it yet, but sounds like a great idea! I´ll catch up as soon as I find time and post some feedback here - maybe there are others, who´re interested in this.

1 Like

I have snips setup with OH. It is very promising project, but developers are slow when it comes to forum/help.

Latest Snips update broke microphone/speaker setup for me, as soon as it will be fixed I’ll share my setup. The biggest advantage of Snips is privacy, you don’t need any internet connection to use it. Also you can have custom replies instead of Echo’s OK.

If it’s MQTT-based it is application independent :wink:

I can only urge you to share your setup then :wink: When you were able to fix your issues let us know about it in a short tutorial! About the Tutorials & Examples category

oh, you´re right :slight_smile:

Me, too. Thanks @mortommy !

I’m sharing your thoughts.
Right now looking to get a mic array to start on Mycroft, so far my best option seems to be the Matrix Voice.
I don’t mind to spend some bucks, but would like to see some compatibility confirmation first.

Is there anybody out there to propose what mic HW we can use with Mycroft ?

Or any news on Echo/Home hacking ?

Just came across this. $25, said to get delivered in 1 month. There’s also a 2-mic version for $10.
@mortommy, do you think those python libs to run the ReSpeaker can be made to work with Mycroft and your skill ?
Do we need this snowboy keyword detection thing, or does Mycroft handle that part, too ?


I think it can work.

Just came across this10. $25, said to get delivered in 1 month. There’s also a 2-mic version for $10.

Hi did you at the end eventually buy the mic?

yes, both of them. But they require a specific kernel driver, so it does not work out of the box with a Picroft image. So far,I haven’t gotten them to work

Got that to work now (on a Pi3 w/ standard ‘stretch’ Raspbian), but I’m not content with the quality of recognition. Can’t tell if it’s Mycroft or the audio to cause this, though.
I’m about to try with a Bluetooth-connected mic/speaker combo.

Hey @kai, there recently was a Telekom announcement to develop a ‘Magenta speaker’.
Will you be involved there? And if so, any chance this HW and/or SW will become usable with OH ?

@mstormi Well, I could tell you but then I’d have to shoot you :stuck_out_tongue_closed_eyes: