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.
- 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)
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.
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.
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)
017564055B05C401F5016F02Decoded JSON
{ "battery": 100, "LAF": 45.2, "LAeq": 50.1, "LAFmax": 62.3 }Use cases
Smart office & meeting rooms
Track noise comfort in open-plan offices and quiet zones, alert on sustained loud periods.
MoreSmart city noise mapping
Monitor street, nightlife and construction noise against local limits with timestamped logs.
MoreHotels, hospitals & classrooms
Keep guest, patient and learning environments within acceptable noise levels.
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.
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
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.
Your contact
Timo Wevelsiep
Founder, merkaio
15 minutes, no commitment, directly with Timo.
Decoder for ChirpStack v4. merkaio is an independent integrator and is not affiliated with Milesight.