idea for a metadata output function

Mar 17, 2010 at 4:51 PM
Edited Mar 17, 2010 at 4:52 PM

I am currently writing a plug-in to allow Housebot automation software ( to interface with WMC.    So have been using this great app for the controller.

So far it's all working well, just a few bugs to iron out.

While doing this I have had an idea.  Currently my plug-in sends the 'mediametadata' command event 5 seconds,  this is so it can keep up to date on the status of what is playing.  I can see that a really useful feature (if possible?) would be the option to output the metadata automatically once something has changed. So would not need to keep requesting it with the 'medametadata' command.  Also could be activate/stopped by a command like 'metadata-start', 'metadata-stop'. 

I do not know if this is possible or worthwhile to anyone else, just thinking out loud.  Thoughts? 


Mar 17, 2010 at 5:31 PM

I originally got involved with this project doing the same thing for PowerHome.

The problem is how do you "output" the metadata? I'm assuming that you are using the http interface and there is no way to push data. If you are using the tcp/ip (telnet) connection then you can use the event sink (aka "status" port - usually 40400) I believe that all state changes (media position) are output there. I tried to use this, but found it too noisy to parse efficiently (plus I found that the socket connection I was using was a little buggy - hence adding the http server).

In the end I do the same thing you are doing - I poll the metadata whenever I want to update the status in my automation setup (usually when I update the display).

Things I've thought about doing (but haven't yet) to make this better:

  1. Make the status connection filterable - so you only see the status changes you want
  2. Output state changes to a file (I can then easily monitor the file and use that trigger to update)

I'd love to hear other ideas.

Thanks, Tony

Mar 19, 2010 at 5:20 PM

The plug-in I'm writing is using telnet port 40500, so the output would be fine.  But I see what you mean with http.  Some kind of Ajax maybe? not sure.  Maybe it's not an option for http?

The status port sounds very interesting, is this already in the code? Sounds like it's exactly what I'm after.  If I get time tonight  I'll have a play with port 40400.

I'll let you know how I get on.

Thanks, Allan