Example Code for PC-SIOTV1 Online Data Transmission

Last revision 2026/01/12

This article offers example code for PC-SIOTV1 online data transmission, guiding users through hardware and software setup, wiring diagrams, and MQTT server configuration for efficient data integration and network connection.

Software Preparation

  • 3.On your computer, press "Win + R" to open the cmd command line terminal.
  • 4.Type the command ipconfig and press Enter. Locate and record the IPv4 Address of the wireless LAN adapter.

The Lark Weather Station Pro and the computer must be connected to the same network

  • 5.Record the following parameters from the Siot v1 platform to configure
    • WiFi SSID: Connect to the same WiFi network as the computer running SIoT.exe. This can be a local area network.
    • WiFi Password: The password for the WiFi network.
    • MQTT Server: The IP address obtained in Step 4 (e.g., 192.168.9.187).
    • MQTT Username: siot (fixed parameter in the Siot v1 platform).
    • MQTT Password: dfrobot (fixed parameter in the Siot v1 platform).
  • 6.In your browser, enter the IP address obtained in Step 4 followed by :8080. For example: 192.168.9.187:8080.
  • 7.Click "View Device List""View Messages" to see the uploaded sensor data.

Lark Weather Station Pro Config

  • 1.Connect the Lark Weather Station Pro to your computer and open the "DTU_config.txt" file in the pop-up USB drive.
    (Note: When connecting the Lark Pro to a computer for configuration or data export, ensure that the power at the bottom of the expansion module is turned off. Otherwise, configuration failures or data loss may occur.)
  • 2.Replace the original content in the "DTU_config.txt" file entirely with the following content:
#=====================
DTU_Switch:on
Method:wifi
 
#=====================
WiFi_SSID:your_wifi_ssid
WiFi_PASSWORD:your_wifi_passwprd
 
#----------------
Lora_DEUI:
Lora_EUI:
Lora_KEY:
 
#=====================================
Server:siotv1
Server_IP:IP_address_eg_192.168.9.187
Iot_ID:siot
Iot_PWD:dfrobot
Save:0
 
Topic_Speed:siot/Speed
Topic_Dir:siot/Dir
Topic_Temp:siot/Temp
Topic_Humi:siot/Humi
Topic_Pressure:siot/Pressure
Topic_Battery:siot/Battery
Topic_Voltage:siot/Voltage
Topic_Lat:siot/Lat
Topic_Lon:siot/Lon

  • Replace the WiFi_SSID, WiFi_PASSWORD, and Server_IP parameters with the data obtained from the "SIOTV1 Server Configuration."

    Ensure that no extra spaces or line breaks are added during the setup, as this may cause errors. If an error occurs, you can format the USB drive of the Lark Weather Station Pro, then power it on twice. A new configuration file will be automatically generated.

Deployment and Use

  • Disconnect the Lark Weather Station Pro from the computer and turn on the power switch at the bottom of the station.

  • Pay attention to the status of the indicator light. When the purple light starts blinking according to the sampling frequency, it indicates a successful network connection (default: every 30 seconds):

    • Yellow light stays on briefly and then turns off: System initialization

    • Green light flashes: Data is being stored in the CSV file

    • Purple light flashes: Data is being reported

    • Yellow light stays on for 3 seconds: Wi-Fi connection failed within 30 seconds. If this occurs during the first boot, Wi-Fi will be abandoned, and the device will begin normal offline operation.

    • Yellow light flashes for 10 seconds: MQTT connection failed within 60 seconds. If this occurs during the first boot, MQTT will be abandoned, and the device will begin normal offline operation.

    • You can view the data in "Step 7" of the "SIOTV1 Server Configuration."

Was this article helpful?

TOP