Milesight EM400-MUD: LoRaWAN Ultrasonic Distance Sensor

Milesight EM400-MUD LoRaWAN ultrasonic distance sensor: own ChirpStack/ThingsBoard decoder, decoded example, fill-level alerts and smart-waste integration.

Milesight EM400-MUD
EM400-MUDSensor
LoRaWAN
Class A, OTAA
Band / port
EU868 / port 85
Measuring range
Ultrasonic, ~7 cm to 6 m
Ingress protection
IP67, conformal-coated PCB
Modes
Standard, bin, parking lot
Extras
NTC temperature, 3-axis tilt
Battery
Replaceable, up to 10 years
Measurements

What the EM400-MUD measures

Distance

Ultrasonic distance / fill level in mm, small blind spot for bins and tanks.

Temperature

On-board NTC thermistor in 0.1 °C, also used for combustion detection.

Tilt / position

3-axis accelerometer reports normal or tilt, useful for lid and knock-over status.

Battery level

Reported as a percentage, 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 === 0x67) {   // temperature (°C)
      data.temperature = readInt16LE(bytes, i) / 10; i += 2;
    } else if (channel === 0x04 && type === 0x82) {   // distance (mm)
      data.distance = readUInt16LE(bytes, i); i += 2;
    } else if (channel === 0x05 && type === 0x00) {   // position
      data.position = bytes[i] === 1 ? "tilt" : "normal"; i += 1;
    } else if (channel === 0x83 && type === 0x67) {   // temperature with alarm
      data.temperature = readInt16LE(bytes, i) / 10;
      data.temperature_alarm = bytes[i + 2] === 1 ? "alarm" : "release"; i += 3;
    } else if (channel === 0x84 && type === 0x82) {   // distance with alarm
      data.distance = readUInt16LE(bytes, i);
      data.distance_alarm = bytes[i + 2] === 1 ? "alarm" : "release"; i += 3;
    } else {
      break;
    }
  }
  return { data: data };
}

function readUInt16LE(b, i) {
  return ((b[i + 1] << 8) | b[i]) & 0xffff;
}
function readInt16LE(b, i) {
  var v = readUInt16LE(b, i);
  return v > 0x7fff ? v - 0x10000 : v;
}

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

Channel format: 01 75 battery (%), 03 67 temperature (INT16 little-endian, /10), 04 82 distance (UINT16 little-endian, mm), 05 00 position (0 normal, 1 tilt). Threshold events use the alarm channels 83 67 (temperature) and 84 82 (distance), which append a one-byte alarm flag. Implemented from the published Milesight byte specification. For ThingsBoard the same channel logic goes into an uplink converter.

Uplink (hex)

0175640367EA000482B400050000

Decoded JSON

{ "battery": 100, "temperature": 23.4, "distance": 180, "position": "normal" }
From the field

Configuration & pitfalls

Pick the right mode

Standard, bin and parking modes use different collection and report intervals. Bin mode favours battery life; parking mode reacts faster but runs the battery down sooner.

Install height & blind zone

Mount above the maximum fill level and respect the ~7 cm blind zone. Set the install height so the device can report fill level rather than raw distance.

Threshold alarms

Distance and temperature thresholds are set over NFC. Alarm uplinks arrive on channels 83/84 with an alarm flag, so dashboard rules should treat them as priority events.

Surface & angle

Ultrasonic echoes scatter on foam, angled or very soft surfaces. Mount the sensor perpendicular to the target and validate against a known level before rollout.

Your partner

How merkaio supports your EM400-MUD

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

Pre-staging & provisioning

We configure the EM400-MUD, 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.
Ultrasonic distance or fill level in millimetres, plus an on-board NTC temperature reading and a 3-axis tilt position. The temperature reading also supports combustion detection in waste bins.
It is a Class A device on LoRaWAN port 85. Distance and temperature ride in each uplink; the battery level is reported as a percentage.
It ships with replaceable batteries rated for up to 10 years in standard and bin modes, and around 5 years in parking mode, depending on the reporting interval you configure.
Yes. Distance and temperature thresholds are set over NFC and are sent immediately on the alarm channels, outside the regular reporting interval, so dashboard rules should treat alarm uplinks as priority events.
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.