ចម្លើយ

ថ្ងៃទី 28 ខែមេសា ឆ្នាំ 2025 - ម៉ោង 02:21 យប់
Sure! Here are the step-by-step instructions to connect the ឧបករណ៍ចាប់សញ្ញា SenseCAP S210X to Microsoft Azure IoT Central via Node-RED:
1. Install Node-RED:
- Make sure you have a supported version of Node.js installed (Node 14.x LTS is recommended).
- Open your terminal or command prompt and run the following command to install Node-RED globally: `sudo npm install -g --unsafe-perm node-red` (omit "sudo" if you're using Windows).
- Start Node-RED by running the command: `node-red`.
- Access the Node-RED editor by opening your browser and navigating to http://localhost:1880.
2. Get the SenseCAP API:
- Log in to the SenseCAP console.
- In the drop-down bar to the right of your username, select "Organization Information" to get the Organization ID.
- Go to "Security" > "Access API keys" on the left side of the dashboard.
- Create an Access Key and copy the API key and the Organization ID.
3. Node-RED Configuration:
- Add a new mqtt-broker node to your Node-RED flow.
- Double-click the mqtt-broker node to enter the configuration page.
- Click the "Add new mqtt-broker" edit button.
- Fill in the configuration as follows:
- Server: openstream.api.sensecap.seeed.cc
- Port: 1883
- Protocol: MQTT V3.1.1
- Client ID: org- (replace with your Organization ID and with your own randomly generated numbers and lowercase letters)
- Username: org-
- Password: Access API key obtained from the SenseCAP console.
- Add a Topic for receiving data from the sensors. The topic format should be: /device_sensor_data/////.
- Add a debug node to view ទិន្នន័យដែលទទួលបាន។
- Deploy your Node-RED flow.
4. Microsoft Azure IoT Central Configuration:
- Log in to Azure IoT Central.
- Click "Build" from the left navigation menu and select "Custom apps".
- Fill in the Application name and choose the Pricing plan. Application URL នឹងត្រូវបានបង្កើតដោយស្វ័យប្រវត្តិ។
- Click "Create" to create the new application.
5. Create a Device Template and Device:
- Click on "Device templates" in the left-hand menu bar and create a new device template.
- Name your device template and click "Create".
- Click on "Devices" > "S2103" under the left menu bar.
- Create a new device and note down the information.
6. Node-RED Configuration for Azure IoT Central:
- Install the "node-red-contrib-azure-iot-central" palette in Node-RED.
- Drag out the Azure IoT Central node and double-click it to enter the configuration page.
- Fill in the configuration as follows:
- Transport: MQTT
- Authentication: SAS
- Scope ID/Device ID/Primary Key: Use the information obtained from Azure IoT Central.
7. Configure the function node:
- Drag out a function node and copy the provided code into the "On Message" section.
- Add a debug node after the function node to view the logging information.
8. Start receiving data:
- Power up and activate your S210X Sensor.
- Check the data in Azure IoT Central, including the Raw data and Dashboard.
Please note that these instructions are a summary and it's recommended to refer to the full ការណែនាំអ្នកប្រើប្រាស់ for more detailed information and troubleshooting.
បន្ថែមមតិយោបល់ថ្មី។