Connect Arduino Yun to QNAP NAS Via QIoT Suite Lite
by winniecheng in Workshop > Tools
2262 Views, 5 Favorites, 0 Comments
Connect Arduino Yun to QNAP NAS Via QIoT Suite Lite
In this tutorial, you will learn the basics of working with Arduino Yun (that runs Linux). You will then learn how to seamlessly connect your devices to QNAP NAS using QIoT Suite Lite. This example is uses the DHT11 humidity and temperature sensor.
Configure Your Devices
1. Configure your devices
1.1 Download Arduino IDE
- Download and install the Arduino IDE based on your host PC: https://www.arduino.cc/en/Main/SoftwareMore
- Arduino tutorials can be found here: https://www.arduino.cc/en/Main/SoftwareMore
1.2 Configure and test your devices
If this is your first time using Arduino Yun, you will have to follow some steps to assemble it.
- Connect Arduino Yun to your PC with USB.
- Open your Arduino IDE and find Blink example.
Configure Your Board
Configure Your Port
Verify and Upload Your Blink Example to Arduino Yun
After Uploading Your Code to Arduino Yun, Check Your Arduino Yun and You Should See L13 Blinking
Connect Your DHT11 Sensor to "Ground", "5V", "Pin 2(Digital)" on Arduino Yun Respectively
Get the IP Address of Your Arduino Yun
- Press and hold the Wi-Fi reset button for 5 seconds.
Go to Your Wi-Fi Settings and Choose "Arduino-Yun-XXXXXXX"(where "XXXXXXX" Is the MAC Address of Your Arduino Yun).
Open Your Browser and Go to "http://192.168.240.1" or "http://arduino.local". the Default Password Is "arduino".
Complete Your Board Setting and Link Your Arduino Yun to the Router You Are Using. Skip "API Setting"and Click "Save".
- On your PC, change your Wi-Fi network to your router and now your NAS and Arduino will be on the same network.
Install Development Tools for Your Arduino Yun
- Open a Terminal from http://arduino.local
- Log in with the username "root" and your password. The default password is "arduino".
Install PIP and MQTT Library by Entering the Following Commands.
Create Your Device in QIoT Suite Lite
Install QIoT Suite Lite
- QIoT Suite Lite can be installed from the App Center.
Launch and Log in to QIoT Suite Lite. the Default Username and Password Is "admin".
Create a New IoT Application
If this is your first time using QIoT Suite Lite, click "Quick Setup Wizard" to start the quick setup wizard. After reading the introduction, click "Next".
Create a New IoT Application
- Enter the IoT Application name (for example: "app_1").
- The Rule name and Dashboard name will be automatically generated based on the IoT Application Name.
- Click "Next".
Click "+ Add" to Add This Application’s Device.
Click "+Add", in "Add Things"
- Enter a name for your device (for example: "arduino") and enter the device information (such as serial number and manufacturer) in Add attribute.
- If your device is already supported by QIoT (Arduino Yun,Raspberry Pi, Edison, and Linkit 7688 (Duo)), choose a pre-defined Thing Type.
- Click Add.
Enter the IP Address, User Name, and Password of Your Device and Click the Connect Icon. QIoT Suite Lite Will Check the Connection With the Device. After the Connection Is Verified, Click Next.
In "Resources", Click "Add Resource".
In "Add Thing Resource"
- Enter the name and ID for the sensor in Resource Name and Resource ID. Please note that the Resource ID will be used to create a Topic in the QIoT Broker. This ID should be unique for the device and no duplicates should be allowed for the same device.
In "API Keys"
f you want to embed QIoT dashboard widgets into web pages or access QIoT APIs from third-party applications, go to the API Keys tab and click "Generate New API Key". Click "Done".
Your IoT Application Will Now Be Created.
- Node.js sample codes and related files (certificate, resource information) will be uploaded to the specified path on your device.
A Sample Dashboard Will Be Created.
Go to the Rule Tab to Define the Flow or Rules on How to Process the Data Sent From the Device, and How to Present in a Dashboard.
More Information About QNAP QIoT
More information about QNAP QIoT, please visit https://www.qnap.com/solution/qiot-suite/en/
More Tutorial by visiting https://www.qnap.com/en/how-to/tutorial/qiot-suite...