AM300 series is a compact indoor ambiance monitoring sensor for measurement of temperature, humidity, light, CO2 concentration, barometric pressure, PM2.5, PM10 and motion.
The data will be shown on the E-ink screen in real-time, which helps to measure the indoor environment and comfort.
AM300 series is widely used for offices, stores, classrooms, hospitals, etc. Sensor data is transmitted using LoRaWAN ® technology.
Using Milesight LoRaWAN® gateway and ThingsBoard, users can manage all sensor data remotely and visually.
Features of the AM300 series device:
- Integrated with multiple sensors like humidity, temperature, CO2, level light, barometric pressure, PM2.5, PM10, etc. Multiple display modes and clear emoticons to easily understand the comfort levels via screen;
- Support batteries or DC power supply;
- Equipped with traffic light indicator and buzzer to indicate device status and threshold alarms;
- Able to store locally more than 18, 000 records of 512 KB in total;
- Compliant with standard LoRaWAN® gateways and network servers.
Prerequisites
To continue with this guide we will need the following:
- AM308 Lorawan 9-IN-1 IAQ Sensor
- AM300-series-user-guide
- Smartphone with NFC-enabled and Milesight ToolBox application (Android/iOS)
- LoRaWAN® gateway (in our case UG56 LoRaWAN® Gateway)
- Configured integration on networks server and ThingsBoard
- ThingsBoard account
Device connection
According to the official user manual, we need a smartphone with NFC enabled and the ToolBox application to connect the sensor.
Since this device can only be operated using a LoRaWAN® gateway, we must first connect it to a network server that has an integration configured with ThingsBoard.
Afterward, it can be provisioned to ThingsBoard.
Device configuration
To connect and send data we should configure the device and network server.
At first we are going to configure the device, and save required information for network server configuration.
To add a device to network server and get information from it, we will need the following device parameters:
- Device EUI - device identifier
- Application EUI - Application identifier
- Application Key - Application key to identify device. We recommend to use a generated key, not from the example!
The parameters above are required for connection.
Depending on the network server, you may also need to provide join type (OTAA), LoRaWAN version.
To configure device via NFC, you will need to hold your smartphone like on the picture below:
To read and write configuration on the device you may follow next steps on your smartphone:
-
Open ToolBox application.
-
Click on NFC Read button and hold your smartphone near the device.
-
Go to tab Setting, set and save required fields and any other configuration that you need.
-
Press Write button and hold your smartphone near the device.
![Open ToolBox application.](/images/devices-library/ready-to-go-devices/ws202-pir-and-light-sensor/toolbox-application-preview.png)
Open ToolBox application.
![Click on NFC Read button and hold your smartphone near the device.](/images/devices-library/ready-to-go-devices/am308/toolbox-read-success-preview.png)
Click on NFC Read button and hold your smartphone near the device.
![Go to tab Setting, set and save required fields and any other configuration that you need.](/images/devices-library/ready-to-go-devices/am308/toolbox-configuration-preview.png)
Go to tab Setting, set and save required fields and any other configuration that you need.
![Press Write button and hold your smartphone near the device.](/images/devices-library/ready-to-go-devices/am308/toolbox-write-success-preview.png)
Press Write button and hold your smartphone near the device.
The developer also provides the possibility of connecting through a computer if necessary:
See the manual for details.
To configure the device we also need to add it to a network server, so select the network server your gateway is connected to:
Add a device on the ChirpstackWe need to add a device on the Chirpstack. To add a device, you can follow next steps:
![]() Login to Chirpstack server. ![]() Go to the Device profiles page and click on Add device profile button. ![]() Fill the fields and click on Submit button. ![]() Go to the Applications page, click on your application and press Add device button. ![]() Fill parameters with values from the device configuration. Then choose previously created device profile and click on Submit button. ![]() Put your Application key to the field and click on Submit button to save the device. Uplink converter in ThingsBoard integrationSuch as we have already connected gateway and configured integration - we will need to modify the converter and add an ability to parse incoming payload from the device. To do this you can add code to “Decoding block”, it locates between comments “// — Decoding code — //” in your converter, if you are using the default converters (for ThingsBoard v3.5.2 or above). Or you can copy the whole code of the converter and paste it to your converter: |
Add a device on The Things Stack Community EditionWe need to add a device on The Things Stack Community Edition. To add a device, you can follow next steps:
![]() Login to the cloud and open your console. ![]() Go to the Applications page. Then select your application and click on its name. ![]() Click on the Register end device button. ![]() Put the APP EUI value to the JoinEUI field. Press the Confirm button. ![]() Fill the rest parameters and press Register end device button. Uplink converter in ThingsBoard integrationSuch as we have already connected gateway and configured integration - we will need to modify the converter and add an ability to parse incoming payload from the device. To do this you can add code to “Decoding block”, it locates between comments “// — Decoding code — //” in your converter, if you are using the default converters (for ThingsBoard v3.5.2 or above). Or you can copy the whole code of the converter and paste it to your converter: |
Add a device on The Things IndustriesWe need to add a device on The Things Industries cloud. To add a device, you can follow next steps:
![]() Login to the cloud and open your console. ![]() Go to the Applications page. Then select your application and click on its name. ![]() Click on the Register end device button. ![]() Put the APP EUI value to the JoinEUI field. Press the Confirm button. ![]() Fill the rest parameters and press Register end device button. Uplink converter in ThingsBoard integrationSuch as we have already connected gateway and configured integration - we will need to modify the converter and add an ability to parse incoming payload from the device. To do this you can add code to “Decoding block”, it locates between comments “// — Decoding code — //” in your converter, if you are using the default converters (for ThingsBoard v3.5.2 or above). Or you can copy the whole code of the converter and paste it to your converter: |
Add a device on the LoriotWe need to add a device on the Loriot. To add a device, you can follow next steps:
![]() Login to Loriot server. We use eu2.loriot.io, but it depends on chosen region during registration. ![]() Go to the “Applications” page in left menu. ![]() Open your application, in our case it is “SampleApp”. ![]() Go to the “Enroll Device” page. Fill in the fields, with a configuration from your device. Then click the “Enroll” button. Uplink converter in ThingsBoard integrationSuch as we have already connected gateway and configured integration - we will need to modify the converter and add an ability to parse incoming payload from the device. To do this you can add code to “Decoding block”, it locates between comments “// — Decoding code — //” in your converter, if you are using the default converters (for ThingsBoard v3.5.2 or above). Or you can copy the whole code of the converter and paste it to your converter: |
Check data on ThingsBoard
So, the device was added and if it sends any data - it should appear in Devices.
To check it you may open Devices page in Entities section.
The device should be in devices list. You can check the data by click on it and open tab Attributes or Latest telemetry.
![Open "Devices" page in "Entities" section. The device should be in devices list. You can check the data by clicking the device and navigate to the "Attributes" or "Latest telemetry" tab.](/images/devices-library/ready-to-go-devices/am308/check-telemetry-on-device-preview.png)
Open “Devices” page in “Entities” section. The device should be in devices list. You can check the data by clicking the device and navigate to the “Attributes” or “Latest telemetry” tab.
In order to get more user-friendly view - you can use dashboards.
You can download a simple dashboard for this device, it is configured to display a data from “pir”, “light level”, “beep”, “battery level”, “Temperature”, “Humidity”, “CO2”, “Pressure”, “TVOC”, “PM2.5”, “PM10” and “Signal strength” telemetry keys for device with name “eui-24e124538b223213”.
ThingsBoard provides the ability to create and customize interactive visualizations (dashboards) for monitoring and managing data and devices.
Through ThingsBoard dashboards, you can efficiently manage and monitor your IoT devices and data. So, we will create the dashboard, for our device.
To add the dashboard to ThingsBoard, we need to import it. To import a dashboard, follow these steps:
- First download the Check and control device data dashboard file.
-
Navigate to the “Dashboards” page. By default, you navigate to the dashboard group “All”. Click on the “+” icon in the top right corner. Select “Import dashboard”.
-
In the dashboard import window, upload the JSON file and click “Import” button.
-
Dashboard has been imported.
![Navigate to the "Dashboards" page. By default, you navigate to the dashboard group "All". Click on the "+" icon in the top right corner. Select "Import dashboard".](/images/user-guide/dashboards/managing-dashboard/import-dashboard-1-pe-preview.png)
Navigate to the “Dashboards” page. By default, you navigate to the dashboard group “All”. Click on the “+” icon in the top right corner. Select “Import dashboard”.
![In the dashboard import window, upload the JSON file and click "Import" button.](/images/user-guide/dashboards/managing-dashboard/import-dashboard-2-pe-preview.png)
In the dashboard import window, upload the JSON file and click “Import” button.
![Dashboard has been imported.](/images/user-guide/dashboards/managing-dashboard/import-dashboard-3-pe-preview.png)
Dashboard has been imported.
To open the imported dashboard, click on it. Then you should specify your device in entity alias of the dashboard.
To do this, follow these steps:
-
Open the dashboard and enter edit mode. Click the “Entity aliases” icon, then in the pop-up window click the “Edit alias” icon next to the alias.
-
In edit alias window select your device from dropdown list and save entity alias.
-
Apply all changes.
![Open the dashboard and enter edit mode. Click the "Entity aliases" icon, then in the pop-up window click the "Edit alias" icon next to the alias.](/images/user-guide/dashboards/alias/dashboard-edit-alias-1-pe-preview.png)
Open the dashboard and enter edit mode. Click the “Entity aliases” icon, then in the pop-up window click the “Edit alias” icon next to the alias.
![In edit alias window select your device from dropdown list and save entity alias.](/images/user-guide/dashboards/alias/dashboard-edit-alias-2-pe-preview.png)
In edit alias window select your device from dropdown list and save entity alias.
![Apply all changes.](/images/user-guide/dashboards/alias/dashboard-edit-alias-3-pe-preview.png)
Apply all changes.
Now you should be able to see the data from the device.
Example of the dashboard with data:
Conclusion
With the knowledge outlined in this guide, you can easily connect your AM308 Lorawan 9-IN-1 IAQ Sensor and send data to ThingsBoard.
Explore the platform documentation to learn more about key concepts and features. For example, configure alarm rules or dashboards.