In this article we will discuss a simple way to make your Google Home speakers or displays announce anything you want from a Smartthings device action. You can use it to have Smartthings broadcast or make an announcement to any Google Home speaker or display, or all of them in your house.
For example, my kids are notorious for opening the fridge to grab a soda and then slam the door so it bounces open and stays open. There have been many times I come down and the door was open for hours. So I put a contact sensor on the door. However, that is worthless if it doesn't alert you. I used to have it alert me through the smartthings app, but again, that is only good if I am around to act on it. So I used this little trick to make a household announcement through my Google Home (Nest?) Speakers and displays around my house. So, the logic is "If basement refrigerator door is open for 1 minute, say -this- announcement / broadcast throughout all google home devices".
There are a few simple (once you're used to it) steps that need to be done in order for this to work. We will go into more detail below.
In SmartThings:
- Create a Virtual Switch
- Create 2 Routines (One for the switch on, and one for the auto off)
In Google Home app:
- Sync Devices
- Create an Automation
Let's get started.
Create a Virtual Switch in Smartthings
Open the Smartthings App and go to "Menu" on the bottom bar, then select "Labs". Scroll down until you see "Virtual Switch" and select it.
Now you see a list of your virtual switches. Click the + Sign at the top to add a new one and select "Switch".
The Add Virtual Switch menu opens. Now give it a descriptive name. I always start mine with the word "Announce" followed by what announcement it will be making in Google Home. For example, we will call this one "Announce Basement Refrigerator Door Left Open".
We will select our Home in Location and add it to the Basement in the Room section, select register on hub, and when everything looks right hit save.
That's it, we just created a virtual switch. Now let's set it up.
Create Routine for New Virtual Switch in Smartthings
For this to work we have to make a routine that will automatically turn this switch off. If we do not turn it off, the first time it runs the switch will just stay on, then we will never have something to trigger off of. It will make more sense as we work through it, trust me.
Back in the Smartthings app, find the new virtual switch, tap it (not the button, open it to see details), and then select routines.
Now hit the + sign on the top right. Click the device under the "if" statement and select "Turn on". This mean "If this switch turns on".
Now under "Then" click the switch and select "Turn off". We also want to select "Delay this action" and pick 30 seconds. This will give it enough time to trigger the Google Home announcement, but still have the desired effect.
NOTE: Another option is to skip this step and use the "Auto off" option in the next routine. However, I have found that for some reason the auto off option seems to not trigger sometimes. I can never figure out why, but creating a new routine and using the delay this action option seems to be a lot more consistent.
Now give it a name. I always prepend mine with "vSwitch" just so its easy to identify. So I am going to use "vswitch basement refrigerator door left open".
Now we have the auto-off automation, we still need to trigger it on when the basement door is left open (for this example).
Go to the basement door sensor in Smartthings.
Click Routines on the bottom bar and then select the plus sign to add a routine.
Now for the "If" we want to select "Open" and "Stays this status for how long?" set to 4 minutes. Obviously you may or may not need this depending on your application.
This is what the completed routine should look like.
I added the "Send notifications to members" so my wife and I will also get an alert on our phones. That is completely optional.
That's it in smartthings. Make sure the switch is off then close the app.
Sync Devices from Smartthings Into Google Home
Now we have to sync the devices from Smartthings into Google Home. We can do this by simply telling Google Home to Sync Devices. "Hey Gooogle Sync Devices".
NOTE: Sometimes when syncing devices Google Home will put it in the wrong room. After you sync devices go find your new switch and move it to the correct room if you wish.
Create an Automation to Make the Announcement Through Google Home
Open the Google Home App and go to Automations on the bottom bar.
Select + Add at the bottom to create a new automation. Select Household when asked what type of routine. I think it would work either way, but I always select Household.
Provide a name, I used "Announce Basement Refrigerator Door Open". Now we need an action to start the routing. Select Add Starter, then select "When a device does something".
Now find your newly created switch and click on it. Select turn on or off and make sure "Turn on" is highlighted. Under conditions ensure Time and Days says "Any time, any day" and click Add starter.
Now under Actions, select + Add Action. Select "Communicate and announce", then select "Make an Announcement". Here you can type what you want Google to Announce. I want mine to say "The basement refrigerator door was left open, please close the door".
Now, click "Play On". On this screen you can choose which devices you want to make the announcement on. For my needs I selected "Custom Devices" and then checked "All home devices in Vona House".
Hit done a few times and it will bring you back to a overview of your automation. Make sure everything looks right and click save.
That's it... Now you can trigger announcements on your Google Home from Smarttthings.
Conclusion and Logic
So, it may be a bit confusing still, especially if you are new to smart homes or programming. Now that we have all of this set up, this is the basic flow of logic:
- Refrigerator Door stays open for 1 minute, this triggers the virtual switch to turn on.
- Google Home see's the virtual switch turn on, and the announcement is triggered.
- The 30 second timer runs out in Smartthings and turns off the virtual switch (making it ready for the next trigger).
I hope that is clear. If not feel free to ask any questions below. I hope this helps someone not waste as much time as I did. 🙂
How to Make Google Home Announcements from Smarttthings
Join Our Newsletter
Categories
- Bash Scripting (17)
- Basic Commands (51)
- Featured (7)
- Just for Fun (5)
- Linux Quick Tips (98)
- Linux Tutorials (65)
- Miscellaneous (15)
- Network Tools (6)
- Reviews (2)
- Security (32)
- Smart Home (1)