External Interface? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +--- Thread: External Interface? (/showthread.php?tid=198164) |
External Interface? - forivon - 2014-06-18 I'm going to build a simple LED Strobe which connects through an emulated serial port to the computer. So you can simply turn on/off the first pin of the emulated serial port to turn the LEDs on/off. Now I'm looking for a way make XBMC send information about the current seek position / song title to an external application that I would write, that controls the strobe's flashing frequency. Is there any interface like that? If not I could probably read the information from XBMC using ReadProcessMemory. Tough I would need to know in what way the time is stored in the memory. (seconds/milliseconds/string... integer/long/float/double...) edit: I tried to reverse engineer it, but I couldn't figure it out so far. the time is in the memory as string in the xx:xx:xx format, but it's only updated if the ui the the seekbar is visible. For the raw time I can just guess for now, but it looks like XBMC saves a time in an address when a new song starts and the songtime is stored as startTime+currentSongtime. It would be nice if a developer could confirm that. edit2: I think I found the time, but it's really weird it seems to be a float that inversely proportional increases. It always starts at about -3 and instantly jumps to about 4, then to 5 and then it takes like 6 seconds to get to 6 and 20 secs to get to 7 etc. I don't really understand it, it's confusing... RE: External Interface? - KenV99 - 2014-06-18 (2014-06-18, 18:42)forivon Wrote: I'm going to build a simple LED Strobe which connects through an emulated serial port to the computer. If you can write your addon in python, the player class provides functions to get times and filenames... http://mirrors.xbmc.org/docs/python-docs/13.0-gotham/xbmc.html#Player RE: External Interface? - forivon - 2014-06-18 Thank you, I think I will give it a try. |