Crestron

From SpinetiX Support Wiki

Jump to: navigation, search

Introduction

Crestron and SpinetiX have teamed up to bring you the cutting-edge signage experience of the future. SpinetiX is Crestron’s Integrated Partner, certifying that SpinetiX products operate seamlessly with Crestron's smart-building technology (namely Crestron Fusion) and remote control systems (like controllers, touch screens etc.), via network or serial connections.

About Crestron Electronics

Crestron

Crestron Electronics has carved the path for technological innovation since 1971, creating automation solutions that transform the way people live their lives, making their day-to-day tasks easier and improving efficiency and productivity. They strive to be at the forefront of cutting-edge technology, constantly offering faster, better solutions that address the needs of customers the world over. Crestron drives innovation by partnering with industry-leading, cutting-edge manufacturers across the globe to bring customers seamless technology integration for an unparalleled user experience.

For more information about Crestron Electronics, please visit www.crestron.com.

Room scheduling with digital signage

The combination of Crestron and SpinetiX technologies brings a true synergy between digital signage and smart-building. It empowers room scheduling systems and offers additional customer benefits including:

  • Richness of interactive content displayed on the screens (videos, images, messages)
  • An easy, consistent customization of the screens with customer branding
  • Digital signage as default content when room scheduling is not used.

Crestron Fusion monitoring and scheduling software adds a layer of intelligence to turn an organization into a high-performance enterprise. SpinetiX showcases the advantages of this seamless technology integration in the example of Crestron network room scheduling enhanced with SpinetiX digital signage.


Note  
For more details about this integration, see the official Crestron partnership flyer.

Remote control

The HMP devices can be integrated with Crestron products, allowing you to remotely control the player - a dedicated SpinetiX HMP Series Crestron module was developed to offer general function polling and power control of the SpinetiX HMP Series players via TCP/IP, such as:

  • Monitor the HMP status and send maintenance commands to the player, such as restart and shutdown.
  • Change the content displayed on the screen connected to the HMP.
  • Send messages (such as welcome messages) to the HMP .


For further integrations, the following remote control APIs can be used to communicate between the Crestron controller and the HMP:

Supported Crestron devices

The list below is not exhaustive and other similar devices should work as well. You are invited to share your experiences with devices you have successfully tested, so it remains up-to-date.

Device Type Added on Tested by Notes
MPC-M5 Control system 2018-02-06 Visuconcept (LU)
PRO2 Control system 2015-04-21 SpinetiX Discontinued product. Use PRO3 instead.
TSW-1052 Touch screen 2015-04-21 SpinetiX Discontinued product. Use TSW-1060 instead.

Tutorials

Setup

Setup

The typical setup is composed of the following materials:

  • Crestron Controller (e.g., PRO3)
  • Crestron touch panel (e.g., TSW-1060)
  • HMP device (e.g., HMP350, HMP200)
  • Laptop in the setup phase with the following software applications:
    • Elementi (for the content displayed on the screen)
    • SIMPL Windows, SIMPL+ (for the code)
    • VTPto (for the touch panel)

Remote control the displayed content

Controlling the media displayed by the HMP can be done using the TCP Shared Variable API and the Action to Switch widget from Elementi. The Crestron controller will be used to send commands to the HMP using raw TCP sockets similar to the way explained in the Send commands to the HMP using a Telnet client tutorial.

When commands are sent from the Crestron controller, an interactive project published on the HMP is used to react on the command and display the new media.

HMP

Configure the Action to Switch widget

The HMP Project is using the Action to Switch widget. The widget is configured to display one of the two image when the shared variable media is updated.

  1. Create a new Project
  2. Drag&drop the Action to Switch widget from the Library into yout main layout
    In this example we also use a clock.
  3. Change the name of the Shrared Variable to ‘media@localhost’
  4. Update the Mapping tabs with the media to be displayed.
    Make sure the Action name is set to 1, 2, …

Enabling the Network API on the player let the controller update the shared variable using the TCP API. It is also possible to test the published project without an Crestron controller, using the following URI:

http://[ip_of_the_player]:1234/update?media=1

Crestron

This section explain the principle to create the USP file to control the device. For a complete solution, contact your Crestron dealer.

The USP file need to create a Socket and send the control command to the HMP.

TCP_CLIENT tcpclient[20000];
STRING_PARAMETER IP_Address[25];
PUSH Connect
{
  INTEGER li_Port;
  li_Port = 1234;
  SOCKETCONNECTCLIENT(tcpClient, IP_Address, li_Port, 1);

}
RELEASE Connect
{
  SocketDisconnectClient(tcpClient);
}
  • PUSH Connect Open the Socket to the player.
  • RELEASE Connect Close the Socket to the player.
  • IP_Address is an parameter string with the IP of the HMP.
  • tcpClient is the socket.

Once the socket has been open, the control value can be sent:

STRING gs_TempSend[3000];
PUSH Media1
{
  INTEGER li_Index;
  li_Index = 1;
  MAKESTRING(gs_TempSend, "UPDATE \x22media\x22 \x22%d\x22\x0D\x0A", li_Index);
  SocketSend(tcpClient, gs_TempSend);
}
  • gs_TempSend is used to store the actual command (UPDATE "media" "1"), which will be send to the player

Send instant messages

Controlling the message displayed by the HMP can be done using the TCP Shared Variable API and the RSS Slideshow widget from Elementi 3.x.

The Crestron controller will be used to send commands to the HMP using raw TCP sockets similar to the way explained in the Tutorial: Send commands to the HMP using a Telnet client.

When commands are send from the Crestron controller, a special Project published on the HMP is used to display the message.

HMP

Configuring the Slideshow widget

Elementi X is needed to prepare the Project.

In this example we use the RSS Slideshow widget, but any other feed widgets can be used to display the message.

  1. Create a new Project
  2. Drag&drop the RSS Slideshow from the Library into your project and rename it to SV Slideshow
  3. Open the Data source configuration dialog (Data Feed Properties)
  4. Change the Type to ‘Shared variable’
  5. Change the variable name to ‘message@localhost’
  6. Change the Parser to ‘RegExp’
  7. Change the layout of the widget so that it is composed of a single text layer, filling up all the area, using the smart text ‘Headline – Uniform’ and whose text content is [[title]]

Crestron

The Opening and the Closing of the socket are the same function as the one presented in the previous section. The message to be sent to the player is an external parameters to be configured by the user.

STRING gs_TempSend[3000];
STRING_PARAMETER Message[255];
PUSH Message
{
  MAKESTRING(gs_TempSend, "UPDATE \x22media\x22 \x22%s\x22\x0D\x0A", Message);
  SocketSend(tcpClient, gs_TempSend);
}
  • gs_TempSend is used to store the actual command (UPDATE "media" "1"), which will be send to the player

Player monitoring and remote control

It is possible to monitor the status of the HMP using the Crestron controller. Typically the following informations can be retrieved from the player: serial number, name, temperature, disk space, CPU, ...

It is also possible to use the controller to restart or shutdown the player.

When monitoring or doing maintenance operation on the player, the RPC API need to be used. Sending a command becomes slightly more complex as the HTTP Protocol needs to be used.

An additional function is needed to prepare the command to be sent:

STRING_FUNCTION sfCreateCommand(STRING fls_Body)
{
  STRING ls_Temp[5000], ls_BodyStart[5];
  STRING ls_HeaderLine1[50], ls_HeaderLine2[50], ls_HeaderLine3[50], ls_HeaderLine4[50];
  ls_HeaderLine1 = "POST /rpc HTTP/1.0\x0D\x0A";
  MAKESTRING(ls_HeaderLine2, "Host: %s\x0D\x0A", IP_Address);
  ls_HeaderLine3 = "Content-Type: application/json\x0D\x0A";
  MAKESTRING(ls_HeaderLine4, "Content-Length: %d\x0D\x0A", LEN(ls_Body));
  ls_BodyStart = "\x0D\x0A";
  ls_Temp = ls_HeaderLine1 + ls_HeaderLine2 + ls_HeaderLine3 + ls_HeaderLine4 + ls_BodyStart + fls_Body;
  RETURN(ls_Temp);	
}
  • Note that port 80 must be used when opening the socket.

Sending a command using the RPC protocol becomes:

STRING gs_TempSend[3000];
PUSH Restart
{
  INTEGER li_Id;
  li_Id = 1;
  MAKESTRING(gs_TempSend, "{\x22method\x22:\x22restart\x22\x2C\x22params\x22:[]\x2C\x22id\x22:%d}"), li_Id;
  SocketSend(tcpClient, sfCreateCommand(gs_TempSend));

}
  • The command sent is actually {"method":"restart","params":[],"id":1}
This page was last modified on 9 August 2019, at 15:36.