Hi, Now you can speech to Alexa and send the audio to speakers in smarthings, You just need an android phone. nothing more,
I´m not a Android User but, I have read somethig about google now, you can speak and google now search in web, but google now do not allow to add a new search engine.
Then I have installed Firefox browser, Firefox allows you to add a new search engine and allows to use the mic to search in the web, eureka!
In this way I have added a new search engine (the smarthings alexa connect url) and firefox allow me to speech (touching the little mic in search box) and send the text to smartthings app.
You can use Google Now with automate and tasker now.
“Automate” is free and very easy to config
“Tasker Now” is about 1 dollar
I have several cheap android phone with automate and tasker now, I can speak “Ok google, turn on” and smartthings turn on the lights in each location, you can ask for door status or who is in home “Ok google, who is in home?” and alexa respond the name of presence sensors in home
the smartthings app takes the text and use the text to alexa function to send audio to speakers.
V1.1
I have taken the text to control some switches. Now you can control devices on any place of world with your voice.
First you must to select the devices to control ex all lights in house
You can select the language command En and SP have been added but I need help to add some command in other languages
and that is all
in english you can say : turn on the dinning room lamp , set the family room light at 50%, turn off the kitchen lights
in spanish you can say enciende la luz de la cocina , apaga la lámpara de la sala., enciende la luz del comedor al 50%
for now you must to name the devices like you want to speak, in next release I try to find the device with wildcards
Try it
V1.2
Added music selector, ex “play love music on dining room speaker”
It use a radionomy music stations, you can create a natural voice name to every station, I have made a quick name like jazz, If there are more than 1 jazz station, a random jazz station will be selected.
You can change the name in code to your favorite station to be easily found
V 1.3
Added strip junctions and default type in device name, like “play love music on dining room” now you can use just “dining room” when command play is triggered instead “dining room speaker”
The same for lights, if you have a device named “the bedroom lights” the word “the” is removed, this is better for other languages like spanish.
Now you can add more tags to station to find them easily like “kids, disney,french,Disney in french”
I have added some levels, you can say “turn up the kitchen high” to set the volume to 90%
An autoplay in background to hear the message, I suggest first use the html mode and after change to a speaker, the html mode its better to control the house.
V 1.4
New list all available stations, show the station name and the friendly name
Languages
you can add your language in
input “language”, “enum”, title: “Language?”, required: true, defaultValue: “EN”, options: [“EN”,“SP”, “XX”]
/* You can use this example to fill your language commands */
/* s = start , e = ends , a = any , r = regex */
“EN”: [“on”: [“a”:[“turn on”,“switch on”],“e”:[“on”]],“off”:[“a”:[“turn off”,“switch off”],“e”:[“off”]],“setLevel”:[“r”:[“turn on.+\d+%”,“set.+\d+%”,“dim.+\d+%”]],“playTrack”: [“s”:[“play”,“start”]],“stop”: [“s”:[“stop”]]],
Example:
[“EN”,“SP”, “FR”]
“FR”: [“on”: [“a”:[“lumières”,“allumer”]],“off”:[“a”:[“éteindre”,“éteindre”]],“setLevel”:[“r”:[“allumer.+\d+%”,“fixer.+\d+%”,“baisser.+\d+%”]],“playTrack”: [“s”:[“jouer”,“commencer”]],“stop”: [“s”:[“arrêter”]]],
for the stations
“FR”:[“70s 4u”:“Seventies”,“80s 4u”:“eighties”,“A 1 All Disney On Wide Radius”:“enfants”…
the connect alexa have this options.
1.- You can select speakers or html player if you have not a speaker in smartthings.
2.- you can add a redirect url, if you use speakers the redirect its automatic,
Installation
1.- Install the smart-app
2.- You must to OAut the smartapp
3.- Select the switches and speakers you want to contol with voice
4.- Install Firefox in your android, I think all android have google now to speech recognition but if not , install google now.
5.- In the smartapp copy the web url and paste in firefox browser
6.- Add a new search engine in firefox browser link
7.- Set the web url page the default search engine
8.- in firefox, pres the mic in search box and speak “who is the president of usa” and press for search or speak “play music romantic in bedroom speaker”
9.- ready, the audio will be in your speakers or the html player.
I will add more detailed installation instructions, but I have not much time this days,
The web interface is very basic , the next week I will add some styles, but I want to release now.
If you have a better way to send the speech text , let me known.
The next step its a custom alexa settings.
If you like this project, please consider a donation to support it, thanks donation
https://support.cdn.mozilla.net/media/uploads/gallery/images/2015-10-09-21-21-15-7e95db.png