# Quick Start

Introduction on how to establish a serving-end for direct control of Colorlight’s players.

descript

  1. The message body of the interaction between the server and the device is the command; The interaction can be realized by sending commands via interfaces;
  2. The normal terminal connection can be realized with a few interfaces; further functions can be developed based on those interfaces;
  3. All requests of the device are with basic authentication, which is ignored in this document but can be processed in batch if necessary;
  4. There are 2 types of protocols for the interaction between the device and the server, namely, http and websocket;
  • Http: The device receives command as scheduled (there could be a short time difference between command transmission and implementation), without the need for a long connection;
  • Websocket: The server should keep a long connection with the device, which will send heartbeat regularly; the server should give a timely response to the heartbeat and send corresponding commands.

The contents of http and websocket are the same but in slightly different structure.

# Player Working Method

# Connect Player to Server

  1. Server establishes relevant interfaces;
  2. Configure the link to the device.

Connect the host computer to the device and then access the configuration page.

Network & internet: Advanced network settings > Advanced, then select the desired connection for network settings.

descript

     Configure the connection: ensure the server and the device share the same network segment, then access Advanced > Cloud Account > Modify

descript

     You will see Internet: Connected in the interface once the connection is successful.

# Interaction Method Between Player and Server

  1. Obtain commands via http polling, with an interval of 5 seconds (5 minutes for ws connection).

  2. The server send message to the device via webscoket.