Page 1 of 1

Serial commands

PostPosted: Wed Feb 11, 2009 3:11 am
by mzinman
I want to write my own iPhone app for the media server. I am wondering if there is any documentation on using serial commands...or better yet TCP/IP

MZ

Re: Serial commands

PostPosted: Wed Feb 11, 2009 10:11 am
by Jan Huewel
Dear MZ

you could connect to PB Spark to connect to any server player via both TCP or UDP

here you only need to send the Ascii commands for PBA that wrap the PBAutomation command set.

I am wondering how you would use serial via Iphone to output serial?

Best regards
Jan

Re: Serial commands

PostPosted: Wed Feb 11, 2009 5:47 pm
by mzinman
I've already looked into the SDk for pb (Designer and Switcher). I haven't looked at Spark, and will do.

But I want to write the app with the iPhone SDK. I can send serial commands via wifi, but I need something on the other end to read them. I know the iPhone SDK very well (I've written five iPhone apps now, http://www.zinmansoftware.com) and want to make an app for myself (not for sale) that I have in my own toolkit.

The other option is sending commands via TCP/IP, but is PB or MM able to read these commands and if so, what are the strings.

For now, I only want to have the iPhone trigger content and assign it to a layer. Nothing fancy. I plan to add more functionality in the future (like fx, position, etc.)


Update: Just looked online at Spark. This would work if I can have more control of commands (like layers, opacity, folders, etc...) is that possible? Can't find any documentation online.

MZ

Re: Serial commands

PostPosted: Wed Feb 11, 2009 6:15 pm
by Jan Huewel
Dear MZ

from what I understand Spark is the most flexible way to interface with the system for you

the documentation is in Spark here are the Strings that you can send both via TCP or UDP:

PB AUTOMATION REMOTE CONTROL
(PBA,Connect, "IP_Adress", "Domain")
(PBA,Disconnect)
(PBA,SetParam,"NodeID","DeviceID","ParamName","Value")
(PBA,SetMedia,"NodeID","DeviceID","DMX_Folder_ID","DMX_File_ID")
(PBA,SetMesh,"NodeID","DeviceID","DMX_Folder_ID","DMX_File_ID")
(PBA,SetCue,"SeqID","CUE_ID")
(PBA,SetSeq,"SeqID","Mode") - Mode "Play","Pause", "Stop")
(PBA,SetTime,"SeqID",Hours,Minutes,Seconds,Frames)
(PBA,NextFrame,"SeqID")
(PBA,LastFrame,"SeqID")
(PBA,NextCue,"SeqID")
(PBA,LastCue,"SeqID")
(PBA,SeqLevel,"Value")

PB Server V4 Control
(PBShutdownAll)
(PBRebootAll)
(PBShutdown,IP)
(PBReboot,IP)
(PBStartMaster,IP)
(PBStartClient,IP)
(PBClose,IP)

I hope this helps

Best regards
Jan

Re: Serial commands

PostPosted: Wed Feb 11, 2009 6:27 pm
by mzinman
This will work!

Thanks!



Question: For Layer 1, Media Folder 11 and File 21, would the string look like,

(PBA,SetMedia,1,1,11,21)




MZ

Re: Serial commands

PostPosted: Wed Feb 11, 2009 8:11 pm
by Jan Huewel
Dear MZ

This is correct.

Please be aware to first connect to a PB Master via

(PBA,Connect, "IP_Adress", "Domain")

once this command is sent you can constantly send other commands

If you want to switch to another Master use
(PBA,Disconnect)
first, and then reconnect to the new IP

Best regards
Jan

Re: Serial commands

PostPosted: Tue Feb 17, 2009 12:08 am
by mzinman
Question,

So we have the programming just about completed and are looking to test it. We have Spark set
up and I am trying to test it by using telnet to connect to it over TCP/IP,
but I can't connect.

What are you using to connect and send messages?

MZ

Re: Serial commands

PostPosted: Tue Feb 17, 2009 10:03 am
by Jan Huewel
Dear MZ

once you have entered a valid Port Number in Spark press the connect button

now the status image will turn orange, this means spark is in UDP receive mode and waits for a TCP connection.

All you need to do is connect as a TCP client to Spark and start sending ASCII messages.

Thru Spark you can connect to any PB Master by using its IP and Domain number

To send any control message to any PB system you will first need to open a connection to it:
(PBA,Connect, "IP_Adress", "Domain")
example:
(PBA,Connect,2.0.0.1,0)
This lets you connect to PB Master System with the IP 2.0.0.1 on Domain 0

Once this message is sent you can use the other control messages like
(PBA,SetParam,"NodeID","DeviceID","ParamName","Value")
example
(PBA,SetParam,1,1,Opacity,255)
This will set the Opacity of Server 1 Layer 1 to 255
Be aware that the Parameternames are case sensitive and must match the Parameternames that you can find in the Device Controls of the Pandoras Box Interface.

(PBA,SetMedia,"NodeID","DeviceID","DMX_Folder_ID","DMX_File_ID")
example
(PBA,SetMedia,1,1,10,2)
This will assign Folder10 File 2 to Server 1 Layer 1

I hope this helps

Best regards

Jan

Re: Serial commands

PostPosted: Sun Feb 20, 2011 3:02 pm
by Jan Huewel
Dear MZ

the sdk is currently available for native programming under Windows XP and 7

however you might want to use tcp to connect to spark or Widget designer.

Best regards

Jan Huewel