Home Automation Event Handler for PubNub BLOCKS
Pubnub block creation
Step 1 :
Login to the PubNub admin page with valid credentials.
Step 2 :
Click the "CREATE NEW APP" by giving a name to your APP.
You can see the newly created APP in the page.
Step 3 :
Click on the newly created APP.You can see the Demo keyset for the new application created.
Step 4 :
Click on the Demo keyset and click on the Blocks (on the left side).
Step 5 :
Create a new Block by giving the block name and description to the block.
Step 6 :
Create the Event Handler by clicking CREATE button at the bottom.
Step 7 :
Give the Name of the Event handler, Channel to communicate with the block and the option of when block code should execute(Before of After publish of the message).
Step 8 :
Click on the newly created Event handler.
Step 9 :
Copy the block code in the text area from here, and save it. before saving, ensure that you have filled in your conversation service credentials.
Step 10 :
Click on the Start block button(top right) to start the block.
Your PubNub BLOCK is now running. The virtual agent is ready to accept dialogs from the user.