chipmunkav.com Home Search Member List Faq Register Login  
TCP Client
Re: Theatertek goes public with IP Control

Thread Starter: Alaric   Started: 05-20-2007 7:51 PM   Replies: 10
 Chipmunk AV Forums » Plugins » TCP Client » Re: Theatertek goes public with IP Control
 Printable Version    « Previous Thread
  20 May 2007, 7:51 PM
Alaric is not online. Last active: 16/12/2007 19:59:02 Alaric

Top 10 Posts
Joined on 03-26-2007
Posts 41
Theatertek goes public with IP Control

Hi There,

Take a look at :

http://www.theatertek.com/Forums/showthread.php?t=9946

Theatertek has finaly issued the IP control commands !!!!

Cya,

        Lee

 


  
  28 May 2007, 6:49 PM
Alaric is not online. Last active: 16/12/2007 19:59:02 Alaric

Top 10 Posts
Joined on 03-26-2007
Posts 41
Re: Theatertek goes public with IP Control

Hi There,

Well i can manage to connect to TT and it automaticaly streams the chapter length and position while playing back to chipmunk, but so far i've not managed to send it a command that has worked...But its a start !

Cya,

  Lee


  
  29 May 2007, 7:27 PM
Chipmunk is not online. Last active: 20/08/2009 20:17:19 Chipmunk



Top 10 Posts
Joined on 07-19-2006
London, England
Posts 167
Re: Theatertek goes public with IP Control

Hi Lee,

How are you sending the command? Can you post the Lua script you are using? I might be able to help....

Shaun




Chipmunk AV Controller Founder

  
  30 May 2007, 7:53 AM
Alaric is not online. Last active: 16/12/2007 19:59:02 Alaric

Top 10 Posts
Joined on 03-26-2007
Posts 41
Re: Theatertek goes public with IP Control

Hi Shaun,

Just using the example from the tcpclient folder...swapped the example IP/Port and that connects.

Tried sending a command (pause) as numbers with and without the /r/n in a couple of combinations...I'm not at the remote PC otherwise i'd cut and paste.

Disconnect worked if i used the correct client (eg client1 throughout)

Cya,

          Lee


  
  10 Jun 2007, 12:27 PM
Alaric is not online. Last active: 16/12/2007 19:59:02 Alaric

Top 10 Posts
Joined on 03-26-2007
Posts 41
Re: Theatertek goes public with IP Control

Hi There,

Been a while since i played with this...

Start-up

client1 = Chipmunk.Plugins.TCPClient.Client()
client1:Connect("192.168.0.10", 2663)
client1.Encoding = Chipmunk.Plugins.TCPClient.Encoding.ASCII

Pause Command

client1:Send("32773\r\n")

Tried without \r and without both \r\n but no joy yet !

Close

if client1 ~= nil then
 client1:Dispose()
 client1 = nil
end

Ta,

Lee


  
  10 Jun 2007, 10:31 PM
Chipmunk is not online. Last active: 20/08/2009 20:17:19 Chipmunk



Top 10 Posts
Joined on 07-19-2006
London, England
Posts 167
Re: Theatertek goes public with IP Control

Hi Lee,

The spec mentions a space between the command and the CRLF so try:

client1:Send("32773 \r\n")

Regards

Shaun




Chipmunk AV Controller Founder

  
  19 Jun 2007, 9:04 PM
Alaric is not online. Last active: 16/12/2007 19:59:02 Alaric

Top 10 Posts
Joined on 03-26-2007
Posts 41
Re: Theatertek goes public with IP Control

Hi Shaun,

client1:Send("32773 \r\n")

From the logs :

I send

Dispatched "Script" Command:
[Command Name=Pause; ID=450]
[Payload DeviceID=0; EventString=Script]
[Variable Name=Lua; Value=client1:Send("32773 \r\n")]

I recieve

[Payload DeviceID=18; EventString=OnTCPClientReceive]
[Variable Name=IP; Value=192.168.0.6]
[Variable Name=Port; Value=2663]
[Variable Name=Encoding; Value=ASCII]
[Variable Name=Data; Value=32773 -1
]

And then the normal

[Payload DeviceID=18; EventString=OnTCPClientReceive]
[Variable Name=IP; Value=192.168.0.6]
[Variable Name=Port; Value=2663]
[Variable Name=Encoding; Value=ASCII]
[Variable Name=Data; Value=1010 00:04:25 / 00:42:04
]

style data....carrying on playing as normal !

Ta,

 


  
  19 Jun 2007, 9:14 PM
Alaric is not online. Last active: 16/12/2007 19:59:02 Alaric

Top 10 Posts
Joined on 03-26-2007
Posts 41
Re: Theatertek goes public with IP Control

Hi There,

Further,from the specs

An unsuccessful command returns:
Command, space, -1

Yet

#define ID_PAUSE                        32773

The -1 is the error code, but it also confirms that it is receiving it corectly isn't

Yet

Dispatched "Script" Command:
[Command Name=Name_test; ID=466]
[Payload DeviceID=0; EventString=Script]
[Variable Name=Lua; Value=client1:Send("0000 \r\n")]

returns

[Payload DeviceID=18; EventString=OnTCPClientReceive]
[Variable Name=IP; Value=192.168.0.6]
[Variable Name=Port; Value=2663]
[Variable Name=Encoding; Value=ASCII]
[Variable Name=Data; Value=0000 TheaterTek DVD
]

as expected !

I'm confused.

Ta,

     Lee


  
  19 Jun 2007, 9:29 PM
Alaric is not online. Last active: 16/12/2007 19:59:02 Alaric

Top 10 Posts
Joined on 03-26-2007
Posts 41
Re: Theatertek goes public with IP Control

Hey,

Cracked it...

#define IP_WM_COMMAND  5000  // AP->TT Internal command

WM_COMMANDS
-----------
#define ID_PLAY                         32771
#define ID_STOP                         32772
#define ID_PAUSE                        32773

hence its

client1:Send("5000 32773 \r\n")

to pause..etc

Ta,

 Lee


  
  20 Jun 2007, 12:07 PM
Alaric is not online. Last active: 16/12/2007 19:59:02 Alaric

Top 10 Posts
Joined on 03-26-2007
Posts 41
Re: Theatertek goes public with IP Control

Hi There,

After some playing this morning, i Have TT & The Autokiller prog (used to start/end TT) working nicely for 1 way communications, So same as a normal DVD player remote. Actualy in the specs TT has the capability to do everything you can do with a keyboard for set-up etc, but 99% of the time I'm just going to use it as a DVD player, i'll configure aspect control, settings etc with a mouse.

However when you send some of the commands you do get data back, plus there is the continous playback update :

[Payload DeviceID=18; EventString=OnTCPClientReceive]
[Variable Name=IP; Value=192.168.0.6]
[Variable Name=Port; Value=2663]
[Variable Name=Encoding; Value=ASCII]
[Variable Name=Data; Value=1010 00:04:25 / 00:42:04
]

So...How do i do something with the data....With the serial plugin there is a central script which i have parsing the data to some effect, however with this client i just have a return value...Am i going to have to parse the return from each command...and what happens to the general return string as above ???

BTW - hopefuly when i have an web interface for it i'll post in the customer section and save people some hassle !

Thanks,

              Lee


  
  22 Jun 2007, 7:50 AM
Chipmunk is not online. Last active: 20/08/2009 20:17:19 Chipmunk



Top 10 Posts
Joined on 07-19-2006
London, England
Posts 167
Re: Theatertek goes public with IP Control

Hi lee,

There are a couple of methods for handling TCP client events from Lua which are outlined in the help documentation and the installed TCPClient sample command tree. These scripts are more useful for parsing a continuous stream of feedback data. Don't forget you can also use TransactSend from script for those commands that immediately return a value.

Glad to hear that you've got Theatertek working with Chipmunk. Theatertek is a great piece of software.

Shaun




Chipmunk AV Controller Founder

  
 Page 1 of 1 (11 items)
Chipmunk AV Forums » Plugins » TCP Client » Re: Theatertek goes public with IP Control

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated