So after going through most posts that offered voice control using Tasker + Autovoice + Sharptools, I couldn’t really find anything that accepted multiple commands as a single command (i.e “Turn the basement lights and chandelier on and turn off the kitchen lights.”)
So I made a tasker profile that does accept multiple commands and should theoretically work with natural speech (haven’t really done much testing yet.)
Once imported run the Recognize Devices profile once and save and exit tasker. The following should work using Ok Google:
Turn on/ Turn off, Turn thing on/Turn thing off as well as other combinations as long as it makes some sort of sense
Set thing to %. Basically you can control dimmer switches. Will work with multiple devices so for example “set living room and basement lights to 30%”
Run routine where run is the keyword and routine is the name of the routine. Before using routines please make sure you go into sharptools and refresh the routine list!
You can combine your commands any which way and they should work. I will be adding open/close soon.
If you want to help:
Simply test and see if you can improve on the existing tasks and profiles
Suggest commands and functions not included currently, when doing this please also include a command pattern sample (i.e: “Set living room light brightness to 30%” or “Dim the living room to 30%” etc.)
This is nothing overly complicated and anyone can learn. If you want to attempt something similar and need suggestions feel free to ask!
Hmmm, it’s something I am looking into as well. The problem is the way SharptTools allows routine executions, I can’t directly pass in a variable to do the job, so you would still have to go into the task and set for examples: If "%var" matches regex "routine"
To be honest, I’ve only used tasker fully for about 2 - 3 weeks now. I am just good at picking up on new programming and languages. It’s fairly simple filtering and checking.
You should have seen my first monstrosity; I tried figuring out which things are being referenced without populating an existing list… the first trial ended up doing so many weird things that I decided to simplify.
@ZebraBlinds, I think I may have uncovered a bug (or side effect). At least on my galaxy S5 running marshmallow 6.01 and Google now launcher. When doing a normal Google search, the Google browser does not stay on the result screen. It reverts back to the launcher. Are you seeing this same behaviour?
I believe that’s how AutoVoice works. In my setup (nexus 6p & oneplus2) saying Ok Google triggers the voice prompt, and I have AutoVoice capture the entire command, which causes what you see.
One possibility is to have a trigger such as home which activates AutoVoice. So the flow would for example be:
“Ok Google”
“Tell home to turn the living room lights off”
So home would trigger AutoVoice and a command without home will just run the Google Search. Another option (need to check if its possible) is set up an entirely new trigger word for AutoVoice, so instead saying Ok Google, you would say Hey Home or something similar.
I was able to fix it by letting auto voice do the Google now search. It’s been awhile since I played with these programs. At one time I had a separate profile for each device in my home. Not very elegant. Now I’m wondering if you can leave the search active but return to the launcher if the command is executed by your profile.
What I did was cancel the search to Google (like your original profile) and added the prefix command in autovoice to execute the profile. I’m showing my age here but I used “Hal” as in 2001. So now, I either press the Mic icon or say “okay Google” and then say “Hal, turn off the kitchen table light.”
I like Hal but with my voice, it’s not always recognized correctly. I could go in and add the replacement words but will probably change it to “Home” or some other HA term that is recognized every time.
I think I might have a better solution. Autovoice will run in the background and if it runs a task it will close google now and go to your main launcher. So essentially operation should be seamless. I’ll upload the new profile in an hour or two.
That would be ideal. I look forward to your work. I really need to learn tasker after seeing you duplicate all of the profiles I had in lollipop with just a few simple commands, and better because it will do multiple command at one time.
This is weird. It does not always work after a “regular” search and you have the Google results up. Try doing a simple search asking what a state capitol is and then ask it to operate a light. Let me know what you see.