Page 1 of 1

Noob - changing channels - methodology?

Posted: Wed Apr 04, 2012 4:47 pm
by patm
I just started with event ghost and I must admit it's rather foreign in how it does things though I think it's quite simple and straightforward so far.

Anyway, I'm using NextPVR with a USB-UIRT and Eventghost. I have three emitters (zones) which I need to fire independantly to change channels on three different Set Top Boxes(STB) which feed three different TV capture cards. I was using IRSS under XP but it seems to not be able to independently control the emitters under Windows 7 on my new PC (though it does on my older Win 7 machine... figure that out!). So I'm working with EG now.

I've done lots of coding in various languages though python is new to me. I do NOT consider myself a programmer as I'm simply not organized or knowledgeable enough to work on anything beyond simple utilities. However, I'm more than competent enough at it to accomplish the above.

What I've done so far is create a macro (channels) with an event called "chan". In NextPVR I set the channel changer executable to Eventghost with the arguments
-e chan <emitter #> <channel #>.

In channels I have a script that splits the payload, pads <channel #> to three digits, then iterates though <channel #>. Each iteration uses triggerevent with emitter + " " + digit as the payload.

I then created 30 other macros/events titled 1-0 through 3-9. When "chan" gets its payload it triggers the appropriate events in the other macros to flash the channel.

This all works perfectly but I can't help but thing there should be a more efficient way to do this and since I'm brand new to EG, there quite possibly is one already. Of course the easiest would be to have the plugin accept the emitter and channel as arguments and do the flashing but then you'd lose flexibility. Next would be to put the 30 transmission actions in a folder and call them directly from the python script - but I can't see how to do that or if it's even possible.

What would you experienced coders do in this situation?