HABDroid and voice activation

836 views
Skip to first unread message

Davor Fikais

unread,
Dec 27, 2014, 9:00:18 AM12/27/14
to ope...@googlegroups.com
Hello!

I was wondering if there is any way to send a voice commands over to OpenHAB without touching the microphone button in HABDroid? Some kind of a voice activation, similar to "Ok, Google", that will wait for the trigger word in the background and then activate listening for the voice commands? The voice recognition in HABDroid works extremely well, but it's not much of a use, if you have to go to the device and touch the microphone button.

Best regards, 
Davor

darryl vandorp

unread,
Dec 28, 2014, 11:17:04 AM12/28/14
to ope...@googlegroups.com
Sure, use the rest interface and post a value to the VoiceCommand variable. Should work.

Davor Fikais

unread,
Dec 28, 2014, 11:51:14 AM12/28/14
to ope...@googlegroups.com
Hello!

I'm not sure I understand what you're saying. As far as I know, HABdroid sends commands to OpenHAB. I just need way to activate listening in HABDroid with some kind of trigger word.

Best regards,
Davor

Dominic Lerbs

unread,
Dec 28, 2014, 12:02:05 PM12/28/14
to ope...@googlegroups.com
Hi,

it is currently not possible in HABdroid to do what you describe. Best option currently is to use the microphone widget, place it somewhere on the screen and select it whenever you want to trigger a command.
You could create in issue here and suggest that the feature could be implemented in a future release in HABDroid: https://github.com/openhab/openhab.android/issues

darryl vandorp

unread,
Dec 28, 2014, 12:36:55 PM12/28/14
to ope...@googlegroups.com
So, what i'm saying is to not use HABDroid. I'd use autovoice and tasker to capture a voicecommand and post the result to OpenHAB via the rest api. Then write whatever rules to process that received result.

You can setup autovoice to intercept google now as well.

Lots of tutorials and demo's out there (that don't specifically use OpenHAB but the concept is sound).

Davor Fikais

unread,
Dec 29, 2014, 6:28:40 AM12/29/14
to ope...@googlegroups.com
Hello!

I haven't tried it yet, but @dvand's suggestion looks promising, and I think that's exactly the thing I need. Thank you both for your help.

Best regards,
Davor

eric

unread,
Dec 30, 2014, 10:27:48 AM12/30/14
to ope...@googlegroups.com
Davor,
I'm on the same page as you - also looking for a "star trek computer" function. 

@dvand, thanks for the tip.  So you're using an Android phone's voice recognition capabilities (tasker, google now, auto voice plugin) to send commands to OpenHAB.  Is there a way to do this with a USB microphone and a Raspberry Pi?  I'm thinking of a good microphone that can be used from a distance.  If you're done with with an Android phone, what kind of range do you get?  How far away from the phone are you?

Some quick references I've found to help those interested in doing this (I have not tried this yet).

1.  Tutorial on tasker and autovoice
http://lifehacker.com/how-to-create-custom-voice-commands-with-tasker-and-aut-1282209195

2.  Tutorial on tasker and OpenHAB integration
https://github.com/openhab/openhab/wiki/Controlling-openHAB-with-Android

dvand

unread,
Jan 2, 2015, 7:46:46 PM1/2/15
to ope...@googlegroups.com
Only use my phone for voice I have no experience with mics.sorry.

Dieter Knueppel

unread,
Jan 3, 2015, 4:53:57 AM1/3/15
to ope...@googlegroups.com
Hi Davor,

you may have a look at amazon's "echo".
Don't know technical details, as it's not yet available in europe ...

Best regards,
Dieter

eric

unread,
Jan 5, 2015, 9:42:58 PM1/5/15
to ope...@googlegroups.com
Davor,
I've been playing around with Tasker and Autovoice, as others have suggested.  It works better with a faster processor.  However, the Autovoice "continuous mode" sometimes works well and sometimes doesn't.  There might be nuances in the settings that makes it work better, and maybe I just haven't figured it out.

When I'm in any of the Android home screens, it seems like the voice recognition works really well.  That is, I don't have to touch any buttons, just say the "trigger word" plus the "command word".  So something like "computer, bright" or "computer, dim".

As soon as I have Habdroid opened however, I run into voice recognition problems on the Android phone.  Autovoice seems to stop listening.  I wonder if it's because OpenHAB also accesses the microphone, and there's a setting in Autovoice that tells it how many seconds after other programs access the microphone to take back control of the microphone.  I wonder if each page page on Habdroid accesses counts as a microphone access.  In any case, if Habdroid has the focus, the continuous microphone feature is really finicky.

If anyone's solved this problem, please chime in.
Reply all
Reply to author
Forward
0 new messages