Milesight WS302: LoRaWAN Sound Level Sensor

Milesight WS302 LoRaWAN sound level sensor: own ChirpStack/ThingsBoard decoder, decoded dB example, A/C weighting, noise alerts for offices and smart city.

Milesight WS302
WS302Sensor
LoRaWAN
Class A, OTAA
Measurement range
30 to 120 dB
Accuracy
Class 2 (IEC 61672-1)
Frequency weighting
A or C weighting
Time weighting
Fast / Slow / Impulse
Battery
Built-in, several years of service life
Configuration
NFC (Milesight ToolBox)
Measurements

What the WS302 measures

Instantaneous level

Current sound pressure level in dB, with the configured frequency and time weighting.

Equivalent level (Leq)

Energy-averaged continuous sound level over the reporting interval.

Maximum level (Lmax)

Peak level reached within the interval, useful for spotting noise events.

Battery level

Reported periodically so the dashboard can plan replacement years ahead.

Data into your dashboard

Integration

Sensor / controller

Measures or controls in the field and sends LoRaWAN uplinks.

LoRaWAN gateway

Receives the radio packets and forwards them to the server.

ChirpStack

Network server: manages sessions and decodes the payload.

ThingsBoard / Grafana

Dashboards, alarms, rules and reports.

ChirpStack v4 · decodeUplink
function decodeUplink(input) {
  var bytes = input.bytes;
  var data = {};

  for (var i = 0; i < bytes.length; ) {
    var channel = bytes[i++];
    var type = bytes[i++];

    // Device info on join / power-on (IPSO, versions, SN, class)
    if (channel === 0xff) {
      if (type === 0x01) { i += 1; }                       // protocol version
      else if (type === 0x09 || type === 0x0a) { i += 2; } // hardware / firmware version
      else if (type === 0xff) { i += 2; }                  // TSL version
      else if (type === 0x16) { i += 8; }                  // serial number
      else if (type === 0x0f || type === 0x0b) { i += 1; } // LoRaWAN class / device status
      else if (type === 0xfe) { i += 1; }                  // reset event
      else { break; }
    } else if (channel === 0x01 && type === 0x75) {        // battery (%)
      data.battery = bytes[i]; i += 1;
    } else if (channel === 0x05 && type === 0x5b) {        // sound level (dB)
      var weight = bytes[i];
      var freq = ["Z", "A", "C"][weight & 0x03];           // frequency weighting
      var time = ["I", "F", "S"][(weight >> 2) & 0x03];    // time weighting
      data["L" + freq + time]         = readUInt16LE(bytes, i + 1) / 10; // instantaneous
      data["L" + freq + "eq"]         = readUInt16LE(bytes, i + 3) / 10; // equivalent
      data["L" + freq + time + "max"] = readUInt16LE(bytes, i + 5) / 10; // maximum
      i += 7;
    } else {
      break;
    }
  }
  return { data: data };
}

function readUInt16LE(b, i) {
  return (b[i + 1] << 8) | b[i];
}

Implemented from the published Milesight byte specification (Communication Protocol / User Guide).

Channel format: 01 75 battery (%), 05 5b sound (1 weighting byte plus three UINT16 little-endian values, each /10 dB). The weighting byte encodes frequency weighting in bits 0-1 (Z/A/C) and time weighting in bits 2-3 (Impulse/Fast/Slow), so the output keys are named accordingly, e.g. LAF, LAeq and LAFmax. Implemented from the published Milesight byte specification. For ThingsBoard the same channel logic goes into an uplink converter.

Uplink (hex)

017564055B05C401F5016F02

Decoded JSON

{ "battery": 100, "LAF": 45.2, "LAeq": 50.1, "LAFmax": 62.3 }
From the field

Configuration & pitfalls

Choose A vs C weighting

A-weighting matches human hearing and suits offices and quiet rooms; C-weighting captures low-frequency energy in noisy or industrial settings. Set it over NFC before rollout because it changes the reported keys.

Time weighting

Fast, Slow and Impulse respond to transients differently. Pick one consistently across a fleet so dashboards compare like with like.

Mounting & placement

Mount away from walls and HVAC vents that reflect or generate noise. The measured level depends heavily on position, so document each location.

NFC setup

Keys, reporting interval and weighting are set over NFC with the Milesight ToolBox app before deployment.

Your partner

How merkaio supports your WS302

From sourcing to day-to-day operation, all from one partner on our own European infrastructure.

Pre-staging & provisioning

We configure the WS302, set keys, intervals and alarms, and ship it ready to deploy.

Own decoder

Payload codec for ChirpStack v4 and ThingsBoard, implemented from the Milesight specification.

Dashboard integration

Data lands in your ThingsBoard or Grafana, with alarms and reports.

Operations & monitoring

We run the LoRaWAN stack and dashboards on European infrastructure, you just use the data.

Frequently asked questions

Yes. It is a standard LoRaWAN Class A device, no Milesight gateway or cloud required. You add the codec to the device profile and provision it via OTAA.
Yes, for both ChirpStack and ThingsBoard, implemented from the published Milesight byte specification. The same channel logic goes into a ThingsBoard uplink converter.
Each sound uplink carries three decibel values: the instantaneous level, the equivalent continuous level (Leq) and the maximum level over the interval, all using the configured frequency and time weighting. Battery level is reported periodically.
A-weighting follows the sensitivity of human hearing and is suited to quiet environments like offices; C-weighting includes more low-frequency energy and is better for loud or industrial settings. The choice changes the output key names, for example LAeq versus LCeq.
The WS302 measures from 30 to 120 dB with Class 2 accuracy per IEC 61672-1, which covers typical office, public and most industrial noise levels.
It ships with a built-in battery rated for several years of service life, depending on the reporting interval you configure over NFC.
From the same series

Related devices

Let's discuss your infrastructure. Digital and on-site.

Whether it's IoT platform development, hardware selection, managed hosting for ChirpStack, ThingsBoard, Grafana or NetBird VPN, or migration from a self-hosted setup - we'll find the right solution for your use case. Book a free 30-minute consultation, no commitment required.

Timo Wevelsiep

Your contact

Timo Wevelsiep

Founder, merkaio

15 minutes, no commitment, directly with Timo.

By submitting, you agree to our Privacy Policy.

Decoder for ChirpStack v4. merkaio is an independent integrator and is not affiliated with Milesight.