How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (2024)

Have you ever wanted your Google Home devices to announce when a door was opened, doorbell was pressed, or if a leak was detected?

Let me answer that for you. Of course you have!

In this guide, I’m going to show you how to control Google Home devices with SmartThings to create verbal alerts when something happens. To do this, we will be installing the cast-web api & integrating it with WebCore.

Even if you’ve never programmed anything before (or used Webcore), you can literally follow my guide step-by-step to get this setup. I wanted to give a huge shoutout to The Bearded Tech Guy for his inspiration!

Pre-Requisites:

In order to set this up, you will need the following:

  • Webcore installed using the Community Installer
  • At least 1 Google Home speaker (Either Google Home Hub, Google Mini, or Google Nest Hub)
  • Samsung SmartThings Hub

For this guide, I am installing it on Windows 10. There are also Windows, Linux, Mac, or Docker images available here: https://vervallsweg.github.io/cast-web/installation-cast-web-api/ The setup is basically the same no matter which option you choose.

Ideally, the device you choose should be on the same subnet as your SmartThings hub and stay on 24/7. If I were to do this setup again, I’d probably configure it on a raspberry pi, since my desktop PC gets rebooted much more frequently.

Step 1: Download & Install Cast-Web-Api for Windows

Download the Cast-Web-api from here: https://github.com/vervallsweg/cast-web-api-desktop/releases/tag/v1.2.1

Click the cast-web-api-desktop-setup-1.2.1.exe

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (1)

After downloading, double-click the .exe to install it like you would any other program.

On the blue Windows SmartScreen popup, click More Info > Run Anyway. This is expected behavior as the app is not code-signed.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (2)
How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (3)

It will take a few minutes for the program to finish installing. Once it’s finished, it will launch the cast-web api window but state that it is offline.

Step 2: Download Node.JS

Download the Node.js Windows installer from here: https://nodejs.org/en/download/

Install it with all default settings.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (4)

Step 3: Add IP Address to Cast Web API Settings

Open Command Prompt and type this to find your computer’s IP address. You will need that IP address for Step 4.

ipconfig
How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (5)

Step 4: Add IP Address to Cast Web API Settings

Search your computer for cast-web-api-desktop. Once it launches, click the gear to access the settings.

Next, add your IP address to the settings of Cast Web API and save.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (6)

The app should now to connected. To confirm, go to 192.168.68.105:3000 in a web browser. It should load like this:

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (7)
How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (8)

If you receive an error on this step, verify that:
1. Node.js is installed
2. Hostname has been changed from 172.0.0.1 to your computer’s IP address
3. Stop/Start and/or relaunch cast-web-api-desktop.

Step 4: Add 2 Device Handlers & 1 SmartApp

Open the Samsung SmartThings IDE: https://account.smartthings.com/

Device Handler 1: cast-web-device

Click My Device Handlers > Create New Device Handler > From Code tab. Copy & paste the code from here.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (9)
How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (10)

Click Publish > For Me. Then Save.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (11)

Device Handler 2: cast-web-api

Click My Device Handlers > Create New Device Handler > From Code tab. Copy & paste the code from here.

Publish > For Me. Then Save.

SmartApp 1: Cast-web service manager

Click My SmartApps > New SmartApp > From Code tab.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (12)

Copy & paste the smartapp code from here.

Do not save and publish just yet. You’ll need to edit 1 line of code.

Edit ApiHostAddress Line

Locate the line of code below. Replace the word “string” with “text. This change is needed in order for it to work in the new SmartThings app.

input "apiHostAddress", "text", title: "API host address", required: true
How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (13)

Next, click Create > Publish > For Me.

And then save your changes. You should now see the cast-web service manager published.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (14)

Step5: Add SmartApp to Phone

Now that we’ve successfully installed cast-web api on Windows 10, and added the two required device handlers and smartApp, it’s time to add the SmartApp!

Grab your phone and open the new Samsung SmartThings app.

Add SmartApp

Click the hamburger menu on the left to open the menu > SmartApps.

Click the + sign to add a new smartapp. Scroll to the bottom and locate the cast web – service manager.

Click the app to open the settings.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (15)

Step 6: Edit SmartApp Settings

If the API host address field doesn’t show up at this step, verify that you’ve changed the line of code in Step 4. (Scroll up until you find the green box.)

Enter API Host Name & Test

Enter your API Host address info from Step 3. Make sure to include the port number 3000

192.168.68.105:3000

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (16)

Click Test API Connection to verify the connection works. If you see Connected OK:200, you can continue.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (17)

Change Service Manager Log Level

Change the Service Manager log level to 0 so you don’t get a bunch of unnecessary log files. (You’d only want to change this to 4 for troubleshooting.)

Step 6: Discover Devices

Click Discover Devices. It could take up to 5 minutes to discover all of your Google Home devices, so just sit back and relax.

Select all the Google Home devices you want to add to SmartThings. (You can also add speaker groups during this step.) Once you’ve added the devices, click Next. Then, click Done to return to main SmartApps page.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (18)

Step 7: Change Device Names

On the SmartThings Home Screen, you’ll see a bunch of new devices + the Cast-Web api. You’ll notice they all have the same name which makes it hard to identify which device is which.

Wait a few minutes to see if they populate the room info automatically. (I waited about 15 minutes but they didn’t autopopulate for me.)

If you don’t want to wait, simply click a device and drag the slider volume up or down. You’ll hear the audible “volume click” sound.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (19)

The easiest way to do this for all your devices is to stand next to one of your Google speaker devices and scroll the volume up from the app. If you hear the volume click, you’ve found the correct device! Keep changing volumes on the different cast-web-api devices from the SmartThings home screen until you have them all labeled.

Then just edit their name manually.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (20)

Step 8: Install Webcore

For the rest of this guide, we are going to be using Webcore to create some simple automation rules for things such as “If front door opens, then speak a message aloud”.

Note: You can also use other rule engines such as SharpTools if you’d like.

If you’ve already installed Webcore, you can skip to Step 9.

If you haven’t, I recommend following the community installer instructions in Step 2 of my SmartThings garage door opener guide.

Once the Community Installer is installed, simply open the Community Installer smartapp & search for Webcore to install it.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (21)

Once Webcore is installed, click the + icon to add a new smartapp > Webcore.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (22)

During the install, you’ll need to give your Webcore instance a name and password. Document this somewhere; you’ll need it later.

Step 9: Choose Devices to Add to Webcore

Next, you’ll need to add devices to Webcore. I recommend only adding the devices you plan on using Webcore with to start.

My Google Mini Cast device is found under Which Actuator? and my button was found under a different section.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (23)
How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (24)

Once you’ve added all of your devices to Webcore, open the Webcore smartapp once again and register a browser.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (25)

Finally, go to https://dashboard.webcore.co and enter the code displayed on your phone. Then enter the password for your dashboard.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (26)

Step 10: Create New Piston

From the Webcore dashboard, create a new piston clicking New Piston > Blank Piston. You’ll need to give the piston a name and title.

For this demo, I creating a piston that says “If Office Button is pressed, have a Google Home Mini device speak text”

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (27)
How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (28)

Add IF Statement

Click Add Statement > Add Condition > add an If:

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (29)

Then click Add a Condition:

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (30)

Select your button and then change the dropdown to Button Gets Pushed. It should look exactly like this:

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (31)

Add THEN Statement

Click add a new statement under the THEN section. Click Add an action.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (32)

When the next screen pops up, change the location dropdown to your cast device. It should be under physical locations. Once all the devices you want are selected, click Add A Task.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (33)

Add Task Screen

On the Add A Task screen, search for “speak” and select the Speak Text option.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (34)

Enter a text value. This is whatever you want your Google Home device to speak once the button is pressed.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (35)

And finally – press Save and then Save the Piston. You can now press the button and it will speak exactly what you type in!

Text Value tips: Only use lowercase letters and no punctuation.

Wrapping Up

That’s it! You can now create an unlimited amount out automations using SmartThings, WebCore, and Google Home. If you think outside the box a little, you can think of TONS of ways to make Google Home devices “speak”.

For example, I have a Ring doorbell, so I create an automation that that says “If Doorbell is pressed, then speak “DOORBELL PRESSED”.Other fun automations might be:

  • If motion detected, then shout BOO.
  • If Door opens, then flicker lights on and off.
  • If window sensor opens after 10pm, then speak on bedroom Google Mini.

The ideas are literally endless. Hopefully this guide helps you get started!

My Favorite SmartThings Devices

Below are some of the SmartThings-compatible devices I’ve personally used in my home.

The full list of all zwave & ZigBee devices I use can be found on my Equipment List page.

Based on the information provided, it seems that the article is a guide on how to control Google Home devices with SmartThings to create verbal alerts when certain events occur, such as a door being opened, a doorbell being pressed, or a leak being detected. The guide involves installing the cast-web API and integrating it with WebCore. The article provides step-by-step instructions on how to set up the system on Windows 10, but similar steps can be followed for other operating systems as well.

Here are the concepts used in the article:

  1. Google Home devices: These are smart speakers powered by Google Assistant that can perform various tasks and interact with other smart devices in your home.

  2. SmartThings: SmartThings is a home automation platform that allows you to control and monitor various smart devices in your home. It acts as a central hub for connecting and managing different devices.

  3. cast-web API: The cast-web API is a software interface that allows you to control Google Home devices from other platforms or applications. It enables you to send commands and receive information from the Google Home devices.

  4. WebCore: WebCore is a rule engine or automation platform that works with SmartThings. It allows you to create complex automation rules and scenarios by defining conditions and actions for different events or triggers.

  5. Device Handlers: Device Handlers are software components that define how a specific device should be handled or controlled within the SmartThings ecosystem. In this guide, two Device Handlers are mentioned: "cast-web-device" and "cast-web-api".

  6. SmartApp: SmartApps are applications or programs that run on the SmartThings platform. They allow you to create custom functionalities and automate tasks by defining rules and actions for different events.

  7. API Host Address: The API Host Address is the IP address of the device running the cast-web API. It is used to establish a connection between the SmartThings platform and the cast-web API.

  8. Webcore Dashboard: The Webcore Dashboard is a web-based interface where you can create and manage automation rules using the WebCore platform.

  9. Piston: In the context of WebCore, a Piston refers to a specific automation rule or scenario that you create. It consists of conditions, triggers, and actions that define how devices should behave in response to certain events.

  10. Speak Text: "Speak Text" is an action that can be performed by Google Home devices. It allows you to send a text message to the Google Home device, and it will speak the message aloud.

These are the main concepts used in the article. By following the step-by-step instructions provided, you should be able to set up verbal alerts for your Google Home devices using SmartThings and the cast-web API integrated with WebCore.

How To Create SmartThings Voice Automations using Google Home - Smart Home Pursuits (2024)
Top Articles
Latest Posts
Article information

Author: Duncan Muller

Last Updated:

Views: 5583

Rating: 4.9 / 5 (59 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Duncan Muller

Birthday: 1997-01-13

Address: Apt. 505 914 Phillip Crossroad, O'Konborough, NV 62411

Phone: +8555305800947

Job: Construction Agent

Hobby: Shopping, Table tennis, Snowboarding, Rafting, Motor sports, Homebrewing, Taxidermy

Introduction: My name is Duncan Muller, I am a enchanting, good, gentle, modern, tasty, nice, elegant person who loves writing and wants to share my knowledge and understanding with you.