Эта страница является
переводом страницы
Crestron. Перевод выполнен на 100%.
iRidium for Crestron
a set of tools for creating interfaces for controlling Crestron processors
Description
The documentation was updated on 22.11.2021
Description
iRidium for Crestron is a set of tools for creating interfaces to control homes or offices on the basis of Crestron equipment. iRidium works on iOS, Android, Windows, Mac and can connect to several processors at a time.
iRidium work is tested on CP2e / CP-3 / CP-4 / VC-4.
Connection
Equipment configuration and settings required for iRidium to control Crestron.
Connection to processors
iRidium connects to equipment directly, without using any additional hardware.
iRidium communicates with Crestron joins. You can get the list of joins from *.smw (SIMPL™) projects.
Import of joins from SIMPL Windows projects
1 When creating a project in SIMPL Windows do not forget to add any panel to a project and set its identifier IP ID – iRidium control devices will use this IP ID to connect to the Crestron controller. Save the project in SIMPL Windows (*.smw).
Simpl Windows works only in the system coding, that;s why use only EN symbols in projects when working in Simpl Windows.
2 Open iRidium Studio, go to the Devices tab, choose Scanner / Import > Crestron (Simpl, *smw).
3 Choose a project file in the *.smw format in the wondow that appears.
4 Choose if you want to save the initial structure of the Crestron driver or to convert it into a standard view of iRidium drivers. Enter devices and joins (commands) that will be added to the project.
5 As a result, a tree will be created consisting of a device (a controller) and project joins:
Commands & Feedbacks
As a result we have two levels of PLC settings:
- Crestron - the driver unites the list of joins of the Crestron processor
- Commands and Feedbacks - the commands and feedbacks inside devices. They enable control of joins. The commands are joins available for writing, the channels are joins available for reading.
Commands and feedback channels have to be assigned to project graphic items to control equipment:
- Commands are assigned to graphic items indicating the value to be sent to joins when clicking on the items
- Feedback channels are assigned to graphic items to display the joins state
To assign commands or channels to graphic items use the drag&drop method.
Below you can see examples of commands for control of different types of registers.
Types of Crestron joins:
- Digital - a bit variable (0 .. 1). It is used in commands and status channels
- Analog - a16-bit unsigned variable (0 .. 65535). It is used in commands and status channels
- Serial - a data string in the ASCII UNICODE and Legacy formats. ASCII text is sent in the UTF8 coding. Legacy is used to work on processors of the second series.
Setting Connecttion to the Processor
At the moment the Crestron driver has two types of connections to work with processors of series 2 + Crestron mobile and processors of series 3,4 + virtual control.
- CIP or CIP+SCTP - cp2e/crestron mobile (by default);
- CIP or SCIP - cp3/4+ vc4.
CIP or CIP+SCTP:
- Host - IP-address of the controller;
- Port - Crestron control port (41794);
- IP ID - ID of a panel in SIMPL project (enter in a decimal form, 0D => 13);
- Telnet Port - Telnet port for a switched-off SSL (41795);
- Telnet Login - leave it blank;
- Telnet Password - leave it blank;
- Telnet SSL - encrypting is turned off (False).
CIP or CIP+SCTP Telnet connection (insecure connetion, ssl-false):
- Host - IP-address of the controller;
- Port - Crestron control port(41794);
- IP ID - ID of the panel in SIMPL project (enter in a decimal form, 0D => 13);
- Telnet Port - Telnet port for a turned off SSL (41795);
- Telnet Login - leave it blank;
- Telnet Password - leave it blank;
- Telnet SSL - encrypting is turned off (False).
CIP or CIP+SCTP Telnet connection (secure connection, ssl-true):
- Host - IP-address of the controller;
- Port - Crestron control port(41794);
- IP ID - ID of a panel in SIMPL project (enter in a decimal form, 0D => 13);
- Telnet Port - Telnet port for turned on SSL (41797);
- Telnet Login - Telnet login;
- Telnet Password - Telnet password;
- Telnet SSL - encrypting is on (True).
CIP or SCIP (insecure connection) :
- Host - IP-address of the controller;
- Port - Crestron connection port (41794);
- IP ID - ID of a panel in SIMPL project (enter in a decimal form, 0D => 13);
- Secure Connection - ssl encryption is on (false);
- Room ID - Instance Room ID.
CIP or SCIP (secure connection) :
- Host - IP-address of the controller;
- Port: Crestron control port (41794);
- IP ID - ID of a panel in SIMPL project (enter in a decimal form, 0D => 13);
- Secure Connection - ssl encryption is on (true);
- Login - SSL login;
- Password - SSL password;
- Room ID - Instance Room ID;
To work via the Internet, indicate the public IP-address of the router to which the processor is connected and set up Port Forwarding.
You can see the public IP-address of the router here
Change of connection settings
You need the possibility to change connection properties when you disconnect from the Wi-Fi network of the automation object and start using 3G or another Wi-Fi network. To maintain control of the object you need to switch from the local to public IP-address of the Internet router.
The switch is not automatic. You have to select the connection mode. For remote acces you have to make ports for controlling the automation system public. In order to do that you have o set up the Port Forwarding service on your Internet router. VPN can provide protected connection.
1 Download the template (*.js) (right-click button: "Save object as ..."), add the template in the script editor with the button
(+) Add Script from file
2 Set up script properties as it is shown in the example:
- function Internal_1() {
- IR.GetDevice("Crestron").SetParameters({Host: "192.168.0.100", Port: 41794, NetID: 3, TelnetPort: 41795, TelnetSSL: 0});
- }
- function External_1() {
- IR.GetDevice("Crestron").SetParameters({Host: "215.110.10.10", Port: 41794, NetID: 3, TelnetPort: 41797, TelnetLogin: "admin", TelnetPassword: "pass", TelnetSSL: 1});
- }
Copy the driver name from Projeсt Device Panel - the list of properties has to be copied from the example.
3 Select the button which will be responsible for the switch of Internal and External properties. Open Macros Editor for the Press event (Object Properties > Programming), select the Script Call command and add it by double-clicking on it. Select the name of the function which will be activated by the button:
Now each pressing on the button will apply the corresponding connection properties.
Examples:
// SSL turned Off
IR.GetDevice("Crestron").SetParameters({Host: "192.168.0.100", Port: 41794, NetID: 3, TelnetPort: 41795, TelnetSSL: 0})
//SSL turned On
IR.GetDevice("Crestron").SetParameters({Host: "215.110.10.10", Port: 41794, NetID: 3, TelnetPort: 41797, TelnetLogin: "admin", TelnetPassword: "pass", TelnetSSL: 1})
//Host - IP address
//Port - connection port
//Login - login, if needed
//Password - password, if needed
//NetID - Panel ID from SIMPL project in DEC format (not HEX!)
//TelnetPort - 41795 if SSL disabled, 41797 if SSL enabled
//TelnetLogin - Telnet login
//TelnetPassword - Telnet password
//TelnetSSL - 0 - don't use / 1 - use
Настройка команд и фидбеков
To control equipment it is required to set commands (Commands) and feedback channels (Feedbacks). To send a command, drag'n'drop it on a graphic item and enter a value to send. To display feedback drag'n'drop a feedback channel on a graphic item and choose how to output or display a value.
Read more about work with graphic items in the
"Types of graphic items" article.
Possible settings of commands, channels and graphic items are given below:
Digital
Command:
| Type |
Digital |
the Digital join (boolean) is available for writing and reading
|
| Join |
1 .. n |
the join address
|
| Value * |
|
the value
|
| 0 .. 1 |
|
0 = Off, 1 = On
|
* - indicate when dragging the command on graphic items
Feedback:
The settings are similar to commands. Values come to Feedback and they can be used for displaying the status of joins on items.
Analog
Command:
| Type |
Analog |
the Analog join (2 bytes) is available for writing and reading
|
| Join |
1 .. n |
the join address
|
| Value * |
|
the value
|
| 0 .. 65535 |
|
2 bytes
|
Feedback:
The settings are similar to commands. Values come to Feedback and they can be used for displaying the status of joins on items.
Serial
Command:
| Type |
Serial |
the Serial join
|
| Join |
1 .. n |
the join address
|
| Value * |
|
the value
|
| string |
|
ASCII, UNICODE, Legacy
|
Feedback:
The settings are similar to a command. Values come to Feedback and they can be used to display the status of joins on items
Getting images via Serial Join: