Jump to content

Emby with Amazon Alexa


chef

Recommended Posts

Recently I was able to obtain an Amazon Echo Dot.

 

I live in Canada, and we are always behind in tech releases from the USA. We still can't get an Echo here, and the Dot I have doesn't recognize any Canadian Information.

 

The Amazon Echo is the device by Amazon,  which hosts the Speech Recognition Assist Alexa.

 

Without getting too confusing with regards to how Alexa works we do have to understand some basics.

 

1. Alexa uses JSON.

2. Alexa uses Web Services to gather information.

3. The Alexa SDK is split up into two different parts: Alexa Skills Kit and Alexa Voice Services.

 

Note: The Skills kit is what we would need to use in order to collaborate with Emby.

 

4. The Alexa Skills Kit (or ASK) is broken down into two parts: 

 

4/a) What the user is requesting through Speech (Intents)

4/b) Accessing web services to retrieve information based user speech

 

5. Amazon.com  hosts web services (Not necessarily free).

6. Independent Web Services must have a signed Cert (SSL) for Alexa to communicate.

7. Alexa Uses Port 443 to communicate to Web Services

 

Highlighted is some of the Information which is detrimental to the possible collaboration between Alexa and Emby.

 

Things get difficult if a user thinks that Alexa and EMby are going to get along with a click of a button.

 

For each command (Skill) you teach Alexa there is a process to follow on the developer.Amazon.com/ASK website.

 

Then that skill has to point to information on a certified web service.

 

 

Here is where I believe the discussion needs to go from here if people are interested in having Emby and Alexa work together:

 

1. We need to build a SSL Certificate for a web service, or an outline for people to build their own. (OpenSSL... Don't know for sure.)

 

2. We need the Web service - to make calls to Emby and host Information.

 

3. Can we use Emby's ability as a Web Service to somehow allow library information to get back to Alexa?

 

4. How can we programmatically upload library titles through Emby API calls on the fly to Amazon Alexa Speech Command Lists. (Difficult maybe)

Could be a scheduled task in emby, or upload new command lists when the Library refresh finishes...

 

 

Anyone who is interested in this and has Web Service knowledge (ASP.net, or node.js)?

 

 

Here are some resources to catch up:

 

Developer portal at Amazon: https://developer.amazon.com

 

A Video explaining the ASK SDK: https://www.youtube.com/watch?v=F5rgOp7UkxU

 

I guess we'll have to see who is actually interested in the project, and how far down the Community Tracker List this thread gets pushed.

 

 

:)

Edited by chef
  • Like 2
Link to comment
Share on other sites

legallink

Depending on what you consider a web service, there may be some significant issues here.  In particularly, at a minimum, I assume it would require the following:

 

1. The user to use Connect because Dot wouldn't know the local IP address of the machine

2. It sounds like it would require a much more elaborate Emby web service than Emby currently offers (as currently Emby just serves as a redirect, and I would assume some sort of metadata would be required to be stored by Emby

 

However, I thought Alexa/etc could control your local computer, like iTunes and related, so I don't know why it would need a web service.  That seems odd to me.

  • Like 1
Link to comment
Share on other sites

Guest asrequested

Well you know I'm on board :D

 

I'll help in any way I can, but I have no knowledge in the areas you mentioned :(

Edited by Doofus
Link to comment
Share on other sites

Connecting your device to your Emby server would not be that large of a task.  It would just require a process similar to Emby Connect that the user would need to go through.

 

After that, though, it does get tricky because what you really want to talk to are your Emby Apps, not the server.  So, there would need to be some sort of configuration at the Emby Server end to map Alexa requests to specific apps - which could, theoretically, be controlled via our remote control API.  However, it then gets tricky again because that only works if the app is actually running at the time and the session information is transient (changes with each run of the app).

 

So, the long and short of this is that there will need to be a significant amount of work done at the Emby Server end to allow for the configuration of the connection between your server and your apps.  This will also have to be designed carefully.  Luke and I have discussed this but not started designing anything yet.

Link to comment
Share on other sites

And then of course, is Google Home ;)

 

Yes, that is part of the careful design - the basic infrastructure needs to support all of these.

Link to comment
Share on other sites

jasonmcroy

I own an Echo Dot and so far I am not that impressed. I am waiting for Google's AI Assistant to come to the Shield TV device and the Nvidia Spot to be released.

  • Like 1
Link to comment
Share on other sites

If is is of any help there is someone on the Squeezebox community Forum working on getting integration with the Logitech Media Server (music not video). Most of the work seems to be revolving around how to maintain security and not expose the server to potential malicious intervention. There are two threads, the initial discussion and then the ongoing development:

http://forums.slimdevices.com/showthread.php?106149-Alexa-and-LMS-new-lease-of-life

http://forums.slimdevices.com/showthread.php?106569-ANNOUNCE-Alexa-voice-control-(development-thread)

 

Worth reading through both as they could provide some insights into the problems. Development is fairly advanced although not ready for public release.

 

I have three Echo's and we are quite impressed with them so control of our music is a logical step forward.

Edited by Heuer
  • Like 1
Link to comment
Share on other sites

PenkethBoy

What do people expect/want from using Alexa - the obvious first step would be playing music from your library - although i believe Alexa is supposed to be able to find most music "online" - not yet having an echo yet to test i could be wrong :) but i have a phone that can do that simply and play it directly on the speakers of my choice rather than a single Echo speaker

 

At the other end of the spectrum i would guess telling Alexa to play movie X on TV Y would be a nice feature/option 

 

Finding out what the demand is for feature X,Y ,Z is also needed to focus the limited dev resource as i dont see a large demand on the forum for it yet - but that may change in time

 

 

I also like the sound of Google Home :) also waiting patiently 

 

also be mindful that if Amazon or Google do not get enough traction they have a habit of dropping products - fingers crossed this is not an issue  :blink:

  • Like 2
Link to comment
Share on other sites

Guest asrequested

Echo isn't DNLA, so playing music that way, isn't going to happen. The Emby skill would have to use Emby, directly. I don't want it to play my music, just tell Emby to play it. Nothing elaborate, something like, "Alexa, play "movie" with theater". Then have pause and stop function. For music it'll be complicated, because you'll have to specify artist then album or song and then the app you want to play it with. Unless there is a plugin that we can set a default app. Then you can just say "Alexa, play so and so". You can specify the wording in the Alexa app.

  • Like 1
Link to comment
Share on other sites

I was able to get Amazon Dot working with my Vera light, by creating... sorry... mimicking the Phillip Hue Bridge on my PC.

 

I used this library from GitHub: https://github.com/armzilla/amazon-echo-ha-bridge

 

Kind of a cool idea. The Service Instance is held on my Server Computer and tricks Amazon Alex into thinking it is talking to a Phillip Hue Bridge.

 

The Service instance then intercepts the voice Commands I make to Alexa and passes the RESTful command to my Vera Lite.

 

I now can lock doors, turn off lights and even control my electric fireplace with echo.

 

 

 

This is why I believe it could be possible to setup a web service which handles communication with Emby on your computer.

 

1. Alexa's voice commands can be uploaded to Amazon in a ZIP file (these commands are lists of Movie Titles etc, and their respective Emby IDs in a particular JSON format that the Alexa engine understands)

 

2. Alexa then requests the proper Intent function on the Web service, which would command emby to remote control the client.

 

 

I'm new to Web Services and not sure if it is possible to remote control emby from a web service.

 

I think a web service is necessary because all speech requests go to the Amazon Cloud to get sorted out, and sent back to either echo, or HA Devices,  music platforms, or all of the above..

 

The other side of the SDK is the Alexa Voice Services, which puts the Alexa bot into physical devices.

Edited by chef
Link to comment
Share on other sites

Guest asrequested

You know what would be cool? I don't think this is possible, but... I have a logitech hub, and I say "Alexa, TV on" an she powers up the devices I setup in the harmony software. So here's the cool part. It would be amazing if when everything was off, I could say "Alexa, play so and so" and she would turn the system on, and then play the request. That's gotta be so complicated to set up though, right?

Link to comment
Share on other sites

jasonmcroy

You know what would be cool? I don't think this is possible, but... I have a logitech hub, and I say "Alexa, TV on" an she powers up the devices I setup in the harmony software. So here's the cool part. It would be amazing if when everything was off, I could say "Alexa, play so and so" and she would turn the system on, and then play the request. That's gotta be so complicated to set up though, right?

 

I was going to make a similar post. I also have the Harmony Hub and have been playing with turning things on using the Harmony Skill. Alexa messes it up sometimes though, which is what I run into with the Dot quite often. I sometimes have to repeat my commands. It is nice though to just say "Alexa, tell Harmony to turn on Shield" and my TV comes on, Receiver and Shield player (when it works). 

 

While watching a movie on the Shield I can also say "Alexa, tell Harmony to pause my Movie" or "Resume my movie" and that works quite well. It doesn't have any skills to allow anything like "open Netflix" or anything like that though. That would be nice.

Link to comment
Share on other sites

Guest asrequested

Simplify the commands. There's less she has to understand. Like "Alexa, shield on", and "Alexa, pause shield".

Edited by Doofus
Link to comment
Share on other sites

PenkethBoy

an alternative video that gives you a how to do it example which you might find useful 

 

  • Like 1
Link to comment
Share on other sites

an alternative video that gives you a how to do it example which you might find useful

 

https://www.youtube.com/watch?v=zt9WdE5kR6g

This is certainly worth the watch. Thanks for finding it. This fella has filled in a couple blanks I had about deploying a lambda function in AWS.

 

I can see what ebr was talking about now above in the thread.

 

I'm not sure emby remote control functions are available... well... remotely.

 

That would involve some new sercurity access to the server program.

 

If lambda functions could access the emby API that would be amazing.

 

In the mean time, could the average person create an AWS account and write their js code? Not sure...

A complete template would have to be built so that it was possible.

Link to comment
Share on other sites

mediacowboy

I've been following these type request and I am honestly shocked, granted I don't own either, that someone hasn't created a proxy to trick these devices into staying on house. I know back when I had a iPhone I saw all kinds of cool proxy to trick siri into thinking she was talking to a apple server when in fact she was talking to your computer. Anyways I'll keep following these and see what happens as I hope to automate my house at some point.

Link to comment
Share on other sites

OH THE HUMANITY!!!

 

After learning all about node.js, completing several tutorials! Made an AWS Amazon account specifically to get good at writing Lambda functions! Built the Lambda function and deployed it!

BUT!!

There are no Amazons Servers close enough to my little frozen part of the world to actually use it!

 

That just takes the cake! Why is Canada so behinde the times??? Our brains are frozen half the year... That's why.

 

I admit defeat... Until the echo is released in Canada. :(

Edited by chef
Link to comment
Share on other sites

Maybe someone can test it, for you?

It was a basic hello world style function to list family members in my home. Simple. Just to get the hang of it.

Link to comment
Share on other sites

Guest asrequested

It was a basic hello world style function to list family members in my home. Simple. Just to get the hang of it.

 

Ah! Right! And I guess to develop the emby platform, you'd need to be able to implement and test, regularly

Link to comment
Share on other sites

CBers

I was able to get Amazon Dot working with my Vera light, by creating... sorry... mimicking the Phillip Hue Bridge on my PC.

 

I thought Alexa worked with the Philips Hue lights "out of the box" ??

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...