Get started with Arduino Yun (Python)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.

More Arduino tutorials can be found here:https://www.arduino.cc/en/Tutorial/HomePage1.2 Configure and test your devicesIf this is your first time using Arduino Yun, you will have to follow some steps to assemble it.

Launch and log in to QIoT Suite Lite. The default username and password is "admin".2.2 Create a new IoT applicationIoT 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.

All these elements provide user a complete IoT Application environment.

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 applicationEnter 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".

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.

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.3. Connect your device to QIoT Suite Lite using MQTTS3.1 Run Sample CodeOpen Terminal application (such as: PuTTY) on your PC. Connect to your device using SSH and enter the folder where the smaple code is stored (for example: /home/root/bundle).

To install sample code dependencies, enter the following commands:

Run the sample code

The device will send a message to topic "temp" (or the topic you defined).

3.2 Another protocolClick "Connect a Device".You can select another protocol.

Define your values from stream (e.g., temp, max, min), and you will get a JSON result in the textbox. We will use this JSON code to push data to the QIoT Suite Lite application. Click "Create" to finish.

Once you create your data stream, you get a REST API URL which IoT applications can call using POST requests to push your live data to the streaming data dataset you created.4.3 Configure NodeRED's nodes in IoT applicationCreate IoT application in QIoT suite. The following is your first Node-RED flow, and then you can start creating your own IoT flow. You can learn more about Node-RED at https://nodered.org/

Before you start pushing live data to Power BI. We need a "function" node to convert IoT data to a streaming data dataset. Here you can replace msg.payload to your JSON dataset.

Function code as following:

We need an "http request" node to help us to push live data to Power BI. Just drop and drag "http request" node and connect to tail of "function" node.

Copy and paste the REST API URL that you got from the Power BI console, and set http method to POST. Click "Deploy" to save changes