Guest Posted November 15, 2016 Share Posted November 15, 2016 I have Emby server with a Kodi htpc playing the content from Emby. I would like to get the content currently being played and also the duration, how far in and % of the show movie being played. I solved the "what is being played" with (using node-red to connect to the ws) ws://myembyip:8096/Sessions?DeviceId=MYKODICDEVICEID&api_key=MYEMBYAPIKEY and then pulling out the various pieces of data, after getting a MessageType of PlaybackStart such as Series name, Episode etc. I'm good there. I would like to get information from Kodi such as 00:01:00, 00:10:00, 10% ie it is has played for 1 minute of a 10 minute show at 10%. Can anyone help me pull that information out of the Emby API that would be updated regularly, every few seconds perhaps. A clunky workaround which I do have working is to install an MQTT plugin, kodi2mqtt, into Kodi that spits out the time/percent information onto MQTT which I can pickup and use. I would prefer to pull this from Emby and not have the MQTT plugin in Kodi. thanks!! Link to comment Share on other sites More sharing options...
Luke 37116 Posted November 16, 2016 Share Posted November 16, 2016 Hi, welcome. So you're looking to use the Emby api to monitor playback sessions? Link to comment Share on other sites More sharing options...
Guest Posted November 16, 2016 Share Posted November 16, 2016 I would like to have the current "Now playing" from my Kodi (with Emby plugin) shown on my home automation screens dotted around the house. The screen would show the episode/movie currently playing in my media room. I have got the data from Emby for the show title / movie title. What I need from Emby ws is how long the movie is, where the player is currently at, and the percentage. When I log onto my Emby web dashboard it shows my active devices. When something is playing the Emby dashboard shows what it is and how far through the show it is. This is the data I am looking for from the Emby ws:// thanks! Link to comment Share on other sites More sharing options...
Luke 37116 Posted November 16, 2016 Share Posted November 16, 2016 Ok, unfortunately we don't have this very well documented, but you might just want to look at the source code for that page: https://github.com/MediaBrowser/Emby/blob/master/MediaBrowser.WebDashboard/dashboard-ui/scripts/dashboardpage.js#L98 It tells the server to start sending realtime updates on an interval. And it is using our api libraries which are a standalone project: https://github.com/MediaBrowser/Emby.ApiClient.Javascript 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