I have a google home speaker, and I can issue commands like what's the time or play some music, but I'd like to be able to define my own responses to certain commands, like
how many appointments do I have today
or
are there any cancellations
I would like the above commands to a run a script where I can either run a web-service, or pull information from my SmartThings hub (that bit is optional) and respond with an appropriate response.
I've done a bit of research, and it seems that IFTTT, can do something similar, but I don't really want to be dependent on a 3rd party app, and if this can be done directly with Google.
I guess I'm looking for something similar to Groovy for SmartThings, where I can write Smart Apps.
The API to develop your own commands is known as Actions on Google. Broadly speaking, Actions will send JSON to a webhook that you control, and you can have it do whatever you wish at that point.
Related
I have a setup on a Raspberry Pi (with its native camera) that uses a cronjob to start an ffmpeg session with its output streaming to YouTube. I re-use the same stream key each time, which is written into my ffmpeg scripts. This all works perfectly each week, automatically starting and stopping at the desired time.
However, each week PRIOR to that livestream, I have to "manually" go into YouTube Studio and "schedule" a new future event. This is easy enough, since it lets me "reuse" previous settings -- all I have to change is the Title, date, and time. But I would love to figure out a way to automate that part of the process, as well. I assume it involves using the YouTube Data API, but I'm not well versed in API's, JSON, etc.
(I do have a strong Linux background, bash scripting skills, and general programming background.)
My final solution just needs to:
create the new scheduled event (maybe 12 hours prior to going live), with Title, Date, Time, "Unlisted" status, category, and so forth -- all the usual settings I do manually within Studio
retrieve the assigned URL for the upcoming stream (my script will then email that to me)
So, basically, I'm asking for help getting started with the API, or whatever method is capable of doing this. I would prefer to code it on the same Pi that does the ffmpeg encoding (although in a pinch, I could create the schedule from another computer, even Windows). Any examples would be great.
So far, all I have done is create my Google project, enable the YouTube Data API in the project, and create my API key. But I'm not sure where to go from there.
If Python as implementation language suites you, then I'd recommend to use the Google's APIs Client Library for Python.
Basically, this library is of good quality and (compared to other client libraries) simple to use. It will, for example, insulate you from having to deal explicitly with REST API calls, JSON and the like. Your code will also work under both GNU/Linux and Windows.
You may begin your journey by reading the official getting started doc: YouTube Live Streaming API Overview. Then I recommend absorbing these two important documents: Life of a Broadcast and Understanding Broadcasts and Streams.
Then go read, understand and run the following sample program from Google: create_broadcast.py. Of course, you'll have to adapt that code to your use case.
You'll have to exercise patience and perseverance (since you say you have no prior experience using the YouTube Data API). This API is non-trivial, but it'll pay off to you at the end of your (programming) journey (you mentioned to be versed in programming).
A special mention: for to be able to call the live streaming APIs you will first need to get acquainted with the things related to the so-called OAuth 2.0 authorization and authentication: Implementing OAuth 2.0 Authentication. There's an official document that you need absorb: OAuth 2.0 for Mobile & Desktop Apps.
A few more references: the live streaming API has an official documentation too. The main site documenting the client library is: Google API Client Library for Python Docs. Its source is public, to be found within the client library's public repo under the directory docs.
Also useful is to see the YouTube Data API's list of all instance methods.
First my apologies if this is a dumb question, or has been asked before. I've been searching for a couple of days and can't find an answer. This usually means I'm asking a dumb question. ;-)
I have a rPi and touchscreen in my kitchen; it displays helpful things like appointments for next 7 days, weather next 7 days, news headlines, etc. It's a web app I wrote in Angular 7, and it queries a NodeJS v8 backend which I also wrote. This was a hobby project to learn Angular and Node.
The Node app performs all interactions with the outside world, using Google's Calendar API to get appointments, Yahoo Weather API, newsapi.org. All of these integrations followed the same pattern -- obtain some apikey token, and use that when invoking some API method to get the requested data in a JSON wad.
Now, I would like to also get the grocery list from my Echo. After reviewing Amazon's Alexa API documentation, it doesn't appear that I can do this the same way as the previous three integrations I did. Must I really write a "skill" for this, though I never intend to invoke it on the Echo?
And if so, could you point to a decent sample? None of the samples provided by Amazon utilize the Lists API.
Yes, you must create a skill in order to receive access_token. And then - Out of Session Interaction feature might be useful.
I want to be able to capture both parties speech to text continuously in a call and send those strings off to be translated in real-time and then use twiml.say to speak the text back. I have not been having much luck with this and wondering how I should go about doing this.
The one user will make a call from their phone to the other support person which is at a web browser. I have the call setup and working fine, however I cannot find any documentation anywhere that is aligned with what I am wanting to do and wondering if it is possible or if I need to be looking down a different route.
Should anyone have any advice or has seen samples similar to this I would love to see them. Thanks!
Twilio developer evangelist here.
It's not currently possible to capture a two legged conversation with <Gather> and speech recognition. So you might need to look somewhere else for this functionality.
I am faced with the following problem. I get calls from my customers thou a voip line. And then i need to ask them who they are and look them up. All of this takes the most time in the phone call so i want to speed that up abit.
Basicly i want something that catches the caller id and sends it to a (web) server. Idealy i would put that at the phone server but that part is outsourced. So my question comes down to: Is there an easy way to do this? I can write my own software but i would like something of a voip client that does this for me since i would like the quick solution.
I searched the internet for a view hours but i am not that familiure with voip technologie so any help would be useful.
I don't know of any softphones could do it although I do have a hazy memory of another stackoverflow question where someone asked about sending a HTTP request triggered by an incoming SIP call. Unfortunately I can't find the question sorry.
Apart from softphones I do know of at least three ways you could do it on a server and there are probably more.
First there's my own software (doable with a free accounts and open source), sipsorcery.com, where you could receive the SIP call from your provider and in your Ruby dialplan send an HTTP request to your web server to get whatever info you wanted.
Secondly there's tropo.com who also have highly extensible dialplan type functionality and in lots of different languages. Their dialplans support sending HTTP requests.
Finally there's anveo.com who have HTTP tools available in their graphical call flow builder.
Open source softphones should be extendable, I know twinkle can be configured with scripts, should be well suited for your personal needs.
If this is something you want to centralize, create a SIP proxy to intercept all calls and do what it needs to. Sailfin is a robust development environment for something like this if you like Java.
Like a lot of businesses my employer is dealing with the new world of PCI compliance by avoiding the hard stuff and redirecting our customers to a third-party payment service. The process will entail the customer entering order details into our system but then being redirected to the merchant bank's payment service for the entry of those all important card details.
We wish to retain the services of some business that periodically fills in stages 1 and 2 of our order form with some dummy data, presses place order and sees that the URL it ends up at is in fact the one we're expecting, a bit like a bot or a web spider.
If it finds we've been clickjacked it would alert us by text message or twitter feed or whatever the cool kids are using these days.
Does anyone know of a service that performs this function?
No, I don't believe that there is a service like this. Usually companies with specific testing needs like this will use QuickTest Pro.
I'm still in the process of going through some suggestions and hammering out what exactly we're going to do but almost all the info I've gained has come from:
http://www.softwareqatest.com/index.html
A devastatingly useful site which provides more than answers to this functional testing scenario. There are a couple of Web-Based services which execute QA Functional Testing scripts against your site and send alerts and reports if the tests fail.
The two I had a quick look at were http://www.dotcom-monitor.com/ and http://www.watchmouse.com/en/
The latter service uses Badboy scripts in its tests so you can home brew them and then upload to their server for regular execution.