clipsar

chat room for your home.

CLIPSAR COMMANDS CATALOG

Commands provide a unique possibility to trigger an action or send data to clipsar server or any other clipsar-enabled entity in the same network. Commands can be directly sent similar to any other text message using the clipsar console interface or other approaches described in developer area. Each command consists of two parts, a command message text and a command parameters text. When using the console interface for sending a command, content entered in the first line is interpreted as command message and anything in the remaining lines is interpreted as command parameters.

The following pages documents the commands provided by clipsar server and its direct sub-services:

The following pages documents commands provided by registered third party clipsar-enabled entities:

CLIPSAR SERVER COMMANDS

The following commands are supported by clipsar server:

invite

This command request an invitation code from the clipsar server which can be used by other clients to connect to the same network.

Parameters:

None

Example:

invite

Result:

The result is an invitation code which is sent to the client who has requested it by the invitation code message. The provided invitation code is valid for 60 seconds.

invitation code
2ofF

Logs:

Logging the invitation code message sent by clipsar server.

[log message]: sending message (invitation code).
2ofF

Logging the result of invite command call.

[log message]: message handler for (invite). invitation code generated (2ofF) valid for 60 seconds.

connect

Using the connect command a clipsar-enabled entity can request to join to a specific network using an invitation code.

Parameters:

  1. Invitation code (string): A valid invitation code received from a network with an invite command.

Example:

connect
2ofF

Result:

If the provided invitation code is valid a update entity data message will be sent by the clipsar server to the newly joined ce-entity.

update entity data
{"networkId":"b46w81Zwv3MXqdMUb2SGiudIh83j1wZC6", "invitationSession":"WGepla526V2eam3K", "classId":"601ba0542e5e471c", "classDisplayName":"Console", "entityId":"P6ExC13qH8wfhnm0", "entityDisplayName":null}

Additionally upon a call with a valid invitation code a update network data message will be sent by the clipsar server to all entities in the network with all the relevant network information.

update network data
{"ip":"89.204.135.220", "networkDisplayName":null, "invitationSession":"WGepla526V2eam3K", "invitationCode":"2ofF", "loggingEnabled":true, "classes":{"601ba0542e5e471c":{"classDisplayName":"Console", "entities":{"l6nu1km729p6I4rF":{"entityDisplayName":null, "socketId":"XsgsdaXmvOSe0YL7AAA-", "isGuest":false}, "P6ExC13qH8wfhnm0":{"entityDisplayName":null, "socketId":"ENj88oCyEYeqkryZAAAz", "isGuest":true}}}}}

Logs:

Logging the update entity data message sent by clipsar server.

[log message]: sending message (update entity data).
{"networkId":"b46w81Zwv3MXqdMUb2SGiudIh83j1wZC6", "invitationSession":"WGepla526V2eam3K", "classId":"601ba0542e5e471c", "classDisplayName":"Console", "entityId":"P6ExC13qH8wfhnm0", "entityDisplayName":null}

Logging the update network data message sent by clipsar server.

[log message]: sending message (update network data).
{"ip":"89.204.135.220", "networkDisplayName":null, "invitationSession":"WGepla526V2eam3K", "invitationCode":"2ofF", "loggingEnabled":true, "classes":{"601ba0542e5e471c":{"classDisplayName":"Console", "entities":{"l6nu1km729p6I4rF":{"entityDisplayName":null, "socketId":"XsgsdaXmvOSe0YL7AAA-", "isGuest":false}, "P6ExC13qH8wfhnm0":{"entityDisplayName":null, "socketId":"ENj88oCyEYeqkryZAAAz", "isGuest":true}}}}}

Logging the result of connect command call.

[log message]: message handler for (connect). the entity is added to the network as guest.
2ofF

drop guests

Asks the server to remove all the guests from the network and close the active invitation session. This function only can be called by non-guest members of the network.

Parameters:

None

Example:

drop guests

Result:

As a result of this call all the guests in the network will be disconnected and an update network data will be sent to all remaining entities in the network.

update network data
{"ip":"160.46.252.72", "networkDisplayName":null, "invitationSession":"U5QCQE99zW0KStjE", "invitationCode":null, "loggingEnabled":true, "classes":{"601ba0542e5e471c":{"classDisplayName":"Console", "entities":{"P6ExC13qH8wfhnm0":{"entityDisplayName":null, "socketId":"ENj88oCyEYeqkryZAAAz", "isGuest":false}}}}}

The disconnected entities will refresh themselves.

Logs:

Logging the disconnection of each guest member from the clipsar server.

[log message]: disconnect
User disconnected with IP: 89.204.135.220

Logging the update network data message sent by the clipsar server.

[log message]: sending message (update network data).
{"ip":"160.46.252.72", "networkDisplayName":null, "invitationSession":"U5QCQE99zW0KStjE", "invitationCode":null, "loggingEnabled":true, "classes":{"601ba0542e5e471c":{"classDisplayName":"Console", "entities":{"P6ExC13qH8wfhnm0":{"entityDisplayName":null, "socketId":"ENj88oCyEYeqkryZAAAz", "isGuest":false}}}}}

Logging the result of drop guests command call.

[log message]: message handler for (drop guests). in total 1 guests are dropped and the invitation session is closed.

If the drop guests function is called by a guest entity, no action will be taken by the clipsar server and the following message will be logged.

[log message]: message handler for (drop guests). drop guests calls are only accepted from host members.

get network data

The command to request general information about the network which hosts the ce-entity.

Parameters:

None

Example:

get network data

Result:

The result is an update network data message sent from clipsar server to the entity who has requested.

update network data
{"ip":"11.22.33.44", "networkDisplayName":null, "invitationSession":null, "invitationCode":null, "loggingEnabled":true, "classes":{"601ba0542e5e471c":{"classDisplayName":"Console", "entities":{"mjgXggjxAQPCIqHC":{"entityDisplayName":null, "socketId":"qXHTDsYxawRpYM0-AAAB", "isGuest":false}}}}}

Logs:

Logging the update network data message sent by clipsar server.

[log message]: sending message (update network data).
{"ip":"11.22.33.44", "networkDisplayName":null, "invitationSession":null, "invitationCode":null, "loggingEnabled":true, "classes":{"601ba0542e5e471c":{"classDisplayName":"Console", "entities":{"mjgXggjxAQPCIqHC":{"entityDisplayName":null, "socketId":"qXHTDsYxawRpYM0-AAAB", "isGuest":false}}}}}

Logging the result of get network data command call.

[log message]: message handler for (get network data).

get network statistics

The command to request statistical information about the network which hosts the ce-entity.

Parameters:

None

Example:

get network statistics

Result:

The result is statistical information about the network which is returned and logged with the response of the command call.

Logs:

Logging the result of get network statistics command call.

[log message]: message handler for (get network statistics). {"creationTime":"Tue Apr 04 2017 13:49:08 GMT+0000 (Coordinated Universal Time)","totalMessages":5,"totalEntities":1}

simulate message

The command to request the clipsar server to send a message from a given sender to a given receiver. The main purpose of this command is for testing measures.

Parameters:

Arguments are passed as a JSON object including the following information:

  1. senderClassId: The sender entity class id.
  2. senderEntityId: The sender entity, entity id.
  3. receiverClassId: The receiver entity class id.
  4. receiverEntityId: The receiver entity, entity id.
  5. message: The message which shall be sent.
  6. parameters: The parameters which shall be sent.

Example:

simulate message
{"senderClassId":"601ba0542e5e471c", "senderEntityId":"199XVk5ELC847Y79", "receiverClassId":null, "receiverEntityId":null, "message":"hello world!", "parameters":"Some parameter..."}

Result:

The result is a message sent from the clipsar server to the receiver entity, as if the sender is the provided sender entity. The message and its parameters stay as provided in the simulate message parameters.

hello world!
Some parameter...

Logs:

Logging the requested message sent by clipsar server.

[log message]: sending message (hello world!).
Some parameter...

Logging the result of the simulate message command call.

[log message]: message handler for (simulate message).
{"senderClassId":"601ba0542e5e471c", "senderEntityId":"199XVk5ELC847Y79", "receiverClassId":null, "receiverEntityId":null, "message":"test", "parameters":"Some parameter..."}

set entity name

The command to request the clipsar server to change the display name of the provided entity in the network.

Parameters:

Arguments are passed as a JSON object including the following information:

  1. classId: The class id of the entity whose name needs to be changed.
  2. entityId: The entity id of the entity whose name needs to be changed.
  3. entityDisplayName: The new display name of the specified entity.

Example:

set entity name
{"classId":"601ba0542e5e471c", "entityId":"199XVk5ELC847Y79", "entityDisplayName":"my drone!"}

Result:

As the result of this message call the clipsar server updates the assigned name for the given entity on the server and sends an update entity data to the affected entity.

update entity data
{"networkId":"b46w81Zwv3MXqdMUb2SGiudIh83j1wZC6", "invitationSession":"WGepla526V2eam3K", "classId":"601ba0542e5e471c", "classDisplayName":"Console", "entityId":"P6ExC13qH8wfhnm0", "entityDisplayName":"my drone!"}

Additionally an update network data message will be sent from the clipsar server to all entities in the network.

update network data
{"ip":"11.22.33.44", "networkDisplayName":null, "invitationSession":null, "invitationCode":null, "loggingEnabled":true, "classes":{"601ba0542e5e471c":{"classDisplayName":"Console", "entities":{"mjgXggjxAQPCIqHC":{"entityDisplayName":"my drone!", "socketId":"qXHTDsYxawRpYM0-AAAB", "isGuest":false}}}}}

Logs:

Logging the update entity data message sent by clipsar server.

[log message]: sending message (update entity data).
{"networkId":"b46w81Zwv3MXqdMUb2SGiudIh83j1wZC6", "invitationSession":"WGepla526V2eam3K", "classId":"601ba0542e5e471c", "classDisplayName":"Console", "entityId":"P6ExC13qH8wfhnm0", "entityDisplayName":"my drone!"}

Logging the update network data message sent by clipsar server.

[log message]: sending message (update network data).
{"ip":"11.22.33.44", "networkDisplayName":null, "invitationSession":null, "invitationCode":null, "loggingEnabled":true, "classes":{"601ba0542e5e471c":{"classDisplayName":"Console", "entities":{"mjgXggjxAQPCIqHC":{"entityDisplayName":"my drone!", "socketId":"qXHTDsYxawRpYM0-AAAB", "isGuest":false}}}}}

Logging the result of the set entity name command call.

[log message]: message handler for (set entity name). the entity name is updated.
{"classId":"601ba0542e5e471c", "entityId":"199XVk5ELC847Y79", "entityDisplayName":"my drone!"}

set network name

The command to request the clipsar server to change the display name of the network.

Parameters:

  1. networkDisplayName: The new name to be assigned to the network.

Example:

set network name
my home!

Result:

As the result of this message call the clipsar server updates the assigned name for the network on the server and sends an update network data message to all entities in the network.

update network data
{"ip":"11.22.33.44", "networkDisplayName":"my home!", "invitationSession":null, "invitationCode":null, "loggingEnabled":true, "classes":{"601ba0542e5e471c":{"classDisplayName":"Console", "entities":{"mjgXggjxAQPCIqHC":{"entityDisplayName":"my drone!", "socketId":"qXHTDsYxawRpYM0-AAAB", "isGuest":false}}}}}

Logs:

Logging the update network data message sent by clipsar server.

[log message]: sending message (update network data).
{"ip":"11.22.33.44", "networkDisplayName":null, "invitationSession":null, "invitationCode":null, "loggingEnabled":true, "classes":{"601ba0542e5e471c":{"classDisplayName":"Console", "entities":{"mjgXggjxAQPCIqHC":{"entityDisplayName":"my drone!", "socketId":"qXHTDsYxawRpYM0-AAAB", "isGuest":false}}}}}

Logging the result of the set entity name command call.

[log message]: message handler for (set network name). the network name is updated.
my home!

CLIPSAR-ENABLED ENTITY COMMANDS

The following commands are supported by every clipsar-enabled entity:

update entity data

This command is asking the entity to update the data assigned to it and usually is sent by clipsar server upon connection.

Parameters:

Arguments are passed as a JSON object including the following information:

  1. networkId: The id of the network which the entity is attached to.
  2. invitationSession: Invitation session id if the node is a guest, otherwise null.
  3. classId: The class id of this entity which shall match the existing value.
  4. classDisplayName: The display name assigned to the class of this entity.
  5. entityId: A unique id assigned to the entity by clipsar server.
  6. entityDisplayName: The display name assigned to this entity.

Example:

update entity data
{"networkId":"N1zVl17M0ana9vGOXw0GxecDISQQgR6Dr", "invitationSession":"n0fE6GU9AHfNF5SK", "classId":"601ba0542e5e471c", "classDisplayName":"Console", "entityId":"BavOgHr0eGg4E1dB", "entityDisplayName":null}

Result:

As a result of this call, entities update their internal initialization data. The activities required for initialization is done in the imported ce-xx.yy.js file.

update network data

This command is asking the entity to update the information regarding the network to which the entity is connected and usually is sent by clipsar server upon connection or addition or removal of a ce-entitiy in the network.

Parameters:

Arguments are passed as a JSON object including the following information:

  1. ip: The gateway ip of the ce-entities attached to this network.
  2. networkDisplayName: The display name assigned to this network.
  3. invitationSession: The current invitation session id for connected guests.
  4. invitationCode: The invitation code for new guests who need to attach.
  5. loggingEnabled: Boolean flag showing if the logging is enabled in network.
  6. classes: A JSON object with properties each specifying a classId connected in network including the following information:
    1. classDisplayName: The display name assigned to the class.
    2. entities: A JSON object with properties each specifying an entityId connected in network with the given class type, including the following information:
      1. entityDisplayName: The display name assigned to this entity.
      2. socketId: The id of the socket for the given entity.
      3. isGuest: A flag specifying if the entity is a guest in network.

Example:

update network data
{"ip":"82.113.121.9", "networkDisplayName":null, "invitationSession":"n0fE6GU9AHfNF5SK", "invitationCode":null, "loggingEnabled":true, "classes":{"601ba0542e5e471c":{"classDisplayName":"Console", "entities":{"X9Fj10v6BEqP0BLH":{"entityDisplayName":null, "socketId":"Kis4vQtuQF0HA8KLAAAA", "isGuest":false}, "tBlQ5l1w9b5VYILp":{"entityDisplayName":null, "socketId":"uisQhXQe6tIlg0hpAAAF", "isGuest":true}}}}}

Result:

As a result of this call, entities receive the latest information about the connections in the network. To propagate this info to the third party ce-entities the clipsar_NetworkStatusChange callback will be called.

invitation code

This command is providing an invitation code to the ce-entity which is usually requested via an invite command call to the clipsar server. The invitation code can be used by the entity to invite other entities to the network.

Parameters:

  1. Invitation code (string): A valid invitation code valid for 60 seconds.

Example:

Invitation code
Re42

Result:

As a result of this call, the entity who has requested an invite will receive an invitation code valid for atleast 60 seconds. This info is propagated to the third party ce-entities via the clipsar_InvitationCode callback call.

drop host

This command is asking the clipsar-enabled entity to drop its host if the entity is connecting as guest.

Parameters:

None

Example:

drop host

Result:

As a result of this call, the entity will leave the connected host network and join the network which is dedicated to its gateway ip. In case the ce-entity is not a guest the command will be ignored.

CLIPSAR CONSOLE COMMANDS

The following commands are supported by clipsar console:

The following commands are supported by clipsar console once entered locally:

log message

With this message the console window will log a message with the provided parameters on the log screen.

Parameters:

Arguments are passed as a JSON object including the following information:

  1. dateTime: The time this log message is logged on the clipsar server.
  2. senderClassId: The class id of the sender entity relevant to this log.
  3. senderEntityId: The entity id of the sender entity relevant to this log.
  4. receiverClassId: The class id of the receiver entity relevant to this log.
  5. receiverEntityId: The entity id of the receiver entity relevant to this log.
  6. message: The message to be logged.
  7. parameters: The parameters to be logged.

Example:

log message
{"dateTime":" Fri Apr 07 2017 13:51:32 GMT+0000", "senderClassId":" 601ba0542e5e471c", "senderEntityId":"18hc1JqSj7Jz6B94", "receiverClassId":null, "receiverEntityId":null, "message":"test", "parameters":null}

Result:

As a result of this call, the log screen will be updated with a new entry with the information provided in the message log.

navigate, open

Upon this command the console window will navigate to the provided URL.

Parameters:

  1. URL (string): The URL to be opened in place of the console window.

Example:

navigate
http://google.com

Result:

The console windows will be closed and the browser will navigate to the provided URL.

cls, clear, clear screen

This command clears the log screen.

Parameters:

None

Example:

clear screen

Result:

All the contents in the log window will be cleared with this command.

show time

Toggle the display of time in the log window.

Parameters:

  1. display (boolean): True or false boolean value.

Example:

show time
true

Result:

The time attribute will be displayed for all messages displayed on the log screen.

show sender

Toggle the display of sender in the log window.

Parameters:

  1. display (boolean): True or false boolean value.

Example:

show sender
true

Result:

The sender attribute will be displayed for all messages displayed on the log screen.

show receiver

Toggle the display of receiver in the log window.

Parameters:

  1. display (boolean): True or false boolean value.

Example:

show receiver
true

Result:

The receiver attribute will be displayed for all messages displayed on the log screen.

show parameters

Toggle the display of parameters in the log window.

Parameters:

  1. display (boolean): True or false boolean value.

Example:

show parameters
true

Result:

The parameters attribute will be displayed for all messages displayed on the log screen.

show log messages

Toggle the display of log messages in the log window.

Parameters:

  1. display (boolean): True or false boolean value.

Example:

show log messages
true

Result:

The log messages will be displayed for all messages displayed on the log screen.

leave host

This command will cause the console window to disconnect from the host if it is connected as a guest.

Parameters:

None

Example:

leave host

Result:

As a result of this call, the console will leave the connected host network and join the network which is dedicated to its gateway ip. In case the console is not a guest the command will be ignored.

REMOPLAY PLAYER COMMANDS

The following commands are supported by REMOPLAY player:

play

The player starts playing the current video receiving this command.

Parameters:

None

Example:

play

Result:

The player plays the curren video and sends a set play state message to all remotes in the network.

set play state
{"state":"playing", "time":1, "duration":10}

pause, stop

The player pauses playing the current video.

Parameters:

None

Example:

pause

Result:

The player puase the playback and sende a set play state message to all remotes in the network.

set play state
{"state":"paused", "time":1, "duration":10}

mute

The player mutes the audio.

Parameters:

None

Example:

mute

Result:

The player mutes the audio and sends a set mute message to all remotes in the network.

set mute
true

unmute

The player unmutes the audio.

Parameters:

None

Example:

unmute

Result:

The player unmutes the audio and sends a set mute message to all remotes in the network.

set mute
false

next

The player loads the next media in the play queue if available.

Parameters:

None

Example:

next

Result:

The player plays the next media in the play queue and refills the play queue if there are not more item left. After video is loaded a set player info message will be sent to all remotes in the network.

set player info
{"source":"youtube", "id":"sng_CdAAw8M", "title":"the video", "thumbnail": "https://yt3.ggpht.com/photo.jpg", "author": "somebody", "publicationDate": "Wed May 03 2017 08:36:44", "mediaType": "video", "volume": 100, "duration": 50, "time": 20, "playingState": "playing", "isMute": false, "hasNext": false, "hasPrevious": false, listId: "RGqs4gdrTD", "isPlaylist": true, "playBoardChangeCounter": "53122654132159", "playQueueChangeCounter": "53122654132159"}

previous

The player loads the previous media in the play queue if available.

Parameters:

None

Example:

previous

Result:

The player plays the previous media in the play queue. After video is loaded a set player info message will be sent to all remotes in the network.

set player info
{"source":"youtube", "id":"sng_CdAAw8M", "title":"the video", "thumbnail": "https://yt3.ggpht.com/photo.jpg", "author": "somebody", "publicationDate": "Wed May 03 2017 08:36:44", "mediaType": "video", "volume": 100, "duration": 50, "time": 20, "playingState": "playing", "isMute": false, "hasNext": false, "hasPrevious": false, listId: "RGqs4gdrTD", "isPlaylist": true, "playBoardChangeCounter": "53122654132159", "playQueueChangeCounter": "53122654132159"}

REMOPLAY REMOTE COMMANDS

The following commands are supported by REMOPLAY remote:

COUNTDOWN PLAYER COMMANDS

The following commands are supported by countdown player:

count

Receiving this command the player starts the count down.

Parameters:

  1. value (number): The value from which the count down will start.

Example:

count
10

Result:

Player will count down and sends a start message to all receivers in the network.

start

Additionally each second a counter value message will be sent by player to all remotes in the network.

counter value
5

COUNTDOWN REMOTE COMMANDS

The following commands are supported by countdown remote:

start

Upon receive of this command the remote knows that the countdown is started in the player.

Parameters:

None

Example:

start

Result:

The graphical user interface of the remote will be updated to represent the given state.

end

Upon receive of this command the remote knows that the countdown has finished in the player.

Parameters:

None

Example:

end

Result:

The graphical user interface of the remote will be updated to represent the given state.

counter value

This message inform the remote about the current counter value in the player.

Parameters:

  1. value (number): The current value of the count down in the player.

Example:

counter value
5

Result:

The graphical user interface of the remote will be updated to represent the given state.