Milesight UC300: Industrial LoRaWAN Controller & Modbus Bridge

Milesight UC300 industrial IoT controller: LoRaWAN-to-Modbus bridge, RS485/DI/DO/analog inputs, own decoder framework, downlink control and PLC retrofit.

Milesight UC300
UC300Controller
LoRaWAN
Class C, OTAA
Fieldbus
RS485 Modbus RTU
Inputs
Digital (DI) + analog (4-20 mA / 0-10 V)
Outputs
Digital / relay (DO)
Edge logic
Up to 16 IF/THEN rules
Power
Mains or solar (Class C)
Capabilities

What the UC300 does

Digital inputs (DI)

Dry contacts, limit switches, e-stop, pulse counting.

Relay outputs (DO)

Switch pumps, lights, valves and alarms.

Analog inputs (AI)

4-20 mA / 0-10 V: pressure, level, flow.

RS485 Modbus RTU

Read energy meters, PLCs and Modbus sensors.

Edge logic

Up to 16 IF/THEN rules keep running during a network outage.

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 = { di: {}, do_: {}, modbus: {} };

  for (var i = 0; i < bytes.length; ) {
    var channel = bytes[i++];
    var type = bytes[i++];

    // Device info (join / power-on): protocol version, SN, hw/fw version
    if (channel === 0xff) { i += deviceInfoLen(type); continue; }

    // Digital input, digital mode: 1 byte (0/1)
    if (type === 0x00) { data.di["ch" + channel] = bytes[i]; i += 1; continue; }

    // Digital input, counter mode: UINT32 little-endian (4 bytes)
    if (type === 0xc8) { data.di["ch" + channel] = readUInt32LE(bytes, i); i += 4; continue; }

    // Digital / relay output: 1 byte (0/1)
    if (type === 0x01) { data.do_["ch" + channel] = bytes[i]; i += 1; continue; }

    // Modbus channel: data type (1 byte) + value (4 bytes)
    // channel-to-register mapping is deployment-specific
    data.modbus["ch" + channel] = readModbusValue(bytes, i); i += 5;
  }
  return { data: data };
}

function readUInt32LE(b, i) {
  return ((b[i+3]<<24)|(b[i+2]<<16)|(b[i+1]<<8)|b[i]) >>> 0;
}
function readModbusValue(b, i) {
  return { type: b[i], raw: readUInt32LE(b, i + 1) };
}
function deviceInfoLen(type) {
  void type; // 0xFF segment lengths are firmware-specific; set per deployment
  return 1;
}

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

The UC300 payload is configuration-dependent (IPSO channel format, interface and Modbus mask). Modbus values arrive as a data type (1 byte) plus value (4 bytes), mapped to the configured registers. This is a framework, not a drop-in: we validate the final decoder against a real uplink from the deployment. As a Class C device the UC300 accepts downlinks in near real time to switch relays or issue Modbus commands.

From the field

Configuration & pitfalls

Class C power

Continuous receive draws more current: plan for mains or solar, not battery-only.

RS485 termination

Add termination resistors on long or fast RS485 runs.

Modbus scan interval

Choose a realistic polling interval for the register count, or uplinks pile up.

Edge rules

Local IF/THEN rules keep valves in safe states during outages. Configure fail-safe states explicitly.

D2D note

When a D2D command fires, the device may not send a normal uplink. Account for this in monitoring.

Your partner

How merkaio supports your UC300

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

Pre-staging & provisioning

We configure the UC300, 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, over RS485 Modbus RTU. We map the registers and decode the values into clean JSON in your dashboard.
Yes. As a Class C device the UC300 listens continuously and accepts near-real-time downlink control; we build and test the commands.
RS485 Modbus RTU plus digital inputs (dry contact and pulse counter), digital/relay outputs, and analog inputs for 4-20 mA or 0-10 V signals.
The payload reflects which interfaces are enabled and how the Modbus registers are mapped, so the decoder is a framework that we build and validate against a real uplink from your deployment, not a fixed drop-in.
No. As a Class C device it keeps its receive window open continuously, so plan for mains or solar power rather than battery-only operation.
Yes. Up to 16 local IF/THEN rules keep running on the device, so valves and outputs stay in safe states even during a network or power interruption.
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.