miro Alarm
Device for audiovisual feedback of remote events. Notification are fully customizable over-the-air, allowing it to be adapted to any use case.
Product Datasheet
Device Profile for Tesenso IoT Cloud
Decoder/Payload Converter for Tesenso IoT Cloud
https://github.com/Tesenso-GmbH/Device-Decoder/blob/main/Miromico_Alarm.js
// V0.1, 12.07.2021, DS
if (msg.port == 15) {
var decoded = decodeFromHex(parseHexString(msg.data));
decoded.ts = msg.ts;
decoded.rssi = msg.rssi;
decoded.snr = msg.snr;
decoded.toa = msg.toa;
decoded.frequency = msg.frequency;
decoded.dr = msg.dr;
decoded.bat = decodeBattery(msg.bat);
decoded.hex = msg.data;
return {
msg: decoded,
metadata: metadata,
msgType: msgType
};
}
else{
return {
msg: msg,
metadata: metadata,
msgType: msgType
};
}
function decodeFromHex(bytes) {
// Decode an uplink message from a buffer
// (array) of bytes to an object of fields.
var decoded = {};
n = bytes.length;
idx = 0;
while (n > idx) {
s = bytes[idx++];
decoded.type = bytes[idx];
if (bytes[idx] == 4) {
decoded.currentScene = bytes[idx + 1];
}
idx += s;
}
return decoded;
}
function parseHexString(hex) {
for (var bytes = [], c = 0; c < hex.length; c += 2)
bytes.push(parseInt(hex.substr(c, 2), 16));
return bytes;
}
function decodeBattery(byte) {
if (byte == 0) {
return 'External power source';
} else if (byte > 0 && byte < 255) {
return byte / 254 * 100;
} else {
return 'Unknown battery state';
}
}
Device Labels
in manual
dataKey
dataType
dataFormat
alarm
currentScene
telemetry
Uplink documentation
Downlink documentation
Downlink hex code
Farbe des Leuchtens vom Device
028101
grün
028102
blau
028103
rot
028104
gelb
028105
leicht rot blinkend
028107
hell rosa
028108
starkes rosa
Last updated