nxenos83 52 Posted February 13, 2017 Share Posted February 13, 2017 Something just occurred to me. Maybe Luke could make sense of it. You know that page for emby connect where you can "add a server" What if people shared their server with someone who hosted a domain. Then the domain could sit as an Internet access point for anyone who wanted to login to their server through the domain. Then there could theoroetically only have to be one domain with an SSL with a list of severs attached to it. Then all we would need is the plugin. Does that make sense. I think we are thinking the same thing here. Endpoint in the skill setup would point to emby connect on port 443. Amazon offers a way to link the skill to an account; in the setup you provide a url for the sign-in page and send back an access token. Every request json will contain the access token along with an unique amazon id. The connect server would then need to validate the access token to find the user, and then forward on to the user's server. Link to comment Share on other sites More sharing options...
chef 3763 Posted February 13, 2017 Author Share Posted February 13, 2017 I think we are thinking the same thing here. Endpoint in the skill setup would point to emby connect on port 443. Amazon offers a way to link the skill to an account; in the setup you provide a url for the sign-in page and send back an access token. Every request json will contain the access token along with an unique amazon id. The connect server would then need to validate the access token to find the user, and then forward on to the user's server. Like the unique ID of the server, or emby user ID. Link to comment Share on other sites More sharing options...
chef 3763 Posted February 13, 2017 Author Share Posted February 13, 2017 Here is what I got. 3 Link to comment Share on other sites More sharing options...
nxenos83 52 Posted February 13, 2017 Share Posted February 13, 2017 I'm not sure how emby connect server works with routing but here's my assumption: After successfully authenticating, an access token is granted for the user id. The user id and access token are stored in browser cache or cookie. After selecting a server, record for the access token is updated with the serverId. With subsequent requests, DNS is resolved by using the userid + accesstoken from browser cache is to lookup the IP of the user's emby server based upon the serverid.. If userid + accesstoken are not found, dns resolves to the emby connect loggin server. If all of this is correct, we need to create a new endpoint for DNS resolution. Instead of using userid + accesstoken in a browser's cache to find the server's IP, we need to parse the alexa response to extract the access token, match the access token to a server id and IP and resolve to that ip. @@Luke, can you clarify any of this? Link to comment Share on other sites More sharing options...
nxenos83 52 Posted February 13, 2017 Share Posted February 13, 2017 (edited) Here is what I got. Awesome!!! Now the rest will come easy! We should work out all of the functions that should be made available and try to use a single plugin for google home integration. Edited February 13, 2017 by nxenos83 Link to comment Share on other sites More sharing options...
chef 3763 Posted February 13, 2017 Author Share Posted February 13, 2017 Awesome!!! Now the rest will come easy! We should work out all of the functions that should be made available and try to use a single plugin for google home integration. We'll also have to create a list of general intents that can be used, since people will have to create their own. Could be a text file DL that is cut and paste. I wish there was an easier way to request new movie names without having to compare run times of the media item. In the video above the last name mentioned is the recent Walkig Dead episode. It gets mentioned because it is over the 46 minutes run time comparison used to determine movies from tv episodes. Link to comment Share on other sites More sharing options...
nxenos83 52 Posted February 14, 2017 Share Posted February 14, 2017 (edited) I wish there was an easier way to request new movie names without having to compare run times of the media item. In the video above the last name mentioned is the recent Walkig Dead episode. It gets mentioned because it is over the 46 minutes run time comparison used to determine movies from tv episodes. Try using this. I haven't verified that it'll work, but it seems correct: var results = _libraryManager.GetItemsResult(new InternalItemsQuery { User = user.id, IncludeItemTypes = new string[]{ "Movie" }, MinDateCreated = DateTime.Now.AddDays(-15) }); Edited February 14, 2017 by nxenos83 1 Link to comment Share on other sites More sharing options...
chef 3763 Posted February 14, 2017 Author Share Posted February 14, 2017 (edited) Nevermind I see how to get ItemTypes now... Thanks I figured it out just as you posted. Edited February 14, 2017 by chef Link to comment Share on other sites More sharing options...
chef 3763 Posted February 14, 2017 Author Share Posted February 14, 2017 (edited) Okay so I got something cool. I look at user favorites/recommendation to determine how Alexa is going to speak. It decides from a dictionary<boolean, string> of common phrases, how to describe the new movies (or media...whatever...) to the user. Bool - user would like it or not string - common phrase to try and make the bot sound more human. kind of cool... not for everyone I'm sure. But, coding was getting tedious so I made up something fun. I have a feeling the dictionary could get rather large. Edited February 14, 2017 by chef Link to comment Share on other sites More sharing options...
Guest asrequested Posted February 14, 2017 Share Posted February 14, 2017 FANTASTIC! Well done Chef! Link to comment Share on other sites More sharing options...
chef 3763 Posted February 14, 2017 Author Share Posted February 14, 2017 Its all @@nxenos83 he's the mastermind. Link to comment Share on other sites More sharing options...
Guest asrequested Posted February 14, 2017 Share Posted February 14, 2017 Its all @@nxenos83 he's the mastermind. Well done to the both of you! Link to comment Share on other sites More sharing options...
nxenos83 52 Posted February 14, 2017 Share Posted February 14, 2017 Not to be out done by @@chef 6 Link to comment Share on other sites More sharing options...
Guest asrequested Posted February 14, 2017 Share Posted February 14, 2017 Nice! Have you guys managed playback control, yet? Link to comment Share on other sites More sharing options...
nxenos83 52 Posted February 14, 2017 Share Posted February 14, 2017 Nice! Have you guys managed playback control, yet? As long as emby device is running (appears in the Active Devices section), I've been able to send play state changes (play, pause, skip, etc), and was able to send "Watch {Movies} on Xbox" and "Listen to Pink Floyd Instant Mix on Receiver". Working on how to perform a fuzzy search instead of a direct comparison. Link to comment Share on other sites More sharing options...
Guest asrequested Posted February 14, 2017 Share Posted February 14, 2017 (edited) As long as emby device is running (appears in the Active Devices section), I've been able to send play state changes (play, pause, skip, etc), and was able to send "Watch {Movies} on Xbox" and "Listen to Pink Floyd Instant Mix on Receiver". Working on how to perform a fuzzy search instead of a direct comparison. Is that only on Google home? And what happens if there are multiple active devices? Edited February 14, 2017 by Doofus Link to comment Share on other sites More sharing options...
nxenos83 52 Posted February 14, 2017 Share Posted February 14, 2017 Is that only on Google home? Got that on both. I'm hoping that chef and I can create a single emby plugin that can handle both types of request the same. Defining Google api.Ai conversation and Amazon Alexa skills are very similar (there are some differences, but the in the end in both you define intents based upon sample utterances that include slots for the parameters. Only major difference that I can tell is that way the two handle re-prompting and maintaining conversation context. 3 Link to comment Share on other sites More sharing options...
Guest asrequested Posted February 14, 2017 Share Posted February 14, 2017 You guys are awesome! I very much look forward to what you come up with. Link to comment Share on other sites More sharing options...
nxenos83 52 Posted February 14, 2017 Share Posted February 14, 2017 (edited) Can we collectively come up with a list of commands that are expected from an Alexa/Google Home integration. Some ideas: INFO: Next Up Episodes New Movies New Albums What is being played / what movie is this/what song is/ etc Upcoming tv shows SERVER ADMIN ACTIONS: Restart Sever Scan Library PLAY MEDIA Play Movie [on Device] Play TV Show [on Device] Play Music Artist [on Device] Play Next Up [on device] Play Music Artist Instant Mix [on device] Play Album [on device] PLAY CONTROL Play Pause Next track Previous track Edited February 14, 2017 by nxenos83 Link to comment Share on other sites More sharing options...
Guest asrequested Posted February 14, 2017 Share Posted February 14, 2017 What about play TV show season x episode x? Or play episode by name? For example, "Alexa, play episode trouble with tribbles" Link to comment Share on other sites More sharing options...
gjviii 48 Posted February 14, 2017 Share Posted February 14, 2017 Can we collectively come up with a list of commands that are expected from an Alexa/Google Home integration. Some ideas: INFO: Next Up Episodes New Movies New Albums What is being played / what movie is this/what song is/ etc Upcoming tv shows SERVER ADMIN ACTIONS: Restart Sever Scan Library PLAY MEDIA Play Movie [on Device] Play TV Show [on Device] Play Music Artist [on Device] Play Next Up [on device] Play Music Artist Instant Mix [on device] Play Album [on device] PLAY CONTROL Play Pause Next track Previous track How about logging on a specific user? Link to comment Share on other sites More sharing options...
chef 3763 Posted February 14, 2017 Author Share Posted February 14, 2017 https://youtu.be/NVlWnxVpM5E Not to be out done by @@chef Whoo hoo! That's fantastic! I like how it explains how many episodes. For each episode. That is just awesome man! Google Home! Link to comment Share on other sites More sharing options...
chef 3763 Posted February 15, 2017 Author Share Posted February 15, 2017 (edited) What about play TV show season x episode x? Or play episode by name? For example, "Alexa, play episode trouble with tribbles"Oh that's a Star Trek nod! Nice! I wonder how to create slots programagically on amazons severs with all the episode names?? Edited February 15, 2017 by chef Link to comment Share on other sites More sharing options...
chef 3763 Posted February 15, 2017 Author Share Posted February 15, 2017 So if you slot in for each of your emby ready devices it seems possible to send commands to any of them (playback anyway... As mentioned above) I'm about to try playto commands and see how the code looks for that. I can't seem to see how to slot in titles for movies without creating a rather large intent though. Link to comment Share on other sites More sharing options...
Overseer 66 Posted February 15, 2017 Share Posted February 15, 2017 What about play TV show season x episode x? Or play episode by name? For example, "Alexa, play episode trouble with tribbles" Or also, 'Play latest episode of {show}' or 'Play unwatched episode(s) of {show}'. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now