Home AMX User Forum AMX General Discussion

Macros over IR, best practices

Hey

is there a best way to send two of three IR commands together, like for example choosing a favorite TV channel , i will have to press channel 1,2,3,4 .

I tried do_push but the pulse time gets it doing weird things, then i tried setting the pulse and then doing the pulse for every channel

is there an alternate way to acheive this

Comments

  • ericmedleyericmedley Posts: 4,177
    John Paul wrote: »
    Hey

    is there a best way to send two of three IR commands together, like for example choosing a favorite TV channel , i will have to press channel 1,2,3,4 .

    I tried do_push but the pulse time gets it doing weird things, then i tried setting the pulse and then doing the pulse for every channel

    is there an alternate way to acheive this

    I wrote a little module for this a while back and have used it ever since. It uses a timeline and you set it in motion with a command to it. the command contains the channel desired and then the delay and pulse time for the numbers. The command structure is:

    CH=123:200:400:15
    Channel=123 Pulse time is 2 ticks, delay between pulses is 4 ticks. Device ID is 15. The Device DEV is passed into the module in the DEFINE_MODULE section.
  • John PaulJohn Paul Posts: 143
    timeline ?

    but Eric, so in the command structure u also give the channel nos for 123, like for the channel 1, the ir channel no might be 21 and your tp button channel no is also the same, how do u put that up in the the function
  • John PaulJohn Paul Posts: 143
    channel no doubt cleared

    Guess ur passing the channel no as the first parameter, got that resolved.

    But i am using a dreambox 8000, some fav channels work on different pulse and waits in between so guess creating a timeline function makes a lot of sense
  • ericmedleyericmedley Posts: 4,177
    John Paul wrote: »
    but Eric, so in the command structure u also give the channel nos for 123, like for the channel 1, the ir channel no might be 21 and your tp button channel no is also the same, how do u put that up in the the function

    I try to keep all my ir files arranged in such a way that the Remotes channel functions are always on the same channels. AMX has done this with there files since dinosaurs roamed the Earth. The standard is that IR remote #1 is almost always channel 11, #2 is 12, #3 is 13, and so on.

    This is the greatest example of why button arrays are your best friend.
  • DHawthorneDHawthorne Posts: 4,584
    DO_PUSH should only be used for pushing a button event defined elsewhere to consolidate code. If you really must, PULSE is the right way to pulse an IR channel ... but I wouldn't even do that. I would strongly recommend using the SEND_COMMAND <device>, "'SP', <channel>" method. But, that said, for what you are doing, you can simply use the built in channel commands CH or XCH, as long as it's not too new a device and needs 4 digits or any funny characters (like a - or .). By all means chase those threads posted for a fuller discussion.
Sign In or Register to comment.