Milesight EM310-UDL: LoRaWAN Ultrasonic Level Sensor

Milesight EM310-UDL LoRaWAN ultrasonic level sensor: own ChirpStack/ThingsBoard decoder, decoded example and fill-level integration.

Milesight EM310-UDL
EM310-UDLSensor
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)
Measurements

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.

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++];

    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)

01756403820002

Decoded JSON

{ "battery": 100, "distance": 512 }
From the field

Configuration & 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.

Your partner

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

Yes. It is a standard LoRaWAN 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.
It measures ultrasonic distance from 3 to 450 cm on channel 03 82 in millimetres, plus a tilt/position flag from its built-in accelerometer. Fill level is derived from distance against the known container height.
It is a Class A device on LoRaWAN port 85. Each uplink carries the distance reading; the battery percentage and device status are included on their own channels.
Yes. The enclosure is rated IP67, so it withstands powerful water jets and suits waste bins, wet wells and outdoor tanks.
Ultrasonic sensors have a blind zone at very short range and need a clear perpendicular path. Mount so both full and empty levels stay inside the 3 to 450 cm window and away from inflow streams.
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.