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.
- 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)
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.
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.
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.
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.
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
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.
Your contact
Timo Wevelsiep
Founder, merkaio
15 minutes, no commitment, directly with Timo.
Decoder for ChirpStack v4. merkaio is an independent integrator and is not affiliated with Milesight.