Use LASS4U to monitor air quality on LASS4NAS via QNAP NAS

Recently, PM 2.5 becomes a very popular issue. There are many products such like LASS4U, airbox and so on, to help us understand the influence of air pollution.  Among this, LASS (Location Aware Sensing System, , an open source and nonprofit “envirnment detecting system, can collect many meaningful data to monitor the quality of air. Besides,  Its hardware has better specification and completement. It can collect the data of CO2, temperature、humidity 、PM2.5, (PM1、PM10), and the touchscreen allows user to get the instant information without opening web page and application.

Besides, NAS also play an important role in this issue due to the importance of data storage. The following will simply introduce how to transfer LASS4U data to NAS by Node-Red, and process it via IoT system.   

First, you need to prepare:

(How to install Node-Red or Freeboard, you can refer to previous tutorial)

  2. Node-Red
  3. Freeboard or Dashboard


Get the MQTT information from LASS4U:

MQTT Host:


Now, you can build a MQTT node by Node-Red, and add server and fill in LASS4U topic:

After building the connecting, check the number of LASS4U:

The version of mine is FT2_0018.


Then, start to process the  LASS4U data. The figure shows the function node of Node-Red.

This node is used to process the subscribed data of MQTT via LASS4U., which refer to the topic of LASS/Test/LASS4U. If you want to process multiple LASS4Us, you can use the function node multi-output feature to create different data streams.

2, 4 Mainly, the two devices FT2_0118 and FT2_0004 are respectively directed to two different outputs.

Through the debug node, you can check whether there is data that normally grabs LASS4U.

The following is the environmental data of the FT2_0118 device captured from LASS4U:


The definition of each field:

date: date

time: time

gps_lon: The GPS position currently set for this device

gps_lat: The GPS position currently set for this device

s_t2: temperature

s_h2: humidity

s_g8: Co2

s_d2: PM 2.5

s_d1: PM2.1

Aftering getting the definition of each field, process the LASS4U data again, and show the required sensing data on dashboard.

First, the data of the LASS4U needs to be cut first by the split node and pushed to the Process Sensor Data for processing. The second step is to push the processed data to the Dashboard through the output 1~7.

First, split the LASS4U data by split node, and push it to Process Sensor Data. The second step  is to push the processed data to the Dashboard through the output 1~7.


Process the sensed data by function node:


1: Get the splitted data, and it will be transferred separately.

2-6: Process the gps-lon data, and remove  the string “gps_lon=”

6, 11, 16…… mainly the corresponding output positions of the function node

return [msg, null, null, null, null, null, null]; //output 1

return [null, null, null, msg, null, null, null]; //output 4

After the success, we can see the LASS4U data shown on the  NAS dashboard

Follow-up: In addition to the real-time rendering of LASS4U data to the NAS, Node-Red can also quickly process and transfer data to the back-end database and front-end web pages. It can even analyze the data and send it to the cloud service platform. To make the data more diversified.


Related posts

Leave a Reply