thisguyiknow 0 Posted June 14, 2018 Posted June 14, 2018 (edited) I am curious whether there is a way to query the emby server for title and timecode information of what is currently being played - Ideally a serial stream through an IP/TCP port that on my end I can parse for use on an ipad remote control system for a theater In the past I was using MPC-HC as the backend player for emby within media center - when the web interface was enabled I could essentially 'query' MPC HC by IP address port # and then [in this case] /info.html and parse the data on my remote. All the remote 'sees' is the raw html or source of that specific page and I set rules on the remote to disregard the gibberish so to speak-- For example the timecode feedback was displayed on the remote by setting a rule on the remote to only look for data in between a line that begins with "<p id="positionstring"> and ends in <p>" --the number in between that specific prefix and suffix were displayed on the remote --Because of this, the remote only displayed the static timecode when you queried it --it is crude compared to the Oppo player that sends out a constant serial stream of timecode, track, chapter etc information via its RS232 port --> connected to a serial card in a computer that runs an rs232 to tcp/ip service, forwarding the serial data as TCP packets--> i.e. constant RX bytes. I connect to that bridge and parse and display the information on the remote. *note -> there was an aspect of the mpc hc web interface, a remote that displayed the title and current rolling timecode but it appeared to work by using a javascript to constantly refresh the data and I am not smart enough to figure out how to create a bridge from that rolling timecode I see in the browser {post that javascript} to my remote. We are moving to emby theater from a Windows Media Center plugin solution. Wondering if this kind of data can be easily accessed or whether a server plugin could be developed to help system integrators use a serial stream of 'remote feedback' in their projects. Obviously this data exists as can be seen in the dashboard--how do I extract that information? Getting too tired to really explain myself but I hope the developers understand the gist of what I am asking about -Thanks for the wonderful program Edited June 14, 2018 by thisguyiknow
Luke 38803 Posted June 14, 2018 Posted June 14, 2018 Hi, welcome. Yes you can do that by checking out our API: https://github.com/MediaBrowser/Emby/wiki Specifically the remote control section. Please let us know if this helps. Thanks !
ebr 15426 Posted June 14, 2018 Posted June 14, 2018 I edited the title of your topic - hope you don't mind .
thisguyiknow 0 Posted June 14, 2018 Author Posted June 14, 2018 Thank you guys so much - I believe this is what I am after -- forgive my density by asking this question: if I browse to the server like 'http://192.168.15.231:8096/Sessions'I will get a message saying 'access token is required' - could you spell it out for me exactly how to present that access token- Thanks again- Derek
Luke 38803 Posted June 14, 2018 Posted June 14, 2018 You're going to have to go through our wiki and learn how to use the API. Step 1 is you need to get your requests authenticated with an access token. For quick testing purposes you can create one in the server dashboard under advanced.
speechles 1975 Posted June 14, 2018 Posted June 14, 2018 (edited) Lets make it simple. Create an api key, then append it to your requests. it's easier to give the answer than make people hunt for it. http://192.168.15.231:8096/Sessions?api_key=<your api key generated goes here> Edited June 14, 2018 by speechles 1
thisguyiknow 0 Posted June 14, 2018 Author Posted June 14, 2018 Thanks for the help - was able to bring up the sessions screen to begin parsing data -- am I correct in saying that there is no 'running' time code stream from the sessions page in the HH:MM:SS format? I am getting stuff on the remote so I am moving in the right direction- thanks for the continued help This is the room this remote and emby are in use in: https://www.soundandvision.com/content/world%E2%80%99s-most-kick-ass-home-theater
speechles 1975 Posted June 14, 2018 Posted June 14, 2018 You can use PositionTicks to get the exact point played up to in milliseconds. seconds = PositionTicks / 10000000 From there you should be able to HH:MM:SS
thisguyiknow 0 Posted June 14, 2018 Author Posted June 14, 2018 (edited) Okay I probably can figure out some macro command to process that data and forward it to me in the form I want -- here's another stupid question -- using windows 7 - how to get websocket support -- lots of mixed information on the topic. Windows 7 does not have websocket support OOB but there is a workaround correct? so far I am just using http protocol because our server is on windows 7 Again, Thank you Edited June 14, 2018 by thisguyiknow
thisguyiknow 0 Posted June 21, 2018 Author Posted June 21, 2018 anyone want to do some contract software programming? -- I think a feedback server plugin would be an awesome app for the home automation people who just want to connect to a specific local tcp port and have that data streaming to their touch screen remote -
Luke 38803 Posted June 21, 2018 Posted June 21, 2018 Can you explain a little bit more what it would do? Thanks.
thisguyiknow 0 Posted June 21, 2018 Author Posted June 21, 2018 (edited) I use an irule based remote panel in our theater - almost all of the hardware used in the theater (i.e. projector, preamp, amps, blu-ray etc) have either an RS232 and or a CAT5 connector to send and receive commands/feedback. I want to give the users of the theater some useful feedback from the emby server. I have already setup rules on the remote to parse the /Sessions html but I find this not the best solution since that information is static/// I choose a new a movie - I have to re-query the /Sessions to scrape the new information. Ah, but websockets....... yes websockets provide a continuous bi-directional data stream but there are a few obstacles standing in my way - 1) Using windows 7 as the server means I would have to find an opensource implementation of websockets to use on the server side which I have no idea how to setup. The server was just rebuilt and I don't feel like rebuilding what is a fairly complicated machine just to use Windows 8/10 for OOB websocket support 2)Even if I rebuilt the machine and started using websockets I would still have to figure out how to forward websocket messages to a TCP/IP server since iRule does not use websockets in their remote I have attached a screenshot of a typical irule remote TCP gateway setup. I will attempt to write a more cogent description of even more detailed needs also I have a basic workflow diagram - Edited June 21, 2018 by thisguyiknow
thisguyiknow 0 Posted June 22, 2018 Author Posted June 22, 2018 (edited) ***I might just have to bite the bullet and build around windows 8/10 and really start to learn about websockets*** I basically am wanting a virtual COM port --- I want streaming emby data like I get streaming data from an Oppo blu ray player via its RS232 port --*** But part of what this fantasy plugin would do is allow the user choose which data to forward and which data to omit - I would omit everything but 'play pause' status, movie title, time code, artist & song name when playing music etc. just to trim the amount of data the ipad has to further parse on its end Edited June 22, 2018 by thisguyiknow
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