Sending a TCP command from Qlab

830 views
Skip to first unread message

Antti Ikonen

unread,
Mar 15, 2022, 1:27:54 PM3/15/22
to QLab
Hey,

I'm trying to send a command from Qlab to Neets system that controls our venue's curtains to close them. The command is set to be a message "preset-close". I have the device IP and the port.

Should I do it by script or by network cue?

Thanks!

MattM

unread,
Mar 15, 2022, 1:36:37 PM3/15/22
to QLab
If the command needs to go via TCP, I don't believe you can send it as a network cue.  

When I've had to use TCP commands (with a Blackmagic Hyperlink deck, which has a robust TCP protocol), I've used script cues that send "do shell script" TCP commands via netcat ("nc" for short, a fact that makes it notoriously difficult to locate in search engines).  This was enough of a pain to resolve that I wrote a pretty long "note to self" on the Blackmagic forum that walks through how to send "one-off" TCP commands via shell script.  If it's truly just a "connect to Neets via TCP, send a command, and close down the TCP connection" you're looking to do, this will do the trick.


I hope this is helpful!  For as fundamental a concept as TCP is, I was amazed how hard it was to find basic info about how to use it.

Cheers,
Matt

Antti Ikonen

unread,
Mar 15, 2022, 2:19:41 PM3/15/22
to QLab
Hey Matt,

Thanks for the tip!

I also found and tried this command, but so far I did nothing.

do shell script "echo \"(preset-close)\" | nc -w 0 192.168.1.120 7001"

I think I need to dive in a bit deeper to this.

MattM

unread,
Mar 15, 2022, 8:18:34 PM3/15/22
to QLab
I would suggest getting the command to work in Terminal first, then trying to write it in script.  It's a little easier to bang on TCP commands with a connection that stays open so you can see the reaction from the target -- whether the command is being received, understood but not acted on, etc.  Once you've got that working, it should be pretty straightforward to write it into an Applescript --

1. Open Terminal
2. Type nc 192.168.1.120 7001
3. That should open a TCP connection with your device, assuming the IP address and port are correct (and again, it's easier to troubleshoot TCP connections from the Terminal if they're not)
4. type preset-close 
5. See what happens!

Good luck!
M2

Reply all
Reply to author
Forward
0 new messages