Interested in Tasker, Voice Control and NFC for Android?

If so, you may want to tune in to today’s Developer Office Hours. :wink:

Can we get the Cliff Notes version?

Sure @chrisb.

@megapixel built a PHP endpoint app that gives access to the URLs we can use to trigger ST switches and locks (more device types to come). I think he plans to share that code soon.

Using these URLs, I demonstrated how to trigger an HTTP GET task in Tasker to toggle a light switch. I also demonstrated how to use AutoVoice for Tasker to control that light with my voice, and NFC Task Launcher to toggle the light with an NFC tag.

I hope to put together a detailed tutorial soon.

Very cool!!

Yes it was very impressive. Would it be possible to use this method to trigger apps?

I’m definitely excited about the possibilities. For those of you who watched the Office Hours, I tried voice control again afterwards and it worked great. I’m assuming it must have been a bandwidth issue at the time.

@coryds, good question. I’ve asked Danny and will let you know what he says.

@csader That be great. I’d love to be able to set up NFC/Voice actions to run my “Secure the Castle” app, which locks all the doors and turns off the lights at night.

@coryds I definitely see the value in being able to trigger SmartApps via Tasker.

In the meantime, I know this isn’t ideal but, you could create separate tasks in Tasker for each lock and light switch (which you’ll probably want to do anyway in case you want to be able to trigger a single device with Tasker), and just have them all trigger as part of one Profile. It’s essentially recreating the SmartApp using Tasker, but it would work.

Yeah I was thinking about that too, I just wasn’t sure if all those actions at once may flood/confuse the hub.

I’ll try it when I get home. How many devices would it trigger at once in your case?

16ish or so.

I don’t have that many, but I’ll try it with the 6 or so switches/locks I have and let you know how it works.

Danny (@megapixel) said he would try to chime in on the SmartApps triggering question. Sneak peak answer: Yes, it’s possible.

@coryds Rather than setting up one Profile to trigger 6 different tasks, I created a single task that sends an “Off” command to all switches and “Lock” command to my front door lock. Works like a charm, though they turn off and lock in succession rather than all at once. Is that what happens with your SmartApp?

The reason I went with a single task rather than separate tasks is because AutoVoice works best for normal device triggering with “Toggle” commands, rather than on/off. It works with any commands, but I like using Toggle because it makes it feel smarter than it actually is.

For example, there’s no reason I should be using a “Turn off the entryway light, dummy” voice command when the light is already off. By using a Toggle and having AutoVoice listen for the words “entryway light”, it simply switches the state of the light, which is most likely what I wanted to do in the first place.

However, in the case of the “Secure the Castle” voice command, where I actually don’t care what the current state is, I just want to send Off/Lock commands to everything, it made more sense to create a single task that sends Off/Lock commands to the 6 devices.

@csader Nice, that sounds good. What is the site you were going to to get the device links? Also, is there a way to control dim level with this?

@coryds I don’t know if I can share that, since Danny (@megapixel) wrote it. I defer to him. I know he said he’s working on a blog post to show how it was done.

I’m sure there is a way to control dim level. His response to me was “You can really send any commands.” I think it’s just a matter of building it into the PHP he used to display the URLs/buttons. He’s working on building in Thermostat controls now, but once he releases his blog post, I’m sure anyone could build in the ability to send any commands.

This is some interesting stuff going on here… can’t wait for it all to come together.

I also think I found a good use for Pressy!

I wonder if it’ll be possible to use pressy to unlock my phone and activate AutoVoice.

That sounds like a great idea if it would work @chrisb. In fact, you just convinced me to back the project. I’ve struggled finding a good way to bring up AutoVoice Recognize without having to unlock the phone first. Bummer delivery isn’t until March.

This is why I am really Interested in the Moto X and it’s always listening voice control. It has a low powered 16 bit CPU dedicated to it to make battery use insignificant. It only works with the default voice app for now, but with some trickery I bet that will not be hard to change.

You could just be walking through the house and say “Kitchen lights” and they flip on without ever even taking your phone from your pocket.

@coryds: Or you could have an Ubi in the kitchen!

I think you might want to have a slightly more complex command than just saying “kitchen lights” though. I recall a 30 Rock episode where the voice recognition was too good, and when characters said things like “mute” they muted themselves…

Haha, that’s true. The Moto X has such incredible recognition that people set it off by accident while using the trigger word in phrases all the time. You’d need a trigger word that you wouldn’t usually use in conversation.