Author Topic: Sending channel numbers with GC iTach  (Read 11601 times)

0 Members and 5 Guests are viewing this topic.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Sending channel numbers with GC iTach
« on: December 07, 2014, 07:51:20 AM »
Hi Guys, me again..

I want now to send 3 numbers like 197 for MTV. What is the best way to do that? Should I make a new post?

Yes, a new thread topic makes sense. :) Easier for others to find.

See this post: http://voxcommando.com/forum/index.php?topic=1220.msg10373#msg10373

Basically, you should start by creating a payload XML file that pairs your channel name phrases to the correct channel numbers (in the example, this file is called TivoChannels.xml, obviously you can call it what you like).

Your map values for each digit should use names that include the digit, similar to what I am using in the command --> so that VC knows which digit's IR code to send. This may already happen by default based on how the codes were first learned and mapped, I'm not sure.
« Last Edit: December 07, 2014, 07:57:51 AM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Sending channel numbers with GC iTach
« Reply #1 on: December 07, 2014, 08:36:13 AM »
In your case I think you can remove the connect and disconnect actions from the code that Nime5ter linked to since the iTach/TCP code you are already using connects at start-up and stays connected.

Etrust

  • Jr. Member
  • **
  • Posts: 45
  • Karma: 1
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #2 on: December 07, 2014, 10:30:13 AM »
Hi, My Map Editor have saved all numbers from my remote tv control  now in separate lines.

I have used this xml: http://voxcommando.com/forum/index.php?topic=1220.msg10373#msg10373

have change my ip adress and createrd a new xml file with the value 172 and phrase mtv. When I say change to channel mtv, I hear a voce saying "switching to channel mtv", but nothing happens.


I also tryed this (please see attached file), but VC send only the number 1 to my tv  :bonk

Can somebody help?
« Last Edit: December 07, 2014, 10:33:03 AM by Etrust »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #3 on: December 07, 2014, 10:34:46 AM »
you need some pause between the actions
try it with:

VC.Pause 200

***********  get excited and make things  **********

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Sending channel numbers with GC iTach
« Reply #4 on: December 07, 2014, 10:48:29 AM »
@Kalle --

According to the Action description for TCP.Client.WriteLn, the 3rd parameter is a "delay" in milliseconds.

http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#WriteLn_2

Can he not just enter a delay value there or in your experience is VC.Pause required instead?

 The default is 10 milliseconds, but he can make it longer.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #5 on: December 07, 2014, 10:54:49 AM »
Upps, sorry I think you've right and makes more sense.
***********  get excited and make things  **********

Etrust

  • Jr. Member
  • **
  • Posts: 45
  • Karma: 1
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #6 on: December 07, 2014, 11:15:01 AM »
Hi Guys!

Good ideas here.

With pause the blaster send 122 or 1122 and with the third delay parameter he send 1 to the tv. I attached the files. Have I made something wrong?


nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Sending channel numbers with GC iTach
« Reply #7 on: December 07, 2014, 11:29:55 AM »
Can you please post the xml for your command, and attach the payload xml file that you created?

The screenshot you're showing is not the command xml that we referred you to earlier.

You are using TCP.SingleWriteLn instead of Client.WriteLn, and I don't see the Regular Expression.

Even if you want to test sending the individual numbers, you should try it using the action that was used in the example command.

TCP.SingleWriteLn does not include a delay parameter.
« Last Edit: December 07, 2014, 12:20:57 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Sending channel numbers with GC iTach
« Reply #8 on: December 07, 2014, 11:36:13 AM »
Your command xml should look more like:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.2.5-->
<command id="732" name="Change channel to M T V" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="1">
  <action>
    <cmdType>TTS.Speak</cmdType>
    <params>
      <param>Switching to channel: {PF.1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegEx</cmdType>
    <params>
      <param>(\d)</param>
      <param />
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Tcp.Client.WriteLn</cmdType>
    <params>
      <param>iTach</param>
      <param>{M:gc_TV.{Match.{i}}}</param>
      <param>200</param>
    </params>
    <cmdRepeat>{#M}</cmdRepeat>
  </action>
  <phrase>Change channel to</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">mtv.xml</payloadFromXML>
</command>

Example payload xml file attached.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #9 on: December 07, 2014, 01:44:01 PM »
@Etrust

I use a delay of 200 for send digits to my iTachFlex.

Here is a other example command group to show you to increase/decrease volume.
How you can see, the commands use a payload range to set the repeats for this action.
As example: "increase volume 3" will repeat the volume button 3 times. I hope this is helpful  ;)

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 1.9.1.9-->
<commandGroup open="True" name="iTach TV volume" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1026" name="TV volume up" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="200" loopMax="5" description="">
    <action>
      <cmdType>TCP.Client.WriteLn</cmdType>
      <params>
        <param>iTach</param>
        <param>{M:uu_TV.VolumeUp}</param>
        <param>200</param>
      </params>
      <cmdRepeat>{1}</cmdRepeat>
    </action>
    <phrase>increase TV volume</phrase>
    <payloadRange>1,5</payloadRange>
  </command>
  <command id="1033" name="TV volume down" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="200" loopMax="5" description="">
    <action>
      <cmdType>TCP.Client.WriteLn</cmdType>
      <params>
        <param>iTach</param>
        <param>{M:uu_TV.VolumeDown}</param>
        <param>200</param>
      </params>
      <cmdRepeat>{1}</cmdRepeat>
    </action>
    <phrase>decrease TV volume</phrase>
    <payloadRange>1,5</payloadRange>
  </command>
</commandGroup>
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Sending channel numbers with GC iTach
« Reply #10 on: December 08, 2014, 04:30:32 PM »
For what it's worth, I think the delay is required more for the device receiving the IR than the iTach, which can probably handle quite a short delay.  So the absolute minimum will depend on the device you are controlling and what you are trying to get it to do.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #11 on: December 08, 2014, 05:21:17 PM »
Yes you've absolute right. I use for my LG-TV 200ms to get safely, the value which I would like is set. So when I say "decrease TV volume 5", it decrease the volume exact 5 down (maybe it takes a bit longer, but it is safely). My first experiences without such a long delay has drive me nuts, because some repeating code was not received.
***********  get excited and make things  **********

Etrust

  • Jr. Member
  • **
  • Posts: 45
  • Karma: 1
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #12 on: December 09, 2014, 09:18:38 AM »
Hi Guys, sorry for the late reply. I am using a LG Television.

what is working so far: When I say "tv" the tv turns on or off. That is great

what is not working: When I say "mtv" the blaster sends the command 11 or 1122 instead of 172 to my tv.

I am not using a payload file for the moment (I will use later the nice examples from kalle and nime5ster). I am using for the moment Single Actions like you can see on the attached screenshot. I have play with the delay values 10,20,50 and 200 but it didn't help.

What I am doing wrong?  :bonk

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #13 on: December 09, 2014, 10:05:42 AM »
To get safely, delete the 200 in each TCP.ClientWriteLn and use instead a VC.Pause action with 200 or 300 between the sends, I think this will work better.

200ms is nothing, check how long you need to add the numbers to type by a remote control. If 200 or 300 doesn't help, increase the value.
« Last Edit: December 09, 2014, 10:19:40 AM by Kalle »
***********  get excited and make things  **********

Etrust

  • Jr. Member
  • **
  • Posts: 45
  • Karma: 1
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #14 on: December 09, 2014, 12:35:00 PM »
Hi Guys,

I have tried with vc.pause and with delay parameters. My itach always send the number twice instead of only one time. So if I send the number 1 using TCP.ClientWriteLn, the iTach sends 11, if I send number 6 using TCP.ClientWriteLn, the iTach sends 66  ::dis

I really do not understand..

I have tested the itach using the iLearn Tool and it works perfect.
« Last Edit: December 09, 2014, 12:38:25 PM by Etrust »