SENSECAP S210X LoRaWAN Sensor Catalogue User Guide
- June 9, 2024
- SENSECAP
Table of Contents
SENSECAP S210X LoRaWAN Sensor Catalogue
SenseCAP S210X Sensors
SenseCAP S210X Sensors are with the IP66 rating, -40 ~ +85C ° operating temperature and a built-in 19Ah high-capacity battery, combined with the devices’ low power consumption, the series can operate in harsh outdoor environments for up to 10 years with a range of up to 10km.
In this tutorial, we will introduce how to connect the SenseCAP S210X Sensors to the Microsoft Azure IoT Central via Node-RED
SenseCAP & Node-RED
This chapter, the first in a series, walks you through installing and using Node-red and calling the SenseCAP API to connect to Node-RED.
This chapter is to make it easier for our users to connect data from the SenseCAP platform to various other Paas platforms for more in-depth data processing.
Node-RED
Node-RED is a programming tool for wiring together hardware devices, APIs and
online services in new and interesting ways.
It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click.
Install Node.Js
To install Node-RED locally you will need a supported version of Node.js.
Node-RED currently recommends Node 14.x LTS.
Installing Node-RED with npm
To install Node-RED you can use this npm command that comes with Node.Js:
sudo npm install -g –unsafe-perm node-red
Note: If you are using Windows, do not start the command with “sudo”.
Once installed as a global module you can use this command to start Node-RED
in your terminal:
nore-red
Then you can then access the Node-RED editor by pointing your browser at http://localhost:1880.
Get the SenseCAP API
Before proceeding to this section, make sure you have bound your S210x device in the SenseCAP console.
Note: If you haven’t bound the device, please check S210X Sensors User Guide first
Log in to the SenseCAP console. In the drop-down bar to the right of the user name at the top of the dashboard, we can find the Organization Information, please select it to get the Organization ID
Then, we also need to get the API key for SenseCAP. Please click on Security -> Access API keys on the left side of the dashboard. Then Create an Access Key.
Click on the API ID you created and you will get her Access API keys, please copy it and the Organization ID, we will use them in the later steps.
Node-RED Configuration
Add a new mqtt-broker node
Drag out an mqtt in node, double-click it to enter the configuration page,
then click the edit button after Add new mqtt-broker.
The configuration of mqtt-broker is required to be filled out as follows:
- Server: openstream.api.sensecap.seeed.cc
- Port: 1883
- Protocol: MQTT V3.1.1
- Client ID: org-
- Organization ID: Obtained from your Organization information
- Random ID: Use your own randomly generated numbers and lowercase letters.
Example: org-43243***23-test
Then we fill in the Security options field with the Username and Password:
Username format: org-
Organization ID: Your organization ID we have obtained it before
Password: Fill in the Access API keys that we obtained before.
Add
Topic
Topic: Configuring a topic in a specific format determines the kind of device
and data type to be received.
Topic format:
/device_sensor_data/
OrgID | You can find the id on your organization information |
---|---|
DeviceEUI | You can find EUI on the Device Basic Properties or device label |
Channel | A physical interface on the device to connect to the sensor, |
default:1
Reserved| Reserved field
MeasurementID| Please check measurement_list
Note: “+” indicates that this field has no filter conditions and can
match all. “/+/+/+/+” means to listen to all “
Example: /device_sensor_data/424988*44/2CF7F0002 /+/+/+ This topic means receiving all remote sensing data of the current device.
Add debug node
Drag out a debug node, connect to the mqtt-in node, then click Deploy
After the deployment is successful, you will see “Connected” under the mqtt in building block, the data reporting interval is determined by the sensor which we connected.
After receiving the data, the debug window on the right will display the raw data.
SenseCAP & Node_RED & Azure IoT Central
Microsoft Azure IoT Central is a fully managed global IoT SaaS (software as a service) solution that makes it easy to connect, monitor and manage your IoT assets at scale. It is highly secure, scales with your business as it grows, ensures that your investments are repeatable and integrates with your existing business apps. It also bridges the gap between your business applications and IoT data. Finally it offers centralized management to reconfigure and update your devices.
The content of this chapter will continue to use the Node-RED introduced earlier and facilitate the management of the S210X Sensor suite in Microsoft Azure IoT Central through the use of Node-RED.
Microsoft Azure IoT Central Configuration
Log in to Azure IoT Central
Please visit Azure IoT Central website, click Build from the navigation menu
on the left, and click Custom apps.
Fill in the Application name and choose the Pricing plan. Application URL will be created automatically when you fill in the application name.
Note: If you are a new user of Azure IoT Central, we recommend that you select Free as this will not consume your fees.
Create a new application
Click Create to create the new application. Now you have successfully set up
Azure IoT Central!
Create a Device Template
Create a new device template by clicking on Device templates in the left-hand
menu bar.
Name your device template and click create
Create a Device
Click on Devices -> S2103 under the left menu bar.
Once you have created the device, you will see the device we have just created under Device, please tap into the device and click on the Connect button in the top left corner.
Please make a note of this information, which we will use in the next steps.
Node-RED Configuration
Install Azure IoT Paletts
Click on the upper-right menu bar and select Settings
Search and install “node-red-contrib-azure-iot-central” in the Palettes – Install
Configure the Azure IoT Central node
Drag out the Azure IoT Central node from the function bar on the left, double-
click it to enter the configuration page, then click the edit button to edit
Azure IoT Central node
The configuration is required to be filled out as follows:
- Transport: MQTT
- Authentication: SAS
- Scope ID/Device ID/Primary Key: We have obtained it before
Configure the function node
Data reporting to Azure IoT Central needs to follow a specific data format, so
it’s necessary to add a function building block to process the data format.
Drag out the function node from the function bar on the left, double-click it
to enter the edit page, then copy the code to On Message.
If you want to see the logging information of the data, you can add a debug node after the function node.
Once the S210X Sensor starts powering up and working and starts sending data to the SenseCAP PaaS server, then we can check the data on Azure IoT Central.
Data Presentation
The data visible in the Raw data column are placed in Unmodeled data, so we need to parse the data according to the code above.
Raw data
Add the capability that you need, then click save and publishThen we can clearly check the
raw data uploaded by the sensor.
Dashboard
If you want to enrich your data dashboard page, you can also configure it to
be displayed in Overview.
Click on Overview on the left navigation menu.
Collapse starts with devices drop-down menu and selects the telemetry that you want to visualize.
Click Add tile and you will see the tile added to the Azure IoT Central Dashboard.
So next, customize your sensor data monitoring dashboard to your liking!
After finishing your changes, just click on save and publish
You can view your sensor data through your custom dashboard now!
Tech Support
Support is provided Monday to Friday, from 09:00 to 18:00 GMT+8. Due to different time zones, we cannot offer live support. However, your questions will be answered as soon as possible in the before-mentioned schedule.
Provide as much information as possible regarding your enquiry (product models, accurately describe your problem and steps to replicate it etc.) and send a mail to: sensecap@seeed.cc
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>