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

0 Members and 1 Guest are viewing this topic.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • 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: 7715
  • 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: 2319
  • 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: 2012
  • 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: 2319
  • 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: 2012
  • 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: 2012
  • 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: 2319
  • 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: 7715
  • 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: 2319
  • 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: 2319
  • 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 »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #15 on: December 09, 2014, 01:21:02 PM »
Can you show me the "sendir,1:3 ..." code for the digit 1?
***********  get excited and make things  **********

Etrust

  • Jr. Member
  • **
  • Posts: 45
  • Karma: 1
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #16 on: December 09, 2014, 01:25:21 PM »
sure here:

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #17 on: December 09, 2014, 05:14:53 PM »
Hmm, no idea  ::hmm

Can you try the code for my LG TV ? Maybe it will work (Digit1), then I can upload the whole codes for the LG.

Digi1:   sendir,1:3,1,38095,2,1,12,12A12,24AAA24,24CAAAAAC12,3809
***********  get excited and make things  **********

Etrust

  • Jr. Member
  • **
  • Posts: 45
  • Karma: 1
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #18 on: December 09, 2014, 05:31:03 PM »
Hi! Thank you for the code but it is not working too :-(

I really have no idea too. With the iLearn tool from global cache it is working well but not in VC :-(
« Last Edit: December 09, 2014, 05:34:26 PM by Etrust »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Sending channel numbers with GC iTach
« Reply #19 on: December 09, 2014, 05:47:13 PM »

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


Even when you are copying xml commands from others it is a good idea to look at the actions you are using, and to look at the parameter descriptions, and try to understand what the command is actually doing.  This can save you a lot of time.

http://voxcommando.com/mediawiki/index.php?title=Actions#GcCompress

The GcCompress action is used in the code-learning/map generating command you originally copied. The second parameter is the number of times to repeat the code. I think it is sending the codes twice.  Some devices require the code to be repeated in order to work and some do not.

If you want to edit your map table you can change the number after 37825 from a 2 to a 1
Compare the codes that ilearn returns when working to the ones you have in your map editor to see if this number is a 1.
« Last Edit: December 09, 2014, 06:35:48 PM by nime5ter »

Etrust

  • Jr. Member
  • **
  • Posts: 45
  • Karma: 1
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #20 on: December 10, 2014, 03:24:49 AM »
Hi Guys!!

I have good news: it is working. What I have done and can say:

I have started iLearn. Than I have learn the number 1 from my tv remote. I have than copied the code from ilearn and have insert the code in the map editor from VC. Result: It works. Interesting is, that learning with VC and learning with ilearn is different (check screen) because I can see different codes. The codes from ilearn is bigger and use port 1 I think.

I had to make a big pause between the commands (check screen) otherwise it doesn't work.

What I will try now is to test changing only the number 2 to 1 after the number 37825 like james wrote. I will let you know if it will work. I also will test the nice scripts from kalle and nime5ter.

This forum and this solution is so nice. I love it!!!!Thank you so much spendeing your time helping people over the world.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #21 on: December 10, 2014, 05:04:50 AM »
The ir code looks different because the short one is compressed.

A pause of 20 seconds is a bit overdrawn ::yikes

You use the "VcGrp_iTach learn payloadXML" which you have found here in the forum, but you have forgotten to check the settings in the "learn complete set map" command. This show me 2 repeats on port 3 and this is why your IR codes doesn't work - small cause, big effect (see attached picture).
This has James exactly suggested in the post above  ::club
« Last Edit: December 10, 2014, 05:12:25 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 #22 on: December 10, 2014, 06:35:37 AM »
hi Kalle,

yes I know, but my tv is slow and is ready only after 20 seconds to change the channel  ^-^

Yes I could find the options james was talking about thank you! Now everything is great and working.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Sending channel numbers with GC iTach
« Reply #23 on: December 10, 2014, 10:52:51 AM »
What I find confusing is that it seems to work if you use port 3 but it also works on port 1.  I guess this is a "iTach Flex" related issue.  On my Wifi2IR you must specify the correct port or it will not work.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #24 on: December 10, 2014, 11:06:47 AM »
I think the flex routing the signal to port 1 on which is the blaster connected. Etrust can test it by sending to port 2 and maybe it will work too.
« Last Edit: December 10, 2014, 01:37:19 PM by jitterjames »
***********  get excited and make things  **********

Etrust

  • Jr. Member
  • **
  • Posts: 45
  • Karma: 1
    • View Profile
Re: Sending channel numbers with GC iTach
« Reply #25 on: December 11, 2014, 03:56:46 AM »
Hi Guys, ok I will test on Port 2 and will let you know soon as I have the possibility to test home.