Connect Raspberry Pi to QNAP NAS Via QIoT Suite Lite

by winniecheng in Workshop > Tools

6811 Views, 19 Favorites, 0 Comments

Connect Raspberry Pi to QNAP NAS Via QIoT Suite Lite

^73ABAFB014914CE0CCB0ABF43ED67EE2E18C1EE34D677E44DC^pimgpsh_fullsize_distr.jpg

In this tutorial, you will learn the basics of working with Raspberry Pi (that runs the Debian-based Raspbian). You will then learn how to connect your devices to QNAP NAS using QIoT Suite Lite.

Connect Raspberry Pi to QNAP NAS

raspberry-pi-qiot-v2_02.png

Please configure your Raspberry Pi device with an operating system, set up your development environment, and deploy an application to Raspberry Pi.

1.1 What will you need

  • Raspberry Pi
  • SD card (an 8GB class 4 SD card is recommended) with NOOBS installed.
  • HDMI display.
  • USB keyboard and mouse.
  • Power Supply: The Pi requires a USB micro power supply with at least 2A at 5V for the Model 3B, or 700mA at 5V for earlier models.

1.2 Set up Raspbian

  • Insert the SD card containing extracted NOOBS files into the Raspberry Pi
  • Connect the keyboard, mouse, and HDMI display to the Raspberry Pi. Plug in the power adapter. The Raspberry Pi does not have a power switch, and will automatically power on once the adapter is connected.
  • A menu will ask what OS to install and what language and keyboard layout to use. Check the box next to Raspbian and click "Install".

The Installation Process May Take Up to 20 Minutes, and Will Restart to the Raspbian Desktop When Complete.

raspberry-pi-qiot-v2_03.png

Configure Wi-Fi – in the Desktop Environment Locate the Wireless Network Icon in the Top-right Menu and Click the Icon to View a List of Available Wi-Fi Networks.

raspberry-pi-qiot-v2_04.png

To Connect to Your Raspberry Pi From Another Device, You Must Know the Pi’s IP Address. Using the Terminal (Ctrl + Alt + T to Open Terminal), Enter Hostname -I.

raspberry-pi-qiot-v2_05.png

Install Nodejs and Required Libraries

raspberry-pi-qiot-v2_06.png

  1. Install node.js v6

  • Please visit QNAP github for QIoT Suite Lite sample code

Create Your Device in QIoT Suite Lite

raspberry-pi-qiot-v2_07.jpg

Install QIoT Suite Lite

  • QIoT Suite Lite can be installed from the App Center.

Launch and Log in QIoT Suite Lite. the Default Username and Password Is "admin".

raspberry-pi-qiot-v2_09.jpg

Create a New IoT Application

raspberry-pi-qiot-v2_11.png
raspberry-pi-qiot-v2_12.png

If this is your first time to use QIoT Suite Lite, QIoT Suite Lite provides a wizard to help you quick setup a IoT application.

  • Click “Quick Setup Wizard” to start quick setup wizard. After you read the QIoT Suite Lite introduction in pop window, click Next button.

Create a New IoT Application

raspberry-pi-qiot-v2_13.png

  • Enter IoT Application name, e.g., app_1.
  • Rule name and Dashboard name will be generated automatically based on the name of IoT Application you fill in.
  • Click “Next” to complete create a new IoT application

Click "+ Add" to Add This Application’s Device.

raspberry-pi-qiot-v2_14.png

After Click "+ Add", in “Add Thing”:

raspberry-pi-qiot-v2_15.png

  • Enter a name for your device (e.g., raspberrypi) and provide 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 to add the device.

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.

raspberry-pi-qiot-v2_16.png

In "Resources", Click "Add Resource".

raspberry-pi-qiot-v2_17.png

After Click "Add Resource", in "Add Thing Resource":

raspberry-pi-qiot-v2_18.png

  • 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"

raspberry-pi-qiot-v2_19.png

  • If 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.

raspberry-pi-qiot-v2_20.png

A Sample Dashboard Will Be Created.

raspberry-pi-qiot-v2_21.png

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.

raspberry-pi-qiot-v2_22.png

More Information About QNAP QIoT Suite Lite