Create a channel macro

Nov 23, 2009 at 1:51 PM


I'm interested in creating a channel macro where I can send one command and it will tune to channel number (for example 1021 + enter).  The reason for this is currently my home automation system allows me to sent http commands but only one command per button. I have channel logos on my touch screen where I can send multiple IR or RS232 commands but unfortunately only one IP command. So the only thing I can think of to overcome this is to create the macro within VmcController so I can invoke it with one command such as "http://localhost:40510/channelmacro-1" or something similar to this. 

I have limited programming experience mainly with vb however I can typically look at existing code and figure out what I need to adjust to accomplish my goal. I've looked at the source code specifically RemoteCommands.CS where the SendKeyCmd's are to try to further understand where I need to start but unfortunately I'm not getting anywhere. 

I'm hoping that someone here can give me some guidance on where I should begin. I'm not a programmer by trade but do have limited understanding and interest in how it works. Unfortunately I do not have the time to devote to understand everything about the Microsoft.MediaCenter Namespace but I wouldn't mind learning what I need to in order to accomplish this task. 

So here are my questions.

1. What is important for me to know in order to accomplish this task? Do I need to understand Microsoft.MediaCenter Namespace? If so, is there specific documentation or tutorials you recommend?

2. I've never added anything to an opensource project before. I'm assuming that once I add to the code that I need to compile it and load it on the media center computer. Is there documentation or instructions on how to do that?


I appreciate any and all help with this. I've been looking for software to control Media Center by RS232 for a few years now but IP is even better. 

Look forward to hearing from you.


Nov 25, 2009 at 11:26 PM

If I understand what you want this is all ready possible without any coding.

I've never really documneted it well, but commands can be "nested" in the URL. They are executed one at a time left to right. So if you wanted to enter "1", "0", "2", "1", and then "ok"  you could use something like:



Is this enough? The code is not that difficult, and it would not be hard to set up some kind of configuration file where you could define macros, but given the url command nesting I don't see a reason to do this.


Thanks, Tony


Nov 29, 2009 at 2:16 AM

Hi Tony,

Thanks for the reply. This is exactly what I'm looking for. I could assign the url above to one of the buttons which should solve my issue. However, I've tested this in my browser and I'm getting an error saying "BadRequest". If I take the nested URL's out and just send one command it works just fine but otherwise I get the same error. 

Any idea why it's not working for me?

Thanks again for your help!


Nov 30, 2009 at 12:23 AM

Hmm - that's weird - I just typed the following url in (ip sanitized) and it worked as expected:

What release are you running? I added this functionality fairly late, so it's probably only available in the latest (Alpha 3)

Dec 9, 2009 at 1:22 PM

Sorry for the late reply! I upgraded to the latest version and it works great!

Thanks for your help!