Skip to main content
Skip to main content
Occupancy and people counting sensor

Milesight VS321 LoRaWAN decoder and payload format

The Milesight VS321 is a LoRaWAN occupancy and people counting sensor that reports temperature, humidity and motion. It is rated IP30 and it works from -20 to 30 °C.

Payload format

An uplink from the device as it arrives at the network server, and what the official decoder returns for it. Examples come from the decoder's own test cases.

Example 1 · fPort 85

Payload (hex)

01 75 64 03 67 10 01 04 68 0A 05 FD 2C 01 06 FE 03 00 03 00 07 FF 01

Decoded (JSON)

{
  "battery": 100,
  "temperature": 27.2,
  "humidity": 5,
  "people_total_counts": 300,
  "region_1_enable": "enable",
  "region_1": "occupied",
  "region_2_enable": "enable",
  "region_2": "occupied",
  "region_3_enable": "disable",
  "region_3": "vacant",
  "region_4_enable": "disable",
  "region_4": "vacant",
  "region_5_enable": "disable",
  "region_5": "vacant",
  "region_6_enable": "disable",
  "region_6": "vacant",
  "region_7_enable": "disable",
  "region_7": "vacant",
  "region_8_enable": "disable",
  "region_8": "vacant",
  "region_9_enable": "disable",
  "region_9": "vacant",
  "region_10_enable": "disable",
  "region_10": "vacant",
  "illuminance_status": "bright"
}
FieldValue
battery100
temperature27.2
humidity5
people_total_counts300
region_1_enableenable
region_1occupied
region_2_enableenable
region_2occupied
region_3_enabledisable
region_3vacant
region_4_enabledisable
region_4vacant
region_5_enabledisable
region_5vacant
region_6_enabledisable
region_6vacant
region_7_enabledisable
region_7vacant
region_8_enabledisable
region_8vacant
region_9_enabledisable
region_9vacant
region_10_enabledisable
region_10vacant
illuminance_statusbright

Specifications

Manufacturer
Milesight
Model
VS321
Type
Occupancy and people counting sensor
Measures
temperature, humidity, motion
Protection
IP30
Operating temperature
-20 … 30 °C
LoRaWAN regions
EU863-870, US902-928, AU915-928, AS923, CN470-510, KR920-923, IN865-867, RU864-870

Connect it to Cloud Studio IoT

  1. 1

    Register the device in your network server

    Add it to The Things Stack, ChirpStack, Actility ThingPark or LORIOT with its DevEUI, JoinEUI and AppKey and the frequency plan of your region.

  2. 2

    Apply the decoder

    In The Things Stack, pick the model from the device repository and its decoder is applied for you. In ChirpStack v4, paste the official decoder as the device profile's JavaScript codec.

  3. 3

    Connect the network server to Cloud Studio IoT

    Set up the integration once per network server; every device registered there then reaches Cloud Studio IoT with its decoded values.

  4. 4

    Build dashboards and alarms

    The decoded fields become device variables for dashboards, alarms by email or SMS, and scheduled reports.

See your Milesight VS321 on a dashboard

Start a free trial, add the device with its DevEUI and get dashboards and alarms from its next uplink.

Talk to us

Frequently asked questions

Device facts and decoder examples: The Things Network Device Repository (Apache-2.0) · commit 7693223, imported 2026-10-05.