ylliX - Online Advertising Network
You Can Use Gemini to Build Google Home Automations, but Should You?

You Can Use Gemini to Build Google Home Automations, but Should You?



Smart devices, on their own, are nifty, but one-note. You can turn things on or off, adjust volume or brightness, or tell your vacuum where to go. But automations are what make smart homes awesome: you network your devices together, create dependencies, and set up if/this, then/that scenarios to automatically execute tasks. Building these automations always takes a little finesse, but now, Google’s Gemini AI offers to set up automations for you.

When I tested this new feature, I hoped it was for the layman who might be intimidated by the basic automation creation flow. What I found, instead, was a feature intended for advanced users who want to dive into using a new tool called the the script editor (Google’s tool for writing custom automations). Most users won’t have automations that require more than the standard home automation wizard that has always existed, meaning they won’t need to crack open the script editor or get Gemini’s help hereโ€”which is great, because the feature doesn’t seem fully baked yet. These features could become useful in the future, as complicated smart home automations become more powerful and necessary, but for now, I found Gemini unable to offer error-free assistance.

Google Home, Gemini, and the script editor

There are three key components to building automations through Google services. First, there’s Google Home. This is a home base for all your smart home devices, the status and settings of your wifi, and best of all, automations. If you want to turn on a lightbulb, you can do that by tapping a button or asking Google Assistant. But if you don’t want to ask, automations will turn the light on based on criteria you set up, like a time of day, activity of another device, or a certain phrase you tell Assistant. You simply have to create an automation in Google Home telling it to do so, and there’s a straightforward setup wizard here to help you do so. Google Home recently added a desktop app, which is still in beta, but you can create automations and control your smart home from your computer, as well.

Gemini, on the other hand, is Google’s large language model and AI chatbot. The company has been integrating Gemini into all sorts of Google functionality, including a chatbot available on iPhone and Android. Right now, it’s most useful as an assistant that opens in the sidebar of most Google apps and can respond to real language questions. It can already do this in Gmail, finding content or tightening up the language you use, and Google Meet, taking meeting notes on your behalf. Theoretically, using Gemini to create automations for users would be a great feature, but it turns out it is actually more complicated to use Gemini than to use the current wizard.

Most Google products, including Sheets and Docs have had a script editor called Apps script for a while, but it’s not used often. It’s a feature targeted mostly for advanced users that allows you to create your own scripts, or paste scripts other people have written to do things your products don’t do out of the box. The new script editor for Google Home is similar. Although it uses a different language (YAML) than Apps script, the purpose is the same: allow advanced users to do more than the automation wizard allows.

How to set up automations in Google Home

The current user flow to build automations in Google Home is straightforward for simple tasks, but any tasks that eclipse what the current Automations wizard will do, could, in theory, require the script editor. (For the record, I’ve been using Google Home prolifically for five years and never once needed to use the script editor for even one of my wacky automation ideas). If you’re not a coder, the script editor in any Google product can be intimidating, so having Gemini handle this for you is a big lift, if it worked. But that wasn’t my experience.

To get Gemini’s help, you’ll need to sign up for services

Now, some notes. This does, in fact, require that you give Google permission to activate Gemini on your phone. I’ve been avoiding this since I activated my new Pixel a few weeks ago, but for the purpose of this article, I decided it was time to dive in. While endlessly useful, Gemini isn’t free in some cases. You’ll also need to join the app’s public preview to access the script editor. This was a few simple steps. Open the Google Home app, go to Settings, and then click on Join Public Preview.

public preview activation on Google home

Go to settings, and then activate public preview
Credit: Amanda Blum

Accessing Gemini is easier on the desktop app

Google calls this assistive lift from Gemini “Help me script.” To be abundantly clear, using the script editor on any day is not for the weak. Its a code language, YAML, is technically easier to write than other code bases like Php, Perl, Ruby, or Javascript. However, if you don’t know YAML, there’s a learning curve, and it is still code. Personally, I’d expect that if you pay for this Gemini assistance, you wouldn’t need to know YAML. That is not the case, I found.

Once you’ve signed up for preview, and Gemini is activated, you can open the script editor on your Google Home app or the web interface.

How to activate the script editor in the app

How to access the script editor on the Google Home app
Credit: Amanda Blum

This was my first time using the web interface, but since there’s copying and pasting involved, I’d suggest using it over the app. Plus, Gemini didn’t want to pop up on the app for me, so all the more reason to use the desktop interface.

Script editor home with Gemini pane

On the right hand side of the script editor, you can see the Gemini prompt
Credit: Amanda Blum

Most scripts by Gemini had errors

To start, I asked for help with simple automations that could be done in the wizard: tell me when it’s sunset every day. This automation doesn’t involve any devices, simply an out-of-the-box piece of data that Google already has. (“What time is sunset?”) Gemini spit out the code, and instructed me to copy and paste it into the script editor and validate it, but warned it already had an error. The script editor confirmed this as well, and identified the problematic line of code. A mouseover explained why I was seeing the error so I could correct it.

This happened over and over, where I would ask Gemini to create a script for something relatively easy (“turn on backyard lights when backyard camera detects activity”) and I’d get errors. Sometimes, the script editor could explain them, sometimes it could not. But Gemini, an AI chatbot designed to answer questions from users, had no function to help me solve the problem. Some mild digging on the internet was unhelpful, since each kind of device has different possible commands, and everything I read suggested the commands Gemini wrote should work. Remember, I hadn’t asked Gemini to do anything difficult yet, all the automations I asked for would have been very easy to do in the regular automation panel, without the script editor or Gemini.

errors in the script editor panel

Errors are shown as rollover tips in the script editor
Credit: Amanda Blum

If you’re successful with the script editor (I was able to clear some errors with a little help from the tool tips and some research), you save the script, and then it appears in your list of automations. You can turn it on and off at will, and when it is activated, you’ll see it in automation history.

Who is the script editor and “Help Me Script” for?

As I said, I’m an automation enthusiast, and I have a ton of them running. I also code. Despite both of those facts, I maintain that most people won’t need the script editor, but there are some examples where it would make sense. Anything with a double dependency would use the script editor. For instance, if I want a fan to turn on when it’s over 80 degrees, I can do that in Google Home. I can also have the fan turn on if it’s dark out. What I can’t do is require both circumstances, unless I’m using the script editor. Additionally, the script editor would let me set conditionals, like, “if it’s over 80 degrees, turn on the fan, but if it’s under 60, turn on the heater.”

You can hack these situations together using many automations that aren’t connected in Google Home, but the script editor would be a more efficient way to do so in one clean user flow. Unfortunately, to make that happen, you’re still going to need to learn YAML for now, because Gemini’s help isn’t going to do your homework for you: For the most part, and for most people, Gemini just isn’t ready to script your automations for you.





Source link

Leave a Reply

Your email address will not be published. Required fields are marked *