Lumberyard
User Guide (Version 1.15)

Web Communicator Cloud Gem Portal

In the Web Communicator Cloud Gem Portal, you can manage WebSocket and OpenSSL users, send messages to them, and listen to messages from them. You can create OpenSSL users directly from the Cloud Gem Portal or register a WebSocket user from the CommunicatorSample level. The Cloud Gem Portal can broadcast and receive on the channels that are available through WebSocket connections to the AWS IoT service.

Prerequisites

This tutorial assumes the following:

  • You are using a Lumberyard project that has Cloud Gem Web Communicator enabled.

  • You have used Lumberyard's Cloud Canvas Resource Manager to create a project stack and a deployment stack in AWS.

  • You have opened the Cloud Gem Portal (in Lumberyard Editor, choose AWS, Open Cloud Gem Portal).

If you don't meet the prerequisites, follow the steps in Enabling Gems to add Cloud Gem Web Communicator in the Project Configurator. For information on creating a project stack and a deployment stack, see Tutorial: Getting Started with Cloud Canvas.

To open the Web Communicator cloud gem, click Web Communicator in the Cloud Gem Portal's Cloud Gems pane.


        The Web Communicator cloud gem

The Web Communicator cloud gem includes a Users tab for managing users and a Channel List tab for working with channels.

Managing Users

The Users tab lists all your clients. On this tab, you can create and manage users and send individual messages to them.

Creating an OpenSSL User

To create an OpenSSL user

  1. On the Users tab, click Create OpenSSL User. In the following images, the client IDs and GUIDs have been truncated for privacy.

    
                Create an OpenSSL user in the Web Communicator Cloud Gem Portal

    You are prompted to download the following three credentials files, which are automatically generated:

    • webcommunicatorkey.pem

    • webcommunicatordevice.pem

    • deviceInfo.json

  2. Save these files in the user storage directory @user@\certs\aws for your application or platform. For a PC, the directory is lumberyard_version\dev\Cache\project_name\pc\user\certs\aws.

    After the credential files are generated, a new OpenSSL user appears in the list, as in the following image.

    
                OpenSSL user created in the Web Communicator Cloud Gem Portal
Changing the Status of a Client

To change the status of a client

  1. Click the Client ID that you want to change.

  2. From the drop-down menu for the client, choose Ban to ban the user.

    
                Choose Ban to ban a user in the Web Communicator Cloud
                  Gem Portal
  3. Choose Unban to unban a banned user.

    
                Choose Unban to unban a user in Web
                  Communicator.
Sending a Message to a Specific Client

To send a message to a specific client

  1. Select Send Message from the drop-down menu for the client to which you want to send a message.

    
                Send a message to a user from the Web Communicator Cloud Gem Portal
  2. For Channel, choose a cloud gem to which to send the message.

    
                Choose a cloud gem for Channel in the Web Communicator
                  Cloud Gem Portal
  3. Enter a message in the Message box and then click Send Message.

Listening to the Messages Sent to a Client

To listen to the messages sent to a client

  1. Click the ID of the client whose messages you want to listen to.

  2. From the drop-down menu for the client, choose Listen.

    
                Choose Listen to monitor the messages from a
                  client
Viewing Current Activity

To view current activity

  1. On the Users tab, click the ID of a client.

  2. On the activity pane, you can send a message, ban the user, or unban the user.

    
                Change the status of a user or send messages to the user in the Web
                  Communicator Cloud Gem Portal
  3. For Current Activity, select the channel whose messages you want to see.

    
                Select a channel in the Web Communicator Cloud Gem Portal

    The messages sent to the client through the selected channel are listed in the activity pane.

Working with Channels

On the Channel List tab, you can view existing channels, send a message through a channel, and listen to a channel.

Viewing Existing Channels

To view existing channels

  • Click the Channel List tab.

    
                Click Channel List in the Web Communicator Cloud Gem
                  Portal
Sending a Message Through a Channel

To send a message through a channel

  1. Choose Send message from the drop-down menu for the channel.

    
                Choose Send message to send a message to a channel in
                  the Web Communicator Cloud Gem Portal

    Broadcast channels can send messages to all clients. Private channels can send messages only to a specific client.

  2. For Client ID, select the client to which to send the message.

    
                Select the client to send a message to in the Web Communicator Cloud Gem
                  Portal
  3. Enter a message in the Message box and then click Send Message.

Listening to a Channel

To listen to a channel

  • Do one of the following:

    • Click an entry in the channels table.

    • Select Listen from the drop-down menu for the channel.

    The messages sent through the channel are listed in the Activity pane.

    
                View messages in the Activity pane in the Web
                  Communicator Cloud Gem Portal.

Note

To send a message from the Activity pane, click Send Message.