Triggering KM with Voice Commands (via Amazon Alexa)

Has anyone here had success triggering macros with Amazon Alexa?

I have yet to buy one but am close, and being able to trigger KM macros would be a game-changer.

I found this article, but I’m concerned that it will take too many seconds between voice-command and trigger.


1 Like

Seems like a lot of points of potential failure in the process – the main one being an expectation that Alexa is always connected to your network. YMMV. I’ve found that even tight Alexa integrations with Hue and others that publish an API for handling Smart Home devices fail around 40% of the time and can have a noticeable lag. Routines that rely on IFTTT can have a trigger time up to 15 minutes or more. So a “Shut Down” might happen a long time after Alexa heard the command.

On the other hand, the KM iOS app is built to work on your local network and to integrate with KM desktop. No hacking required :smile: and like anything on iOS, you can talk to it. Or just use voice commands on OS X.


I would also suggest the language command on the Mac. Here in the video from 02:57 to see. Works with me very well. However, the Mac may not be so far away :wink:

1 Like

See, for example:

1 Like

Thanks for the tips here, I didn’t realize that Keyboard Maestro has an iOS app as well. I briefly tried QuicKeys iOS app but didn’t give it a lot of time and was just thinking a couple days about this and Keyboard Maestro having one. Kind of cool you can access via a web browser as well.

I’ve never been able to get iOS KM to “recognize” my Mac. Any short examples online of step-by-step instructions to get this to work?

Have you seen this

Make sure both devices (say, your phone and your laptop) are on the same network and that the network is not restricted. Over here, if the phone has joined a guest network, then Keyboard Maestro Control cannot "find" the laptop -- so don't use a guest network on either device. And also be sure that the web server is enabled in KM preferences.

Got it working, thanks. Now I’ll see if I can get it to work outside my local network!

Be very careful with this. You do not, in any way, shape or form, want someone outside to be able to touch KM, or you're effectively handing your computer over to the public.

Macros with the Public Web trigger should be designed to be safe even if someone else cause them. Things like skipping to the next song or turning a light on, or running a backup process or such, things that might be a mild nuisance at most if someone did it unexpectedly.

Your username and password should be secure and your password at least should be different to any other password - anyone with access your your Keyboard Maestro web server, and with your Keyboard Maestro web server username and password can run any macro you have created, which is likely to be potentially more than just a nuisance.

You might want to have a look at ha-bridge.

It is a application that you have running on your local network and allows you to create “fake Hue bulbs” that are seen by Alexa as standard Hue bulbs.

You can then set the fake bulbs to do whatever you fancy (http requests, execute a script, linking to Harmony remotes, Home Assistant, Domoticz, Vera, MQTT and more)

So you could use the web server in Keyboard Maestro and trigger macros with urls (http://localhost:4490/action.html?macro=5D065B83-AAAA-AAAA-9D20-ASASASASASAS&value=)

It does run on the mac (I have mine on a Pi to have it always on) but is easy enough to get started and have an explore.

It really is very useful as it lets you create virtual switches for almost anything :slight_smile:

1 Like

Very cool. I’m not a programmer so this is a bit above my pay grade, but thanks for sharing regardless.

I’m also curious if anyone has successfully used Amazon’s IoT Buttons to trigger KM events. The ha-bridge mentioned above requires a physical Alexa device.