Milesight AM307: 9-in-1 LoRaWAN Indoor Air Quality Sensor

Milesight AM307 9-in-1 LoRaWAN IAQ sensor: own ChirpStack/ThingsBoard decoder, decoded example, CO2, TVOC, comfort monitoring for offices and classrooms.

Milesight AM307
AM307Sensor
LoRaWAN
Class A, OTAA
Band / port
EU868 / port 85
Display
E-ink screen, real-time readings
CO2 sensor
NDIR, 0 to 5000 ppm
Operating range
0 to +50 °C, 0 to 95 % RH
Power
Battery or USB Type-C
Configuration
NFC (Milesight ToolBox)
Measurements

What the AM307 measures

Temperature & humidity

Comfort temperature 0 to +50 °C and relative humidity 0 to 95 % RH.

CO2

NDIR sensor, 0 to 5000 ppm, the lead indicator for ventilation quality.

TVOC

Total volatile organic compounds, reported as an IAQ index or in µg/m³.

Barometric pressure

Ambient air pressure in hPa for trend and comfort context.

Light & PIR

Ambient light level plus a PIR motion flag for occupancy context.

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 === 0x68) {   // humidity (%RH)
      data.humidity = bytes[i] / 2; i += 1;
    } else if (channel === 0x05 && type === 0x00) {   // PIR motion
      data.pir = bytes[i] === 1 ? "trigger" : "idle"; i += 1;
    } else if (channel === 0x06 && type === 0xcb) {   // light level (0-5)
      data.light_level = bytes[i]; i += 1;
    } else if (channel === 0x07 && type === 0x7d) {   // CO2 (ppm)
      data.co2 = readUInt16LE(bytes, i); i += 2;
    } else if (channel === 0x08 && type === 0x7d) {   // TVOC (IAQ index, /100)
      data.tvoc = readUInt16LE(bytes, i) / 100; i += 2;
    } else if (channel === 0x08 && type === 0xe6) {   // TVOC (µg/m³)
      data.tvoc = readUInt16LE(bytes, i); i += 2;
    } else if (channel === 0x09 && type === 0x73) {   // pressure (hPa, /10)
      data.pressure = readUInt16LE(bytes, i) / 10; i += 2;
    } else {
      break;
    }
  }
  return { data: data };
}

function readUInt16LE(b, i) {
  return (b[i + 1] << 8) | b[i];
}
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 68 humidity (/2), 05 00 PIR motion, 06 cb light level, 07 7d CO2 (UINT16 LE), 08 7d TVOC as an IAQ index (/100) or 08 e6 TVOC in µg/m³, 09 73 pressure (UINT16 LE, /10). TVOC unit depends on the configured mode, so handle both 7d and e6 types. History batches (channel 20/21) and downlink responses are sent on separate frames. For ThingsBoard the same channel logic goes into an uplink converter. Implemented from the published Milesight byte specification.

Uplink (hex)

0175640367EB0004686205000106CB07077D6402087D830009739427

Decoded JSON

{ "battery": 100, "temperature": 23.5, "humidity": 49, "pir": "trigger", "light_level": 7, "co2": 612, "tvoc": 1.31, "pressure": 1013.2 }
From the field

Configuration & pitfalls

NFC setup

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

CO2 calibration

The NDIR sensor uses automatic baseline calibration that assumes regular exposure to fresh air. In rooms that never reach clean-air levels, switch to manual calibration so readings stay accurate.

TVOC unit

TVOC can be reported as an IAQ index (channel 08 type 7d, /100) or in µg/m³ (type e6). Fix the mode in the ToolBox so the decoder and dashboard agree on one unit.

Placement

Mount at breathing height away from doors, vents and direct sunlight, the PIR and light readings and the CO2 baseline depend on it.

Your partner

How merkaio supports your AM307

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

Pre-staging & provisioning

We configure the AM307, 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.
Temperature, humidity, CO2, TVOC, barometric pressure, ambient light and PIR motion, with battery level and an on-device E-ink display for real-time readings.
It is a Class A device on LoRaWAN port 85. Each uplink carries the current sensor channels; battery and version info are sent less frequently.
It runs on a built-in battery for multi-year operation or on USB Type-C for continuous power, useful where the E-ink display is read often.
The AM307 can report TVOC as an IAQ index (channel 08 type 7d) or in µg/m³ (type e6). The decoder handles both, but you should fix one mode in the ToolBox so dashboards stay consistent.
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.