In this video we will go over how to add Google Home to Samsung SmartThings as smart devices so that SmartThings can actually make Google Speak. This NEW method works even with SmartThings EDGE Drivers. Setting up this capability is a big game changer for your home automation rules, and can really add another dimension to SmartThings.
This will be accomplished by installing and setting up cast-web-api, which can be installed on several different devices such as raspberry pi, Windows, Mac, Linux, and even Android devices! For this video I will be going over how to install on a raspberry pi, but setup and automation tips and tricks are the same no matter where cast-web-api is installed.
- Edge Driver github: https://github.com/toddaustin07/googlecast
- Main cast-web-api page: https://vervallsweg.github.io/cast-web/
- Instillation instructions: https://vervallsweg.github.io/cast-web/installation/
- How to update cast-web-api: https://vervallsweg.github.io/cast-web/updating/
- Help: https://vervallsweg.github.io/cast-web/help/
- How to support the creator: https://vervallsweg.github.io/cast-web/donate/
- Preset information: https://vervallsweg.github.io/smartthings/cast-web-preset-generator/preset-generator.html
How to install node.js:
Speech Synthesis with Google TTS
The latest version of the cast-web-api no longer works with Google TTS, but it can be modified to get it to work with this Edge driver.
This involves four steps:
- Update the installed google-tts-api node module to the latest version
- Download a replacement file that uses the new google-tts-api module
- Copy the replacement file to a specific cast-web-api directory
- Restart cast-web-api
Before getting started with the commands below, go ahead and download the google-tts.js file in this repository to your Downloads directory.
Also, be sure you have Version 2023-01-04T01:23:15.134697978 or later of the Google Cast v0.1 Edge driver.
Note: this assumes npm is installed and current, and you already have the cast-web-api-cli installed.
The first cd command will be dependant on your particular directory structure.
cd ~/.npm-global/lib/node_modules/cast-web-api-cli/node_modules/cast-web-api npm i google-tts-api@latest cd lib/device/id cp google-tts.js google-tts.js_original cp ~/Downloads/google-tts.js google-tts.js cast-web-api-cli stop cast-web-api-cli start
For some, the first cd command above may need to be something like this:
- in which case you will probably need to specify ‘sudo’ in front of the npm and cp commands