News:

VoxCommando supports plugins for a wide variety of programs and devices. Contact us if you want to create your own.

Main Menu

Sending channel numbers with GC iTach

Started by nime5ter, December 07, 2014, 07:51:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nime5ter

Quote from: Etrust on December 07, 2014, 06:02:13 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.
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

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

#2
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?

Kalle

you need some pause between the actions
try it with:

VC.Pause 200

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

nime5ter

@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

Upps, sorry I think you've right and makes more sense.
***********  get excited and make things  **********

Etrust

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

#7
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.
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

Your command xml should look more like:

<?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

@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  ;)

<?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

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

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

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

#13
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.
***********  get excited and make things  **********

Etrust

#14
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.