Configure Network Commands for Appspace App Channel Browsing Mode

Share on print
Share on facebook
Share on linkedin
Share on whatsapp
Share on email

This article lists the instructions and the network commands that are available, to invoke certain functions remotely to a device running the Appspace App for Devices in channel browsing (interactive) mode, via a network.

Prerequisites

  • An Appspace supported device running the Appspace App for Devices. We currently support the following OS:
    • Android
    • BrightSign
    • Chrome OS
    • iOS
    • LG webOS
    • MediaVue SureVue
    • Universal Windows Platform (UWP)
  • Configure the device’s channel selection mode to “Users browse published channels” (channel browsing mode), either during device registration or device configuration.
  • Account Owner or Location Admin role in Appspace.
  • OS administrator privileges.
  • A WebSocket client application, or Packet Sender client application (UDP).
  • Add the following device property to the Appspace App device, for network commands to function.
    • Remote.Enable = True
  • For BrightSign devices, the UDP protocol is supported. Add the following device property:
    • Remote.brightsign.forceudp = True
Important
  • For MediaVue SureVue devices, the firewall must be disabled for network commands to function.

Execute Network Commands

  • To execute network commands, you must connect to the Appspace App via a WebSocket protocol.

  • The required port for Appspace App is 55537.

  • You may use your desired WebSocket client application to invoke the commands. Below is an example using HTML Javascript:

    // Create WebSocket connection.
    const socket = new WebSocket('ws://[device ip address]:55537');
    
    // Connection opened
    socket.addEventListener('open', function (event) {
        socket.send('?remote=system');
    });
    
    // Listen for messages
    socket.addEventListener('message', function (event) {
        console.log('Message from server ', event.data);
    });

App Navigation Commands

Listed below are the available commands to invoke navigation on the Appspace App, via the following code:

?remote=[action]

These are the available actions:

  • Device Menu = system
  • Up = up
  • Down = down
  • Left = left
  • Right = right
  • Select = select
  • Back = back

Example:

To launch the Device Menu on the Appspace App, execute the following command:

?remote=system

System Commands

Listed below are the available system commands to invoke a function in the Appspace App, via the following code:

?system=[action]

These are the available actions:

  • Restart the Appspace App = restart
  • Resync the Appspace App = resync
  • Reset content in the Appspace App = reset-content
  • Unregister the Appspace App = unregister

Example:

To restart the Appspace App, execute the following command:

?system=restart

Important
Executing system commands results in the Appspace App restarting, thus port 55537 must be opened again after the restart. This however does not apply when unregistering the Appspace App.

Channel Functions

Listed below are the available commands to invoke channel specific functions in the Appspace App, via the following code:

?channel=[action]&[searchby]=[value after URI encode]

Important
You must URI encode text strings that contain unicode and non-latin characters before executing these commands.

Example:

  • Channel name: My Channel

  • Network command: ?channel=loadchannel&channelname=[channel name]

  • Network command to execute:

    ?channel=loadchannel&channelname=My%20Channel
    

Listed below are the network commands for channel-specific functions.

  • Load channel

    To load channels either by channel ID or channel name, execute the following commands:

    • by ID: ?channel=loadchannel&channelid=[ID]

      Example:

      ?channel=loadchannel&channelid=52654
      
    • by Name: ?channel=loadchannel&channelname=[channel name]

      Example:

      ?channel=loadchannel&channelname=Appspace%20App%20Devices
      
  • Load channel group

    To load channel groups either by channel group ID or channel group name, execute the following commands:

    • By ID: ?channel=loadchannelgroup&channelgroupid=[ID]

      Example:

      ?channel=loadchannelgroup&channelgroupid=52654
      
    • By Name: ?channel=loadchannelgroup&channelgroupname=[channel group name]

      Example:

      ?channel=loadchannelgroup&channelgroupname=Appspace%20Business%20Solutions
      
  • Load live channel

    To load live channels either by channel ID, name, or number, execute the following commands:

    • By ID: ?channel=loadlivechannel&livechannelid=[ID]

      Example:

      ?channel=loadlivechannel&livechannelid=001
      
      Note
      With Appspace App 2.x, to load a live channel with an EPG provider, the ID denotes the GUID of the live channel found in the channel browsing script, which is not easily accessible. Thus, we recommend loading a live channel via name or number.
      However, if an EPG provider is not linked to the live channel, the ID denotes the live channel number instead.
    • By Name: ?channel=loadlivechannel&livechannelname=[live channel name]

      Example:

      ?channel=loadlivechannel&livechannelname=The%20Appspace%20Channel
      
    • By Number: ?channel=loadchannelbynumber&channelnumber=[live channel number]

      Example:

      ?channel=loadchannelbynumber&channelnumber=001
      
  • Load EPG

    To load the EPG data, execute the following command:

    ?channel=loadepg
    
  • Load Recently Added Page

    To load the Recently Added page, execute the following command:

    ?channel=loadrecent
    
  • Load Homepage

    To load the homepage, execute the following command:

    ?channel=loadhome
    
  • Search

    To search, execute the following command with a search keyword:

    ?channel=search&query=[keyword]

    Example:

    ?channel=search&query=Appspace%20App
    

Testing

  • To test network commands on UDP devices such as BrightSign, use the Packet Sender application which can be downloaded from https://packetsender.com/download.
  • Enter the command line in the ASCII field, and click the HEX button, which will auto-generate the Hex codes based on the ASCII Data.
Note
You may test invoking network commands to your Appspace App device by installing the Chrome extension Simple WebSocket Client or Dark Websocket Terminal from the Chrome WebStore.

Related Articles