superadult.blogg.se

Home control for mac
Home control for mac








  1. HOME CONTROL FOR MAC SERIES
  2. HOME CONTROL FOR MAC MAC

This kind of rudimentary but highly engaging automation is sure to become more and more central to consumers as voice-powered interfaces gain ground.

home control for mac

As I’ve said in the past, I’m not a programmer by any means-before this weekend I had never spent more than a few minutes in Automator or writing AppleScript-so the learning curve is shallow.

HOME CONTROL FOR MAC SERIES

The beauty of it is that it’s incredibly simple to set up, easy enough that I’ve created a series of similar commands to play and pause the music, jump back and forward, etc. Granted, the setup is hardly elegant, to say the least. All of a sudden, the music I asked for in the kitchen is playing all over the house.

home control for mac

Then finally (whew), Automator also tells AirFoil to redirect that music to a pre-defined set of AirPlay speakers.

HOME CONTROL FOR MAC MAC

That action runs a bit of AppleScript to open Spotify and, through the brute force of repeating pre-recorded mouse locations and clicks (courtesy of an extremely unsexy app called Mac Auto Mouse Click), it opens the Spotify Connect menu and switches the playback device from Google Home to the Mac mini. The applet saves a text file in Dropbox, which syncs to my Mac to a directory with a folder action attached to it. Then I speak a custom phrase like “Switch tunes to home theater” (most music playback-related phrases are reserved by Google Home so you can’t just say “Ok Google, play music on my home theater”) to kick off an IFTTT applet. Using the Home’s built-in voice commands I search for and play the songs I want, just as you would normally do. This is the basic approach I use to enable Google Home to play music throughout my house, though there are more steps involved, and some janky workarounds. Once Automator is done, it can even clean up after itself by trashing the text file it used as a trigger, if you need. Basically, when the text files are added to these folders, they act as triggers for Automator actions, which can do tons of stuff, including run AppleScript code-which in turn can do even more stuff. When you set Dropbox to sync the resulting text files to your Mac’s hard drive, the key is to do so to directories that you’ve loaded with macOS’s Folder Actions feature. This is what it looks like to set up the IFTTT component: You can define your own custom phrases to serve as IFTTT triggers, which can then generate simple text files on a cloud storage service like Dropbox, which can kick off automated routines on your Mac.

home control for mac

It starts with the invaluable IFTTT service, which supports both Google Assistant and Alexa. What’s more interesting is that the basics of this solution could theoretically allow you to control almost anything on your Mac via voice-and it’s incredibly easy to set up. Over the weekend I strung together a series of tools that allow me to issue voice commands to Google Home (which I prefer slightly) to select music on Spotify, then switch the playback to the Mac mini that sits at the heart of my home theater setup, and from there pipe music to the various AirPlay speakers in the house. Persistence and hackery can overcome almost any tech roadblock though. This was the biggest of the complaints I wrote about last week in my comparison of Echo and Home. I have AirPlay speakers all over the house and I would like to be able to tell Alexa or Google Assistant to play a given song in my living room or my kitchen or in my office-or any combination of those locations-but that’s just not possible today. Asking Google Home or Amazon Echo to play any song you like from the Spotify catalog is extremely liberating-but until there is support for the Spotify Connect feature, these devices can only play back music on their own speakers, or on speakers to which they’re directly connected.










Home control for mac