Author Topic: Pause between repeats  (Read 1695 times)

0 Members and 2 Guests are viewing this topic.

JasonFox

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 4
    • View Profile
Pause between repeats
« on: August 25, 2013, 07:06:15 PM »
I'm not sure if this is a feature request or maybe the ability exists already I just can't find it.  I have a Global Cache iTach that I use to send IR signals to my TV, and Tivo (I use th e XBMC plugin for communication with XBMC). For some of the Tivo commands I have set a variable to allow for repeats (FFW + # to allow for 3 levels of speed). The difficulty is that the repeats happen too quickly sometimes and so "Fast Forward 3" only gets received as one or two FFW signals. Is there a parameter available to add a pause between repeats? If not can one be added?

I also wanted to say thank you to James (for writing great software) and Mr. Wolf, Kalle, msdh and all the other great members of the community for your contributions. Without all the great info each of you have contributed I would be totally lost.  ;D

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Pause between repeats
« Reply #1 on: August 25, 2013, 07:53:06 PM »
Hi JasonFox and welcome to our forum.
You can try follow how show in the attached picture - I know that is not your command, but it show you a example how you can repeat a command with delay.

I hope it helps
***********  get excited and make things  **********

JasonFox

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 4
    • View Profile
Re: Pause between repeats
« Reply #2 on: August 25, 2013, 08:27:22 PM »
Thank you, Kalle.

That added the necessary pauses but now for some reason it always repeats three times. It doesn't matter if I say "Fast Forward 1" or "Fast Forward 3" it always sends three IR signals.

Any Ideas?

Thanks again for your quick reply. The community here is amazing!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Pause between repeats
« Reply #3 on: August 25, 2013, 08:47:54 PM »
Hi JasonFox,

It would be helpful if you could upload the xml for your command, or to send a screen capture so we can see what you are doing.

If you are using a payload range in your phrases, and it is the only payload, then the number of loops would be {1}.  You can either put this {1} in the repeat field for the action (on the far right of the action), or if you are going to use command looping as Kalle suggested, then you can put the {1} in the maxloops field for the command.

If you are using the action Tcp.Client.Write then you do not need to use command looping.  You can just loop the action and use the 3rd parameter of the Tcp.Client.Write action to set the delay time in milliseconds.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Pause between repeats
« Reply #4 on: August 25, 2013, 09:02:16 PM »
Mmhh  ::hmm

:bonk

Oh, I forgot that we can do that  :-[
« Last Edit: August 25, 2013, 09:06:12 PM by Kalle »
***********  get excited and make things  **********

JasonFox

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 4
    • View Profile
Re: Pause between repeats
« Reply #5 on: August 25, 2013, 09:38:16 PM »
Thank you James.

Changing the Max Loops field to {1} did the trick.  I am using TCP.Single.Write but I am not putting the sendir command in the parameter, I am using a MAP of all the Tivo Commands (thank you for adding that feature b.t.w  :D) and then using the map code in the parameter. Thank you for the info about TCP.Client.Write. I will experiment with that to see if it works better than max loops. I thought I had read somewhere on the forum that TCP.Single.Write was the correct action to use, so I've never tried anything else.  Still so new to this that I haven't started experimenting out of the comfort zone yet.   ;)


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Pause between repeats
« Reply #6 on: August 25, 2013, 09:42:50 PM »
TCP.Single.Write is fine.  It is easier to use.  It creates a new connection every time you use the action.

Using the client method keeps the connection open, which allows responses from the iTach (like for code learning) to generate events in VC.  It is a bit more complicated to set up though.