Enable Google Assistant in Windows - python

I am trying to do some automations using Google Assistant. Is it possible to integrate the mobile google assistant app with python? For example if I say open edge in my PC in my mobile and I am able to fetch the same from a python app running on my PC, I can create custom actions based on that. Can anyone help me with how can that be possible?

At the highest level, Google Assistant is able to be programmed using "Actions on Google". Actions on Google takes your audio input and drives a service called "Dialog Flow". Dialog Flow parses your natural language looking for an "intent" (what you are asking for). When an intent is matched, a "Webhook" can be called to process the request.
If you have an application running on your Windows PC that is listening for an incoming REST request and can process the payload content, then the Webhook specified in Dialog Flow can be used to invoke your Windows application (REST app) that can perform the work.
Wiring all this up does take some skills. Some good reading to start with would be:
https://assistant.google.com/
https://www.youtube.com/channel/UC1EXoqvR9VrmWnM9S47SfVA
https://cloud.google.com/dialogflow-enterprise/docs/

Related

How can I give input to my computer from my phone?

I am trying to create a python program that takes input of what homework assignments I have and stores all of that information so that I can send a notification to my phone when assignments are coming up. I want to be able to give input from my phone throughout the day and cant seem to find a way to interact with my script on my computer from my phone. Any ideas? Ps: if you know a way that I can send notifications to my phone that would also be cool.
It looks like you should create a classic client/server architecture. This is quite a big task. Your program running on your Windows computer acts as a server waiting for client (mobile application) requests. I propose to create a widely used REST API service using e.g. the Flask framework (server side) and use the Retrofit framework for the Android application.
Remember that when using the application on the Internet, you will have to ensure the availability of the server.
To send notifications from the server to the app, use Firebase Cloud Messaging

how to build notification pop up system from cloud to local computer

I'm trying to build a notification system that would be triggered initially from an api call made on the cloud, and should trigger a notification on one of my agents' pc (assuming running windows 10)
I'd like to do that in python as this is my knowledge
How should I structure this ?
The hardest part I can't figure out and couldn't find anything online is how to link the "local" pc to the "server"/cloud system (i'm using aws if that is useful) which would store the notification and dispatch them for each one of my agent.
My ultimate goal is to use a phone solution like aircall and to show the contact name of the caller through a notification popup in windows (aircall does offer that natively but can't access my contact datrabase so i'm trying to override the same function of displaying the caller name)
any help or suggesiton appreciated
One solution could be to build a simple ElectronJS frontend app that runs on your agents' computer AND a Python web server that listens to Aircall's Webhook events.
The web server would listen to call.ringing_on_agent Webhook events sent from Aircall and send a WebSocket push event (using Pusher for example) to your ElectronJS app.
The ElectronJS app installed by your agents would listen to WebSockets from your Python web server and would trigger a native Windows notification with the information you want (check the doc here).

How does raspberry pi receive trigger events from webhooks with IFTTT?

What I am trying to do is a quite basic task: to send event triggers from different services to Raspberry pi and do some tasks when these triggers are received, in other words to make "home automation".
I searched for many websites and links but all projects about ifttt and raspberry pi do the reverse job: raspberry pi posts a web request and another service receives this trigger and does something.
There are some projects to receive requests from google assistant on raspberry pi but google assistant posts a request which contains https://raspberry_ip_address:port/bla_bla which works locally, but I want to send request from my phone even if it is not connected to my home wi-fi.
I found that ProtaOS on rpi works for these tasks and there are some projects with node-red but I don't want to use both of these solutions, I want to write python code on my own.
Is there any api or library for getting requests from maker ifttt trigger events for Python?
Any help would be appreciated. Thanks!
If i understood your question correctly, You want to trigger something with your phone and then on raspi you will excecute something with that trigger generated from phone or any other device.
One way of doing this is to use an external api like thinkspeak or ifttt, for that you have to continiously read a particular field which your trigger will change
check this
Another way can be making your own api and using it both from your services to post data and your raspi to read data. Python Flask ia a very simple framework for building web api. For hosting there are many free services like heroku, pythonanywhere.
Flask 101 and Free Hosting!!!
Another way is to host your trigger listener in your raspi and port forward your raspi IP with Ngrok or any other services of such kind.Ngrok
Comment below if you have any other specific query.
Keep Hacking :)
There are a number of solutions I use in this scenario, depending on what the problem is and how frequently I need to push requests to the Pi. Here is my portfolio:
Get a 3G module like SIM900: https://www.amazon.co.uk/Aihasd-Quad-Band-Development-Wireless-Raspberry/dp/B01IBGDDVM/. This will allow you to receive SMS in real time and receive instructions with a push from your phone. I like this option for remote sensing and homes with a weak or unstable internet connection.
continuous calls to a server to check for updates (a method you sound familiar with). This works well if Wifi is good and data is cheap.
Web sockets: this allows a continuous connection to be kept open between Raspberry Pi and server, though it requires a stable and continuous connection. https://www.jaredwolff.com/raspberry-pi-getting-interactive-with-your-server-using-websockets/

Does Video.io support Xamarin forms

I want to integrate a video and text chat for web (python) and mobile (xamarin). The requirement is to make customers able to communicate across platforms i.e mobile to web and vice versa.
Mobile application will be developed using Xamarin technology and the website will be in Python.
Is video supported by both platforms?
Yes it does, check out the vidyo.io Xamarin sample on github - https://github.com/Vidyo/VidyoConnector-xamarin
Note that vidyo.io SDK runs on the client end. That means it will either run on your mobile device (using native libraries or in your case using Xamarin), or in case of web sites it will use javascript. You do not need to integrate vidyo.io SDK on the server side.
On your server, what you will need, is to generate "tokens" whenever your client device or website wants to connect to a video conference.
Since you are using python you can take a look at their sample token generator at https://static.vidyo.io/4.1.16.8/utils/generateToken.py
You can learn more about tokens on their website -
https://developer.vidyo.io/documentation/4-1-16-8/getting-started#Tokens

appengine endpoints tictactoe python on iOS example was written with java backend, how to make it work with python?

The tictactoe example from google endpoints have versions for both java and python. These can be used with javascript, android, and iOS clients.
I want to use python endpoint with iOS client, but the source code for the iOS client found on github was written for java backend. What do I need to change for it to work with python endpoint.
Python endpoint: https://github.com/GoogleCloudPlatform/appengine-endpoints-tictactoe-python
iOS client:https://github.com/GoogleCloudPlatform/appengine-endpoints-tictactoe-ios
Update:
I guess I didnt phrase my question clearly, within the python endpoint file for tictactoe. the request is routed to static/js/render.js and static/js/base.js. I was wondering how to do those things with another python file, without going through those javascripts.
I want to know: what is the 'message'(the win or lose data, and what kind of data) is send by iOS to the endpoint. And how would the endpoint find this 'message' and use the api.method to put this 'message' to ndb?
Once you have your backend ready, generating client libs for JS, Android or iOS is straightforward. Don't forget to run the same command in the terminal every time your API code changes (in order to update your client libs).
Here's a step by step guide on how to do it.

Categories

Resources