Jump to content

Emby with Amazon Alexa


chef

Recommended Posts

@@nxenos83 I feel that this change in the code is of great importance.

 

We have to use "NameContains" in the InternalItemQuerys.

 

I was having waaaay to many mis-recognition from the echo.

 

Example it was hearing the movie "Trolls" as "Troll", so it couldn't find any matches in the ItemQuery because it was looking for exactly "Troll"

 

Once I changed "Name = movieTitle" to "NameContains = movieTitle", there was better responses.

 

However! this might cause issues for movies that have sequels, like "Iron Man", and "Iron Man 2".

 

I'll let you know.

 

 

Edit: Nevermind, "NameContains" is sooooo much better!

 

I can ask for: "Age of Ultron"

 

and Alexa responds with "Playing Avengers: Age of Ultron"

 

I'm so excited! this is turning out awesome!

 

If you pass the entire BaseItem of the requested movie to the "PlayMovie" subroutine, you can fill out an entire string for Alexa to say about the item.

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

nxenos83

I hadn't thought about mutiple echo units. Oh boy...

 

So it would be better to have each unit converse with one emby device, unless it is request by the user to switch.

 

Luckily I have taken a weeks vacation from work! Lol!

 

I have work travel scheduled for this week = boring nights in a hotel = time to do some coding.

 

Unfortunately, it doesn't look like amazon is providing a way to identify the requesting device (despite feature requests for this dating back to 2015). Until the time comes that amazon adds it, I think the best bet is to store and segregate play to device per amazon account id. I believe the plugin config I had sketched out in the code I sent you could handle it.

 

I'm thinking I'll set up a different amazon account for each echo.

Link to comment
Share on other sites

nxenos83

@@nxenos83 I feel that this change in the code is of great importance.

 

We have to use "NameContains" in the InternalItemQuerys.

 

I was having waaaay to many mis-recognition from the echo.

 

Example it was hearing the movie "Trolls" as "Troll", so it couldn't find any matches in the ItemQuery because it was looking for exactly "Troll"

 

Once I changed "Name = movieTitle" to "NameContains = movieTitle", there was better responses.

 

However! this might cause issues for movies that have sequels, like "Iron Man", and "Iron Man 2".

 

I'll let you know.

 

 

Edit: Nevermind, "NameContains" is sooooo much better!

 

I can ask for: "Age of Ultron"

 

and Alexa responds with "Playing Avengers: Age of Ultron"

 

I'm so excited! this is turning out awesome!

 

If you pass the entire BaseItem of the requested movie to the "PlayMovie" subroutine, you can fill out an entire string for Alexa to say about the item.

 

That's great.  To deal with multiple returned items, maybe look into using the closest matching algorithm that you posted before. If you first filter by name contains and then run the distance calculation or the filtered group, processing time should be pretty low.

  • Like 1
Link to comment
Share on other sites

 

Still experiencing some Mis recognitions though.

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

maegibbons

@@chef very cool!!

 

I want it all!!  But especially emby to play my recordings!!!

 

Great work!!!

 

Krs

 

Mark

Link to comment
Share on other sites

I was racking my brain, as to the reason alexa was giving me such a hard time when asking for certain movies.

 

I couldn't figure it out.

 

Then it dawned on me. Alexa has a really hard time understanding the word "EMBY" (witch sucks)

 

I changed my skill name to "Home Theater" and I haven't had any issues since.

 

Wounder what to do about that?? The skill should most certainly be branded.

  • Like 2
Link to comment
Share on other sites

AdrianW

Alexa has difficulty with accents - I'm in Australia but have a mixed Aussie/Yorkshire accent - when I ask her to turn off the lounge light, she oftens says that there's no device called "lambs light".  ^_^

  • Like 1
Link to comment
Share on other sites

CBers

Still experiencing some Mis recognitions though.

Excellent work @@chef.

 

We all have mis-recognitions, even with basic Alexa commands :D

Link to comment
Share on other sites

@@nxenos83

 

You asked about my Arduino motorized blinds. I made this little video for ya! Yep the binds are a bit loud, but they only take a moment to open/close. :)

 

  • Like 3
Link to comment
Share on other sites

@@chef can you link up Alexa to the Arduino?

Yeah you can :)

 

using Vera home automation, you can.

 

Check out MySensors Serial Gateway.

 

It uses a 2.4 GHz transceiver which Vera understands.

 

All you have to do is use the HA Bridge Java based server (on github - it mimics Phillip hue bridge) which controls Vera from Alexa.

 

Not as complicated as it sounds.

 

Then you have to send http request to Vera from Echo (through the HA Bridge) and it sends out the command over your 2.4 GHz gateway to what ever Arduino device.

 

You could probably skip Vera and write a basic serial port program in c#, plug the gateway into your computer, accept endpoint data from an Alexa's custom Skill, and send gateway commands out through the PC instead of Vera.

 

Totally possible. I plan on getting it working by the end of the week lol!

:)

Edited by chef
Link to comment
Share on other sites

just had a thought while reading this thread, since emby does music, would "emby, play Sinatra on Kitchen Sonos" work?  if so Emby could take on another customer base with the Sonos community.   I believe Sonos has been working on a solution ith Echo, but with the blogs i have been readying they are having design/delay issues  

Link to comment
Share on other sites

just had a thought while reading this thread, since emby does music, would "emby, play Sinatra on Kitchen Sonos" work? if so Emby could take on another customer base with the Sonos community. I believe Sonos has been working on a solution ith Echo, but with the blogs i have been readying they are having design/delay issues

Does Sonso show up in emby DLNA devices?

 

If so, then yes that will work if the Sonos is named "Kitchen Sonos".

Link to comment
Share on other sites

Yes.

In that case it is very important for the plugin to check for clientCapbilities before it attempts to play any media to devices.

 

It is suggested on the emby wiki, that each app checks, but it isn't something that always is written in.

For Alexa it is important.

 

I wonder how clientCapabilities work on the server side? Will DLNA devices report audio only?

 

Gotta check that out for sure.

Edited by chef
Link to comment
Share on other sites

I wonder how clientCapabilities work on the server side? Will DLNA devices report audio only?

other than an @@Luke to get an answer, is there anything some of us can do to test/assist?

Link to comment
Share on other sites

"I wonder how clientCapabilities work on the server side? Will DLNA devices report audio only?"

 

the discussion was regarding dlna devices, specifically SONOS

Link to comment
Share on other sites

What is the specific question is it relates to sonos? e.g. how did you even get to client capabilities?

Sonos only plays audio right?

 

So, we would have to have the Alexa client say something when someone tried to play a movie on Sonos.

 

"That client can not play video".

 

I guess it wouldn't really matter, the Alexa client wouldn't do anything but stop listening because of the playback error (which would be caught in a try catch).

 

As long as the person requests the audio, it will work.

Edited by chef
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...