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?

2
  • 1
    How do you imagine this working? What have you done to link Google Assistant to the Pi? Is it through IFTTT? Can Google Assistant do other IFTTT actions? Commented Jan 29, 2018 at 20:25
  • 1
    You can add Google assistant on IFTTT (then-Field) on the IFTTT android app so it automatically fetch data from internet and triggers assistant accordingly.
    – Adil Saju
    Commented Sep 27, 2018 at 12:24

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.