Announcement

Collapse
No announcement yet.

Google Home, Chromecast Audio, and IFTTT

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

    Google Home, Chromecast Audio, and IFTTT

    Opening a discussion about ways to integrate IFTTT with Google Home and Chromecast Audio (oh, and Homeseer too).

    We have many options and possibilities, including,
    1. IFTTT => Maker url to send voicecommand via MyHS
    2. Capturing voice command before it's executed and "improving" it by making it location aware (for example)
    3. Casting confirmation or other speech to the Google Home device that's nearest (maybe using castnow, or maybe using an always-on android device with autocast and tasker installed)
    4. Using api.ai to build a conversation action, with fullfillment via webhook to MyHS (I don't really know what I'm talking about here, but I think this is a possible thing).
    5. Other stuff

    Anyway, game on.

    #2
    Originally posted by baudi View Post
    Opening a discussion about ways to integrate IFTTT with Google Home and Chromecast Audio (oh, and Homeseer too).

    We have many options and possibilities, including,
    1. IFTTT => Maker url to send voicecommand via MyHS
    2. Capturing voice command before it's executed and "improving" it by making it location aware (for example)
    3. Casting confirmation or other speech to the Google Home device that's nearest (maybe using castnow, or maybe using an always-on android device with autocast and tasker installed)
    4. Using api.ai to build a conversation action, with fullfillment via webhook to MyHS (I don't really know what I'm talking about here, but I think this is a possible thing).
    5. Other stuff

    Anyway, game on.
    I worry about security of the Maker channel. I am hesitant to go down that route. I'd prefer to go down the route of the official IFTTT service or the 3rd party route.
    - Tom

    HSPro/Insteon
    Web Site
    YouTube Channel

    Comment


      #3
      Here's how to get a voice command from IFTTT to HS.

      IFTTT Google Home => Maker applet, with the following Maker URL
      Code:
      https://connected2.homeseer.com/JSON?user=[I]USER[/I]&pass=[I]PASS[/I]&request=voicecommand&phrase={{TextField}}
      And, quoting Rich

      Create a script named "check_vcmd.vb" and put it in the scripts folder. Whenever a voice command is given (from any source, including a mic or the Echo), your script will be called and the voice command passed. If you return an empty string, HS will continue to parse the command normally. If you return a non-empty string, parsing will stop at your script. Here is a sample script.

      Code:
      Function Main(parm as object)
      	hs.writelog("VCMD","Phrase: " & parm)
              'Do stuff
      	return "stop"
      End Function

      Comment


        #4
        Originally posted by tpchristian View Post
        I worry about security of the Maker channel. I am hesitant to go down that route. I'd prefer to go down the route of the official IFTTT service or the 3rd party route.
        Me too.

        Comment


          #5
          An interesting capability of the check_vcmd.vb script is that you can reissue a modified version of the voice command. For example, suppose you have a way to determine that a given command should have "living room" prepended to it (because you know where the command was issued, by some means). The following script accomplishes that.

          Code:
          Function Main(parm as object)
            hs.writelog("VCMD","Phrase: " & parm)
            try
              Dim webClient As New System.Net.WebClient
              Dim result As String = webClient.DownloadString("http://localhost/JSON?request=voicecommand&phrase=living room " & parm)
              hs.writelog("VCMD",result)
            catch ex as Exception
              hs.WriteLog("VCMD", ex.message)
            end try
            return "stop"
          End Function
          An obvious question is why the new voice command doesn't trigger the script again and send Homeseer into a loop. The reason is that the script is already running and Homeseer won't run it again. You get a "script already running" warning in the log, but the modifed version of the command runs just fine.

          Comment

          Working...
          X