IN THIS ARTICLE
Web Communicator Cloud Gem Portal
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 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
On the Users tab, click Create OpenSSL User. In the following images, the client IDs and GUIDs have been truncated for privacy.
You are prompted to download the following three credentials files, which are automatically generated:
webcommunicatorkey.pem
webcommunicatordevice.pem
deviceInfo.json
Save these files in the user storage directory
@user@\certs\aws
for your application or platform. For a PC, the directory islumberyard_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.
Changing the Status of a Client
To change the status of a client
Click the Client ID that you want to change.
From the drop-down menu for the client, choose Ban to ban the user.
Choose Unban to unban a banned user.
Sending a Message to a Specific Client
To send a message to a specific client
Select Send Message from the drop-down menu for the client to which you want to send a message.
For Channel, choose a cloud gem to which to send the message.
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
Click the ID of the client whose messages you want to listen to.
From the drop-down menu for the client, choose Listen.
Viewing Current Activity
To view current activity
On the Users tab, click the ID of a client.
On the activity pane, you can send a message, ban the user, or unban the user.
For Current Activity, select the channel whose messages you want to see.
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.
Sending a Message Through a Channel
To send a message through a channel
Choose Send message from the drop-down menu for the channel.
Broadcast channels can send messages to all clients. Private channels can send messages only to a specific client.
For Client ID, select the client to which to send the message.
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.
Note
To send a message from the Activity pane, click Send Message.