Milesight EM400-TLD: LoRaWAN ToF Laser Distance Sensor

Milesight EM400-TLD LoRaWAN ToF laser distance sensor: own ChirpStack/ThingsBoard decoder, decoded example, fill-level alerts and smart-bin integration.

Milesight EM400-TLD
EM400-TLDSensor
LoRaWAN
Class A, OTAA
Band / port
EU868 / port 85
Ingress protection
IP67
Measuring range
ToF laser, 50 to 4500 mm
Temperature
Built-in NTC thermistor
Position
3-axis accelerometer (tilt detection)
Battery
Replaceable, several years
Measurements

What the EM400-TLD measures

Distance

Time-of-flight laser ranging, 50 to 4500 mm, near-zero blind spot.

Temperature

Built-in NTC thermistor, fire/combustion alert inside bins.

Position

3-axis accelerometer reports normal vs tilt (lid open/closed).

Distance alarm

Threshold and bin-mode alarms sent immediately as priority uplinks.

Battery level

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

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

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

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). The 83 67 and 84 82 channels carry the same values with a trailing alarm byte. Implemented from the published Milesight byte specification. For ThingsBoard the same channel logic goes into an uplink converter.

Uplink (hex)

0175640367E80004820002

Decoded JSON

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

Configuration & pitfalls

NFC setup

Keys, install height, reporting interval and threshold alarms are set over NFC with the Milesight ToolBox before rollout.

Standard vs Bin mode

Standard mode reports raw distance; Bin mode reports fill state relative to a configured install height. Pick the mode that matches the dashboard logic.

Install height & angle

Mount the sensor square to the surface. A tilted mount skews the laser path; document install height so distance maps to a real fill level.

Reflective & transparent targets

Highly reflective, transparent or angled surfaces can scatter the ToF beam. Validate readings against the real target material during commissioning.

Your partner

How merkaio supports your EM400-TLD

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

Pre-staging & provisioning

We configure the EM400-TLD, 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 uses a time-of-flight laser to measure distance from 50 to 4500 mm with almost no blind spot, plus a built-in NTC thermistor for temperature and a 3-axis accelerometer for tilt/position.
It is a Class A device on LoRaWAN port 85. Each uplink carries distance and temperature; battery level is reported periodically alongside the measurement.
The sensor reports raw distance to the target. In Bin mode the device subtracts the configured install height to derive fill state, so set the install height correctly during NFC setup.
Yes. Distance and temperature thresholds are set over NFC and sent immediately as priority uplinks, and the accelerometer flags a tilt position, useful for detecting an open bin lid.
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.