Announcement

Collapse
No announcement yet.

Lastvoicecommand

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Lastvoicecommand

    Help desk has requested I post the question on the board.

    I'm using an android speaker client, the voice commands are working fine if i keep the event trigger as a simple phrase. ( " garage lights dim " ) if i try to add some dynamic to the trigger it does not work, even when the log recognizes the command. ex:
    garage [lights] dim
    Even when the log recognizes this command and shows both "garage dim" and "garage lights dim".

    the second part of the problem is when I'm using LastVoiceCommand or LastVoiceCommandRaw, both of these commands return nothing. according to the help documentation they should return a string, however I am unable to get anything from either one.

    just to keep things simple.

    Sub Main(ByVal Parms As Object)

    Dim LCmd
    LCmd = hs.Lastvoicecommand
    'or even using hs.LastVoiceCommandRaw
    hs.writelog("Test","VR: " & LCmd)

    End Sub

    Returns nothing where the variable should be.

    If anyone could please help on either or both of the problems i would appreciate it as the help desk is telling me things like:

    1. The command appears to be "broken".
    2. The help documentation is not accurate and is a copy from HS2 so the help on this topic needs updating.
    3. VBScipt scripts(which you posted) are no longer supported.

    Sorry for the long post and minor rant but this task has been daunting ( for some strange reason )

    #2
    Here is one of the VR strings that I use in weatherXML.

    (get|tell|check|whats|what is) (me|the|this)* (todays|tonights|tomorrows|sundays|mondays|tuesdays|wednesda ys|thursdays|fridays|saturdays|next) (two|three|four|five)* (days)* (temperature|weather|forecast)

    You use ( to group a choice of words. If you want the words inside the ( ) to be optional you put a * after the ). The pipe | is used to separate the word options.

    So for the string I posted you can say

    "get todays forecast"
    "get this Fridays forecast"
    "tell me the next five days forecast"

    Breaking it down by word groups.

    (get|tell|check|whats|what is) - you must say at least one of these words

    (me|the|this)* - these are all optional due to the *.

    todays|tonights|tomorrows|sundays|mondays|tuesdays|wednesday s|thursdays|fridays|saturdays|next) - You must say at least one of the these words.

    (two|three|four|five)* - these are all optional

    (days)* - This word is optional

    (temperature|weather|forecast) - you must say at least one of these.


    You want to use
    garage (lights)* dim


    I use hs.LastVoiceCommandRaw in the plugin.
    You can not have your events set to Confirm Voice Command though.
    Here is what happens if you do.

    You say "garage dim"
    LastVoiceCommandRaw gets set to "garage dim"
    You are asked for to confirm.
    You say "Yes"
    Now LastVoiceCommandRaw is set to "Yes" and your event does not trigger.

    I went round and round trying to get VR to work with my plugin before I figured this out. This is not new to HS3 as it worked this way in HS2 as well.








    --
    Jeff Farmer
    HS 3, HSPhone
    My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
    Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

    Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

    Comment


      #3
      Thank you for the info

      I tried with an * and got the same response.

      my event trigger is as follows

      garage (light|lighting)* dim

      this is an android speaker client, and I'm getting confirmation insde the log the the command is spoken correctly in either direction.

      "garage light dim"
      "garage lighting dim"

      the android client still informs me "I don't understand"

      and for the LastVoiceCommand/Raw when I get home from work I will try that out.

      Thanks again for your response

      Comment


        #4
        Try using garage dim only and see if it parses correctly. The "I don't understand" in this instance is HS3 isn't able to match the phrase exactly.
        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

        Comment


          #5
          Looks like VR is broke with Android clients.
          I spoke a phrase "today's forecast" and got the "I don't understand" response.

          I looked in the logs. Found this.
          RecognizeRaw today's forecast Parsed:today's forecast



          I copied the parsed phrase and put it as a trigger phrase. It still never matched. You might want to enter a Bug report.
          --
          Jeff Farmer
          HS 3, HSPhone
          My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
          Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

          Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

          Comment


            #6
            Thank you

            I can get a match if i use the exact phrase, if I inject salt ()*[] then it will not match.

            If I have an event trigger "Phrase Recognized" for today's forecast
            This will match on the android client

            If I have an event trigger "Phrase Recognized" for (today's|todays|today)* forecast

            This will not match, but will show up good in the log

            Comment


              #7
              Opps. I did a newbie mistake and forgot to activate the event when I was testing.

              My results match yours. An exact phrase will trigger an event via the Android HSTouch client. Any options will cause the phrase to not be matched.

              Via the speaker client on a windows install it will work with options added to the phrase string.
              --
              Jeff Farmer
              HS 3, HSPhone
              My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
              Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

              Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

              Comment


                #8
                Thank you

                I appreciate the confirmation, ( I felt stuck in the twilight zone ) this should not be a complicated process. I did file with bugzilla and am waiting for a response.

                For the LastVoiceCommand/Raw, did you use this with a Visual studio plugin project. I've seen some post where people refer to scripts in the script directory as a plugin.

                if so how would you go about that (I'm not completely new to the process I've written 2 plugins already to communicate with devices not supported by homeseer in VS 2010). I've created devices ( Via plugin development ) and was able to get control of the devices and get data from the devices, but where would VR fit into that process?

                Comment


                  #9
                  These optional parameters will not work with the Android client. The Android client creates a text file of the recognized voice and then compares that to the text in your event.
                  💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                  Comment


                    #10
                    From The Help Desk

                    Got a response from the help desk. / Sorry for the double post

                    "I asked the developer about this and the "alternative" options will not work with the Android system these will only work locally. The Android system captures your voice into a text file and does a verbatim comparison."

                    Does this also hold true for LastVoiceCommand/Raw, as the android sends a text file for compression there is technically no voice command.

                    How is it the log file shows Voice recognition with the spoken command then?

                    Comment


                      #11
                      Originally posted by Spooner View Post
                      Does this also hold true for LastVoiceCommand/Raw, as the android sends a text file for compression there is technically no voice command. I'll ask about this.

                      How is it the log file shows Voice recognition with the spoken command then? The text file is parsed and what is in the text file is echoed to the HS log
                      ...
                      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                      Comment


                        #12
                        Tested Devices

                        Tested on following devices.

                        IOS: same as android minus the "I don't understand"
                        Window 8.1 tablet: You have to install speaker client, but after install it works
                        Windows 7: I really feel no need to test should have the same results as Windows 8

                        LastVoiceCommandRaw seems to only pull the last voice command sent via windows speaker client. the android ( and i can assume IOS ) client's do not leave info in this command.
                        Last edited by Spooner; May 6, 2015, 07:25 PM. Reason: Additions

                        Comment

                        Working...
                        X