News:

Would you like to say "Thanks!" for extra support or new features that we provided? Donations are gratefully accepted.

Main Menu

Problem with TCP plugin and Global Cache

Started by claymic, May 27, 2013, 09:40:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

claymic

I install the new version over my old version of Vox today.
I created a new folder group
<?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
<?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

can you please attach your python file too?

Startup.py

jitterjames

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

jitterjames

Quote from: claymic on May 27, 2013, 09:40:32 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.)

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

claymic

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

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

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

Thanks James
I will send to you later, for now i am trying to finished some commands first, before i forgot something.