Jeżeli macie Intel Edison i chcecie podłączyć go do QNAP IoT Suit to poniższy artykuł na pewno będzie pomocny Connect Intel Edison to QNAP NAS via QIoT Suite Lite - Hackster.io
GUIDE
Hardware components:
Software apps and online services:
STORY
Connect Intel Edison to QNAP NAS via QIoT Suite Lite
Get started with Intel Edison (Nodejs)
In this tutorial, you will learn the basics of using Intel Edison (that runs on the Linux-based Yocto). You will then learn how to seamlessly connect your devices to QNAP NAS using QIoT Suite Lite.
Please ensure your Intel Edison and NAS is on the same LAN.
Lesson 1: Configure your devices
In this lesson, you configure your Intel Edison device with an operating system, set up your development environment, and deploy an application to Intel Edison.
◦ Windows users
◦ Mac users
◦ Linux users
1.2 Configure and test your device
• Getting started with Intel Edison
If this is your first time using Intel Edison, you will have to follow some steps to assemble it.
Please follow steps 1-3 in the instructions.
Download the Intel® XDK cross-platform integrated development environment
• Verify and upload your onBoardBlink project to Intel Edison
1.3 Install Nodejs and required libraries
Lesson 2: Create your device in QIoT Suite Lite
In this lesson, you will provision your QNAP QIoT Suite Lite software, and create your first device in QIoT Suite Lite.
2.1 Install QIoT Suite Lite
2.2 Create a new IoT Application
IoT Applications are a combination of Things, Rules, and Dashboards. We recommend that you first create a “Things” in IoT Application. This IoT Application allows you to keep a record of all of the devices that are connected to your NAS.
Rules make it possible to build IoT applications that gather, process, analyze and act on data generated by connected devices. Rules can apply to data from one or many devices, and it can take one or many actions in parallel.
Dashboards turn your data into analytics and reports that provide real-time insights.
All these elements provide user a complete IoT Application environment.
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.
Click Next after you add all the resources (sensors) on your device.
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.
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.
CODE
Github
GitHub - qnap-dev/qnap-qiot-sdks: QNAP QIoT - quickly structure your IoT environment and deployment
GUIDE
Hardware components:
Software apps and online services:
STORY
Connect Intel Edison to QNAP NAS via QIoT Suite Lite
Get started with Intel Edison (Nodejs)
In this tutorial, you will learn the basics of using Intel Edison (that runs on the Linux-based Yocto). You will then learn how to seamlessly connect your devices to QNAP NAS using QIoT Suite Lite.
Please ensure your Intel Edison and NAS is on the same LAN.
Lesson 1: Configure your devices
In this lesson, you configure your Intel Edison device with an operating system, set up your development environment, and deploy an application to Intel Edison.
- Download the Intel Edison drivers
◦ Windows users
◦ Mac users
◦ Linux users
1.2 Configure and test your device
• Getting started with Intel Edison
If this is your first time using Intel Edison, you will have to follow some steps to assemble it.
Please follow steps 1-3 in the instructions.
- Step 1: Assemble boards and sensors.
- Step 2: Run setup tools.
Download the Intel® XDK cross-platform integrated development environment
• Verify and upload your onBoardBlink project to Intel Edison
- Creating your project
- Launch the Intel XDK.
- Follow the on-screen instructions to log in to your Intel® XDK account or sign up for a new Intel XDK account.
- From the Projects tab, click Start a New Project in the bottom left. The Start a New Project page opens.
- In the Internet of Things Embedded Application list on the left, click Templates. A list of templates are displayed on the right.
- Select the Onboard LED Blink template and click Continue.
- You can modify the directory to store your projects in the Project Directory.
- Enter a name for the project in Project Name.
- Click Create.
- Connecting to the board
- From the IoT Device drop-down list in the bottom left, select your development board. The Connect to your IoT Device dialog box will open.
- If you have created a user name and password to log in to your board, enter them in User Name and Password. Otherwise, leave the default values.
- Click Connect.
- The daemon must be updated if it is out of date. This will disconnect from the board, as the daemon has to be restarted. Follow the instructions to reconnect when prompted.
- If the clock on your board and the Intel XDK IoT Edition is out of sync, click Sync.
- A confirmation message will display the connection status and IP address of your development board. Click Dismiss. Your board is now connected.
- Upload and run the project
- Click the Develop tab and look for the IoT toolbar at the bottom of the window.
- Click the Upload icon to upload your project to the board.
- Click the Run icon to run your code. You should see a flashing LED on your board. Click the Stop icon to stop the LED.
- For more information on setting up Intel Edison, please refer to
1.3 Install Nodejs and required libraries
- Open a terminal application on your computer and connect to Intel Edison.
- Install the latest nodejs
Kod:
root@Edison:~# opkg update
root@Edison:~# opkg install nodejs
- Install MQTT library and Promises library by entering the following commands.
Kod:
root@Edison:~# npm install mqtt
root@Edison:~# npm install q
Lesson 2: Create your device in QIoT Suite Lite
In this lesson, you will provision your QNAP QIoT Suite Lite software, and create your first device in QIoT Suite Lite.
2.1 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”.
2.2 Create a new IoT Application
IoT Applications are a combination of Things, Rules, and Dashboards. We recommend that you first create a “Things” in IoT Application. This IoT Application allows you to keep a record of all of the devices that are connected to your NAS.
Rules make it possible to build IoT applications that gather, process, analyze and act on data generated by connected devices. Rules can apply to data from one or many devices, and it can take one or many actions in parallel.
Dashboards turn your data into analytics and reports that provide real-time insights.
All these elements provide user a complete IoT Application environment.
- If this is your first time using QIoT Suite Lite, use QIoT Quick Setup to guide you through a quick setup of an IoT application. After reading the introduction, click Next.
- In the IoT Application tab, enter a name for your IoT Application. Rule and Dashboard names will be generated automatically based on the IoT Application name. Click Next.
- In the Thing tab, click Add. Enter a name for your device and provide the device information (such as serial number and manufacturer) in Add attribute. If your device is already supported by QIoT, 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.
- In the Resource tab, click Add 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.
Click Next after you add all the resources (sensors) on your device.
- 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.
- 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.
CODE
Github
GitHub - qnap-dev/qnap-qiot-sdks: QNAP QIoT - quickly structure your IoT environment and deployment