Milesight EM310-UDL: LoRaWAN Ultrasonic Level Sensor
Milesight EM310-UDL LoRaWAN ultrasonic level sensor: own ChirpStack/ThingsBoard decoder, decoded example and fill-level integration.
- LoRaWAN
- Class A, OTAA
- Band / port
- EU868 / port 85
- Measurement
- Ultrasonic, dual beam
- Range
- 3 to 450 cm distance
- Tilt detection
- Built-in 3-axis accelerometer
- Ingress protection
- IP67
- Configuration
- NFC (Milesight ToolBox)
What the EM310-UDL measures
Distance
Ultrasonic distance 3 to 450 cm, reported in millimetres on channel 03 82.
Fill level
Derived from distance against a known container height, used for bins and tanks.
Position / tilt
3-axis accelerometer flags normal vs tilted state, useful for vandalism or knock-over alerts.
Battery level
Reported as a percentage on channel 01 75 with local storage and retransmission.
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++];
if (channel === 0x01 && type === 0x75) { // battery (%)
data.battery = bytes[i]; i += 1;
} else if (channel === 0x03 && type === 0x82) { // distance (mm)
data.distance = readUInt16LE(bytes, i); i += 2;
} else if (channel === 0x04 && type === 0x00) { // position (tilt)
data.position = bytes[i] === 1 ? "tilt" : "normal"; i += 1;
} 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 (%), 03 82 distance (UINT16 little-endian, in millimetres), 04 00 position (0 normal, 1 tilt). Implemented from the published Milesight byte specification. Join and power-on frames also carry device-info segments on channel FF (protocol, serial number, firmware), which this decoder skips by breaking on unknown channels. For ThingsBoard the same channel logic goes into an uplink converter, and fill level is derived from distance against the known container height.
Uplink (hex)
01756403820002Decoded JSON
{ "battery": 100, "distance": 512 }Use cases
Smart waste bins
Fill-level alarms cut unnecessary pickups and optimise collection routes.
MoreTank & silo level
Non-contact level for water, fuel and dry goods without wetted parts.
MoreSump & wet-well level
Non-contact level in pump stations and drainage shafts where wetted floats clog or corrode.
MoreConfiguration & pitfalls
Blind zone
Readings closer than the minimum range are unreliable. Mount the sensor so the full and empty levels stay inside the 3 to 450 cm window.
Mounting angle
The ultrasonic beam needs a clear, roughly perpendicular path to the surface. Avoid funnels and inflow streams that scatter the echo.
Distance to fill level
The device reports distance, not percentage. Store the empty-container distance and compute fill level in the dashboard so readings stay traceable.
Threshold alarms
Distance alarms are configured over NFC with the Milesight ToolBox and sent immediately, outside the reporting interval, so treat alarm uplinks as priority events.
How merkaio supports your EM310-UDL
From sourcing to day-to-day operation, all from one partner on our own European infrastructure.
Pre-staging & provisioning
We configure the EM310-UDL, 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.