10

Using IFTTT, I am able to send POST REST requests, which then it is able to flip the lights on/off on my Raspberry Pi.

I can make a GET REST request (using postman) to get the value of the light, but I can't seem to figure out how to get google home/assistant to read that value for me.

Value returned from the GET REST request:

{
    "id": "sw1",
    "state": "off",
    "name": "Pi light"
}

This is the flow:

Question:

"Hey Google, is the light on or off?"

Google assistant answer:

"The light is turned on" or "The light is turned off"

I have searched everywhere, tried a couple things using IFTTT webhooks, but I just don't seem to be able to connect the dots.

How can this be achieved?

Bence Kaulics
  • 7,843
  • 8
  • 42
  • 90
MicroSumol
  • 201
  • 1
  • 4

1 Answers1

2

Well, it can be done by switching to Alexa ;-)

I'm in a similar fix: I have a weather station that can report current conditions with a JSON message in response to an HTTP request. I was able to write an Alexa skill that could fetch the message and compose a spoken response.

I picked up a Home Mini during the Christmas sale because I've read it does better at things like web searches, and am trying to do something similar with it.

As far as I can tell, that can't be done with IFTTT: you can send commands, but there's no "then that" service that will query and speak a response.

It looks like it can be done with Google Actions, but I can't be certain yet: I've had a hard time finding simple examples or tutorials to learn and/or crib from. It's annoying when makers name their products with common words like "home" or "actions": it's a request to the gods to make finding info about them as difficult as possible.

Look into the "Actions SDK" on Google Actions. Avoid Dialogflow: it's for making really complex interactions, and will make an attempt at a simple one complicated. Not that the SDK is all that simple, but it looks like the only option at the moment.

anonymous2
  • 4,902
  • 3
  • 22
  • 49