Crestron Control Sample Code

SVSi makes a concerted effort to keep all modules for Crestron control up to date and working with all SVSi equipment when controlling with an N-COMMAND Controller (N8001,N8002,N8012).  Please download and use the sample code on this page when programming Crestron and SVSi projects.


For Direct Control of Units through any Third Party Control system - please refer to our Direct Control API which can be found here:


NOTE: A "4d" on the socket connection status does not indicate that the N-Command has dropped or closed the connection between N-Command and a Crestron processor, it indicates that something outside of the code has caused the connection to be closed.  This could occur due to network traffic, programming/issues with a controller or many other factors.  It has been reported by multiple sites that in this instance, some programs do not automatically reconnect to the N-Command as it should.  One option that appears to resolve this issue is to explicitly issue a socket disconnect event within the code that makes the connection to the IP device.  In the instance of this sample code, that is the Conductor CM v1.2 code.  A program should actively monitor for a socket status event of "3d" (Connection Failed) or "4d" (Connection broken remotely) and in this instance immediately force the "connect" digital LOW, until the status returns to "5d" (Connection Broken Locally - IE the code has taken the action to disconnect the socket), and then attempt to reconnect to the device.  


N-Command Control:

Master File includes code for the following devices:

1) Conductor CCM V1.2 - Communicates between Crestron Processor and SVSi Controller

2) SVSi Decoder CCM V1.1 - Controls all SVSi decoders (N1000,N2000,N3000 and V-Series)

3) SVSi Encoder CCM V1.1 - Controls all SVSi Encoders (N1000,N2000,N3000, and V-Series)

4) SVSI ATR201 CCM - Controls ATR (Audio Transceiver) Note - does not work with N-4321

5) SVSI N4321 CCM - Controls N4321

5) SVSi VWP120 CCM - Controls N1510,N2510, VWP120


 UPDATE:  Sample Control File


The link above will allow you to download a sample file for Crestron integration with SVSi's N-Command.  It details basic setup of the connection between the Crestron processor and the N-Command.  It also includes basic encoder/decoder controls and the various methods of both IR and SERIAL control.  This is designed to be a GUIDE for programmers in beginning integration programming for Crestron systems.  File also includes a reference Touch Panel File.


Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk