Author Topic: Problem with TCP plugin and Global Cache  (Read 4672 times)

0 Members and 1 Guest are viewing this topic.

claymic

  • $upporter
  • Sr. Member
  • *****
  • Posts: 152
  • Karma: 0
    • View Profile
Problem with TCP plugin and Global Cache
« on: May 27, 2013, 09:40:32 AM »
I install the new version over my old version of Vox today.
I created a new folder group
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="GC Itach 161" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1515" name="Itach161Connect" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Tcp.Client.Connect</cmdType>
      <cmdString>ItachRs1&amp;&amp;192.168.0.161&amp;&amp;4999&amp;&amp;\x0A</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Itach161Connect</event>
  </command>
  <command id="1540" name="Itach161Desconnect" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TCP.Client.Disconnect</cmdType>
      <cmdString>ItachRs1</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Itach161Desconnect</event>
  </command>
  <command id="1531" name="Itach161SendCommandVariable" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Tcp.Client.Write</cmdType>
      <cmdString>ItachRs1&amp;&amp;{Var.SendItach161}&amp;&amp;4999&amp;&amp;\x0A</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Itach161SendCommandVariable</event>
  </command>
  <command id="1533" name="Itach161SendCommandPayload" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Tcp.Client.Write</cmdType>
      <cmdString>ItachRs1&amp;&amp;{1}&amp;&amp;4999&amp;&amp;\x0A</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Itach161SendCommandPayload</event>
  </command>
</commandGroup>
This group will manage my connections with a ITach.
Then i created a new Command to force vox (in the startup) to connect and send a null command to my ITach
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="1477" name="startup" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>VC.Off</cmdType>
    <cmdString />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecFile</cmdType>
    <cmdString>{Path.VC}\PY\Startup.py</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.SetEventTimer</cmdType>
    <cmdString>4&amp;&amp;Itach161Connect</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.SetEventTimer</cmdType>
    <cmdString>5&amp;&amp;Itach161SendCommandPayload&amp;&amp;Null</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>VC.Loaded</event>
</command>
But when i run Vox i get this in the log

There is a loop running and sending the command 4x, but i dont put any loop in the command.
The second problem its that when i run a Command to send any data to any of my GlobalCache the command is sent instantaneously but Vox freeze for 7 seconds.
Clayton

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Problem with TCP plugin and Global Cache
« Reply #1 on: May 27, 2013, 11:22:33 AM »
can you please attach your python file too?

Startup.py

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Problem with TCP plugin and Global Cache
« Reply #2 on: May 27, 2013, 11:24:20 AM »
I think you better just email me a zip of your whole VC folder so I can see what is going on.  There are too many possible things that might be happening to cause the repeated command.
« Last Edit: May 27, 2013, 11:30:38 AM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Problem with TCP plugin and Global Cache
« Reply #3 on: May 27, 2013, 11:28:41 AM »
The second problem its that when i run a Command to send any data to any of my GlobalCache the command is sent instantaneously but Vox freeze for 7 seconds.
Clayton
I think it is probably freezing for 5 seconds, because in your command "Itach161SendCommandPayload" you have set the delay parameter to 4999.  (Very close to 5 seconds.)

Code: [Select]
<action actiontype="Tcp.Client.Write" repeat="1" logic="False"><paramstring>ItachRs1&amp;&amp;{1}&amp;&amp;4999&amp;&amp;\x0A</paramstring></action>

claymic

  • $upporter
  • Sr. Member
  • *****
  • Posts: 152
  • Karma: 0
    • View Profile
Problem with TCP plugin and Global Cache
« Reply #4 on: May 27, 2013, 11:51:12 AM »
oK, tanks, but i would never figure out that, since there is no delay sending the command, only Vox freeze for 7 seconds.
I will revise the commands again, before send to you.
The python script its just a test to set Global Variables.
Code: [Select]
# global variables to use with python scripts
pyGc1Ip = "192.168.0.160" # Global Cache GC-100-12 in the HomeTheater
pyGc1PortIr = 4998
pyGc1PortRs1 = 4999
pyGc1PortRs2 = 5000

#global variable to set IR and RS232 commands
tvLgPowerOn = 'sendir,4:3,1,38000,1,1,343,170,21,22,21,22,22,63,21,22,21,22,21,22,21,22,21,22,22,63,22,63,21,22,22,63,22,63,22,63,22,63,22,63,21,22,21,22,22,63,21,22,21,22,21,22,22,63,22,63,22,63,22,63,21,22,22,63,22,63,22,63,21,22,21,22,22,760"+"\r\n'
tvlgInputHdmi1 = 'sendir,4:3,1,38000,1,1,343,171,21,20,21,20,22,62,21,20,21,20,21,20,21,20,21,20,22,62,22,62,21,20,22,62,22,62,22,62,22,62,22,62,21,20,22,62,22,62,22,62,21,20,21,20,22,62,22,62,22,62,21,20,21,20,21,20,22,62,22,62,21,20,21,20,22,760"+"\r\n'
rcAv7005PowerOn = 'PWON\r'
rcAv7005OutputHdmi2 = 'VSMONI2\r'
rcAv7005InputGame = 'SIGAME\r'

claymic

  • $upporter
  • Sr. Member
  • *****
  • Posts: 152
  • Karma: 0
    • View Profile
Problem with TCP plugin and Global Cache
« Reply #5 on: May 27, 2013, 11:55:43 AM »
Just to be more clear.
The loop only happens when i start the VoxCommando (VC.load event) if i trigger the command manually there is no loop. I only have one VC.load event.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Problem with TCP plugin and Global Cache
« Reply #6 on: May 27, 2013, 01:44:17 PM »
I need your entire VC folder in order to see what is happening.  If I import your commands, I do not get the loop.

claymic

  • $upporter
  • Sr. Member
  • *****
  • Posts: 152
  • Karma: 0
    • View Profile
Re: Problem with TCP plugin and Global Cache
« Reply #7 on: May 27, 2013, 03:06:12 PM »
Thanks James
I will send to you later, for now i am trying to finished some commands first, before i forgot something.