Jump to content


Photo

Obtaining data from emby server---Remotes--Data Acquisition

Data Time Code Remote Serial Data Acquisition

  • Please log in to reply
12 replies to this topic

#1 thisguyiknow OFFLINE  

thisguyiknow

    Newbie

  • Members
  • 7 posts
  • Local time: 08:25 AM

Posted 14 June 2018 - 12:54 AM

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 by thisguyiknow, 14 June 2018 - 02:36 AM.


#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 126583 posts
  • Local time: 11:25 AM

Posted 14 June 2018 - 08:25 AM

Hi, welcome. Yes you can do that by checking out our API:

https://github.com/M...owser/Emby/wiki

 

Specifically the remote control section. Please let us know if this helps. Thanks !



#3 ebr OFFLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 44118 posts
  • Local time: 11:25 AM

Posted 14 June 2018 - 08:40 AM

I edited the title of your topic - hope you don't mind :).



#4 thisguyiknow OFFLINE  

thisguyiknow

    Newbie

  • Members
  • 7 posts
  • Local time: 08:25 AM

Posted 14 June 2018 - 01:12 PM

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 



#5 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 126583 posts
  • Local time: 11:25 AM

Posted 14 June 2018 - 01:28 PM

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.



#6 speechles OFFLINE  

speechles

    Advanced Member

  • App Developer
  • 4220 posts
  • Local time: 08:25 AM

Posted 14 June 2018 - 01:42 PM

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.

 

Ia1BfE2.png

 

http://192.168.15.231:8096/Sessions?api_key=<your api key generated goes here>

Edited by speechles, 14 June 2018 - 01:42 PM.

  • CBers likes this

#7 thisguyiknow OFFLINE  

thisguyiknow

    Newbie

  • Members
  • 7 posts
  • Local time: 08:25 AM

Posted 14 June 2018 - 03:04 PM

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.soundand...ss-home-theater



#8 speechles OFFLINE  

speechles

    Advanced Member

  • App Developer
  • 4220 posts
  • Local time: 08:25 AM

Posted 14 June 2018 - 03:43 PM

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 :)



#9 thisguyiknow OFFLINE  

thisguyiknow

    Newbie

  • Members
  • 7 posts
  • Local time: 08:25 AM

Posted 14 June 2018 - 06:03 PM

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 by thisguyiknow, 14 June 2018 - 06:10 PM.


#10 thisguyiknow OFFLINE  

thisguyiknow

    Newbie

  • Members
  • 7 posts
  • Local time: 08:25 AM

Posted 21 June 2018 - 02:06 PM

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 - 



#11 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 126583 posts
  • Local time: 11:25 AM

Posted 21 June 2018 - 02:08 PM

Can you explain a little bit more what it would do? Thanks.



#12 thisguyiknow OFFLINE  

thisguyiknow

    Newbie

  • Members
  • 7 posts
  • Local time: 08:25 AM

Posted 21 June 2018 - 05:15 PM

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.

 

5b2c152beee3f_tcpscreen001.png

 

I will attempt to write a more cogent description of even more detailed needs  

 

also I have a basic workflow diagram -

 

5b2c155e4f132_Untitled1.jpg


Edited by thisguyiknow, 21 June 2018 - 05:17 PM.


#13 thisguyiknow OFFLINE  

thisguyiknow

    Newbie

  • Members
  • 7 posts
  • Local time: 08:25 AM

Posted 21 June 2018 - 09:02 PM

***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 by thisguyiknow, 21 June 2018 - 10:21 PM.






Also tagged with one or more of these keywords: Data, Time Code, Remote, Serial, Data Acquisition

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users