Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use Python to build an action for Google Home [closed]

I am starting development of Google Home actions and would like to do so with the Python language instead of node js, provided in the getting started tutorial at https://developers.google.com/actions/get-started/.

I was going through the tutorial and was stuck at the point where it requires the use of node js for the demo facts app.

I need to use Python for this, as mentioned above. (I think web hooks are something of importance here. Not sure what they are.)

like image 468
Tushar Aggarwal Avatar asked Aug 31 '17 08:08

Tushar Aggarwal


2 Answers

The webhook is the callback that is called by the action. It will receive a JSON payload with all of the context data from Google Assistant. Google will send a POST request to whatever service you specify in the API.AI console as the webhook. It is then up to you to send a response back to Google so that it can 'render' that response on the client device. You can use flask or any other Python framework to process the POST request and generate your response.

Remember that Google Assistant can run on a variety of platforms and as such, you will want to look at the 'surface' parameter to specialize your response payload for the device you are responding to.

like image 100
AfroRick Avatar answered Sep 28 '22 10:09

AfroRick


Yes, you can use python for developing google home .I have used AWS Lambda and api gateway to map the web hook. If your code is too small you can code in the lambda inline editor itself but if it include additional import packages ,code it in your machine and zip it along with necessary packages .The steps are for notifications

like image 20
akhil reddy Avatar answered Sep 28 '22 10:09

akhil reddy