How to Use Chatbot with QBoat Sunny

QIoT technology to allow you to explore potential IoT business opportunities.
Smart home/Smart building/Smart City/
Post Reply
Stevenmwshyu
New here
Posts: 4
Joined: Tue Jul 23, 2019 4:39 pm

How to Use Chatbot with QBoat Sunny

Post by Stevenmwshyu » Wed Jul 24, 2019 11:09 am

Easy-to-read version : https://qiot.qnap.com/blog/2019/07/24/u ... oat-sunny/

In this tutorial, we will be using Chatfuel to control a light bulb by interacting with our chatbot in Facebook Messenger.

What You’ll Need:
QBoat Sunny
QIoT Suite Lite
MediaTek LinkIt 7697
Relay and Power Plug (Reference: Web Controlled Socket by Arduino by Laisan)
AP Wireless Router
Lightbulb
Facebook Account
Files used: Download Here
Create and Setup QIoT
Open QIoT Suite > IoT Applications > Import > select chatbot-light.json

Open the uploaded QIoT Application.

Navigate to the Rule tab.

Create and Setup our Chatbot via Chatfuel
Register or sign-in to Chatfuel using your Facebook account.
Click Create from Template.

Select Blank Bot.

Click Connect.

Select the page you’d like Chatbot to operate on.

Navigate to Automate and add a block.

Rename the block and add a text element which you want to show in Facebook Messenger.

In QIoT Suite, go into the Dashboard tab and click on the icon shown below. This will open a new tab to show your current dashboard layout for your QIoT Application.

In the new tab, copy this portion of the URL.

Head back to Chatfuel and click Add Button (Optional).

Rename the button, then click URL and enter the URL.
URL: <dashboard URL (copied from before)>/Option?Switch=on

Follow Steps 10-11 to make another button for off.
URL: <dashboard URL (copied from before)>/Option?Switch=off

Head to Set Up AI and type light or any activating keywords you’d like to use.

Click Add Block and select QIoT (the block we created earlier).

Head back to Automate tab.

Connect LinkIt 7697


Connect the Relay and Power Plug to LinkIt 7697.
GND to GND
VCC to 5V
Signal to P3
Download and Install the Arduino IDE here
Open HTTPRelay.ino to Arduino IDE and change network SSID and password accordingly.

Upload HTTPRelay.ino to LinkIt 7697 via Arduino IDE.

Open the Serial Monitor (Ctrl + Shift + M). The serial monitor will show LinkIt’s IP address. Copy this IP address.

Connecting QIoT Suite to LinkIt
Head back to QIoT Suite and double-click on LightOn node, then replace the URL with your the URL you copied from Arduino IDE, then hit Done.
URL: http://<your-ip>/ON_1

Repeat with LightOff node.
URL: http://<your-ip>/OFF1
Click Save.

Test If It Works
Head back to Chatfuel and click Test your bot

Enter light and select on to turn on the lightbulb, off to turn it off. Of course, this will appear on your own Facebook Messenger.

Additional References:
Original Github: https://github.com/blackmesataiwan/qboa ... ot_control

Post Reply

Return to “QIoT”