Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Do you know easy way to use "ok Google" on Android?


Recommended Posts

Posted

Was just about to post it here

Please login or register to see this image.

/emoticons/default_icon_smile.gif" alt=":-)" />

 

Please login or register to see this code.

Posted

By the way, in your setttings:

["Comm1"] = {"kast licht aan", "licht kast aan", "kast aan"},
 ["Comm2"] = {"kast licht uit", "licht kast uit", "kast uit"},

 

It is unnecessary to add a text variation that includes all the keywords already present in other variation, since the latest will trigger also the former.

 

i.e.:

"kast aan" is more generic than "kast licht aan" and "licht kast aan".

 

You can say "whatever kast otherthings aan and many more words", and Comm1 will be triggered.

 

In fact if you have a look to my settings:

 

["Comm4"] = {"radio off", "sonos off", "music off", "mute radio"},

 

My kid's favourite command is "Please switch that boring music off" ...

And it works...

Posted

Yes I changed that already.

 

Once again thank you for the code.

  • 3 weeks later...
Guest Roman
  • Topic Author
  • Posted
    • 4 months later...
    Posted (edited)

    Thanks Brick for the code. BTW I found a potential bug which took me some time to troubleshoot.

     

        ["Comm9"] = {"reception lights on"},
        ["Comm10"] = {"reception lights off"},
     

    Essentially given the above commands and with a spoken command of "reception lights off", both comm9 and comm10 will be triggered because "on" is also in "receptiON".

     

    On 5/17/2016 at 5:42 PM, Brick said:

    match = match and (string.find (speech, word) ~= nil)

     

    Due to the above string.find command. My workaround is:

     

    match = match and (string.find (speech, '%f[%a]' .. word) ~= nil) 

     

    Hope that helps someone.

     

    Edited by vblues
    • 3 months later...
    Posted

    Guys, this is fantastic thanks. I have a small problem though: whatever phrase I say, it's also looked up by Google on the web while it's being passed to Tasker. How can I disable this and make sure that if I say "open gate" I don't search the web for "open gate" and if I say "insert alarm" it doesn't try to set the alarm clock?

     

    Thanks a lot!!

    R

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...