rak / rak7201
RAK7201 LoRa Button
Button payloads are often custom. Replace the example decoder with the frame your firmware actually sends.
Decoder
Copy into ChirpStack or paste in the playground.
// RAK7201 LoRa button — typically short payload on specific FPort (example)
function decodeUplink(input) {
try {
const bytes = input.bytes;
const decoded = {
press: true,
counter: bytes.length >= 1 ? bytes[0] : null,
battery_v: bytes.length >= 3 ? (((bytes[1] << 8) | bytes[2]) & 0x3fff) / 1000 : null
};
return { data: decoded };
} catch (err) {
return { errors: [`Decoder error: ${err.message}`] };
}
}