Repeater: the stats request also carries the node's sensors (humidity, pressure, external temperature, ...)

Changelog-cs: Repeater: požadavek na statistiky teď vrací i senzory uzlu (vlhkost, tlak, externí teplotu, ...)
Changelog-topic: stats-bundle
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-12-04 03:52:50 +01:00
1 parent 97f52e71b8
commit 2a5c596250
7 files changed
+997 -16

No files matched your search

@@ -177,6 +177,99 @@ TEST(StatsBundle, BoundaryLengths149_150_151) {
}
}
// Sensors: SB_ENV_LPP carries the CayenneLPP bytes without channel 1 (docs/stats-bundle.md).
// Cases and sizes mirror admin_sensors*, readonly_sensors in the vectors.
static const uint8_t LPP_FULL_3[] = {0x01, 0x74, 0x01, 0x90, 0x01, 0x67, 0x00, 0x00, // ch 1: battery, MCU temp
0x02, 0x67, 0x00, 0xE1, 0x02, 0x68, 0x3C, 0x02, 0x73, 0x27, 0x1C};
static int envFrom(const uint8_t* lpp, int n, uint8_t* out) { return sbLppExclude(lpp, n, 1, out, SB_ENV_MAX); }
TEST(StatsBundleEnv, LppExcludeDropsChannelOneAndStopsOnUnknown) {
uint8_t e[SB_ENV_MAX];
int n = envFrom(LPP_FULL_3, sizeof(LPP_FULL_3), e);
EXPECT_EQ("026700e102683c0273271c", hex(e, n));
uint8_t junk[sizeof(LPP_FULL_3) + 3];
memcpy(junk, LPP_FULL_3, sizeof(LPP_FULL_3));
junk[sizeof(LPP_FULL_3)] = 9; junk[sizeof(LPP_FULL_3) + 1] = 0xFF; junk[sizeof(LPP_FULL_3) + 2] = 0;
EXPECT_EQ(n, envFrom(junk, sizeof(junk), e));
EXPECT_EQ(0, envFrom(LPP_FULL_3, 8, e)); // only channel 1: nothing
EXPECT_EQ(0, envFrom(LPP_FULL_3, 3, e)); // truncated reading
uint8_t many_[40 * 4];
for (int i = 0; i < 40; i++) { many_[i * 4] = (uint8_t)(2 + i); many_[i * 4 + 1] = 103; many_[i * 4 + 2] = 0; many_[i * 4 + 3] = 1; }
EXPECT_EQ(SB_ENV_MAX, envFrom(many_, sizeof(many_), e)); // whole readings, up to the cap
}
TEST(StatsBundleEnv, SensorsOnPage0) {
uint8_t e[SB_ENV_MAX], o[200];
int el = envFrom(LPP_FULL_3, sizeof(LPP_FULL_3), e);
StatsBundleIn in;
fillStatus(in);
FlowTable t; t.clearAll();
in.admin = true; in.flow = &t; in.prefs_crc = 0xBEEF; in.pwr_flags = SB_PWR_RXGAIN_ACTIVE;
in.fair[0] = 31; in.fair[1] = 4; in.fair[3] = 120;
in.pwr_flags = 2; in.env = e; in.env_len = (uint8_t)el;
int n = enc(in, 0, o);
EXPECT_EQ(93, n); EXPECT_EQ(0x6A05, crc(o, n)); // empty table: 11 B env + 2 B header
StatsBundleOut d; ASSERT_TRUE(sbDecode(o, n, &d));
EXPECT_EQ(1, d.pages);
ASSERT_EQ(11, d.env_len);
EXPECT_EQ("026700e102683c0273271c", hex(d.env, d.env_len));
twoRules(t);
n = enc(in, 0, o);
EXPECT_EQ(129, n); EXPECT_EQ(0xFF10, crc(o, n)); // status + 2 rules + 3 sensors, one page
ASSERT_TRUE(sbDecode(o, n, &d));
EXPECT_EQ(1, d.pages); EXPECT_EQ(2, d.n_rule); EXPECT_EQ(11, d.env_len);
in.env = NULL; in.env_len = 0; // no sensors: no record
n = enc(in, 0, o);
EXPECT_EQ(116, n);
ASSERT_TRUE(sbDecode(o, n, &d));
EXPECT_EQ(0, d.env_len);
}
TEST(StatsBundleEnv, BigRecordSpillsToPage1) {
uint8_t e[124], o[200];
for (int i = 0; i < 31; i++) { e[i * 4] = (uint8_t)(2 + i); e[i * 4 + 1] = 103; e[i * 4 + 2] = 0; e[i * 4 + 3] = (uint8_t)(202 + i); }
StatsBundleIn in;
fillStatus(in);
FlowTable t; twoRules(t);
in.admin = true; in.flow = &t; in.prefs_crc = 0xBEEF; in.pwr_flags = 2;
in.fair[0] = 31; in.fair[1] = 4; in.fair[3] = 120;
in.env = e; in.env_len = 124;
const int len[3] = {82, 145, 35};
const uint16_t c[3] = {0xA16B, 0xBDF8, 0x1083};
StatsBundleOut d[3];
for (int p = 0; p < 3; p++) {
int n = enc(in, p, o);
EXPECT_EQ(len[p], n); EXPECT_EQ(c[p], crc(o, n));
ASSERT_TRUE(sbDecode(o, n, &d[p]));
EXPECT_EQ(3, d[p].pages);
}
EXPECT_EQ(-1, enc(in, 3, o));
EXPECT_EQ(0, d[0].env_len); // page 0 keeps status + CRCs, the record is whole on page 1
EXPECT_EQ(124, d[1].env_len);
EXPECT_EQ(0, memcmp(e, d[1].env, 124));
EXPECT_EQ(2, d[1].n_ctr + d[2].n_ctr);
EXPECT_EQ(2, d[2].n_rule);
in.env_len = SB_ENV_MAX + 1; // over the cap: dropped, never truncated
int n = enc(in, 0, o);
ASSERT_TRUE(sbDecode(o, n, &d[0]));
EXPECT_EQ(0, d[0].env_len);
EXPECT_EQ(1, d[0].pages);
}
TEST(StatsBundleEnv, ReadOnlyGetsSensorsOnOnePage) {
uint8_t e[SB_ENV_MAX], o[200];
int el = envFrom(LPP_FULL_3, sizeof(LPP_FULL_3), e);
StatsBundleIn in;
fillStatus(in);
FlowTable t; twoRules(t);
in.admin = false; in.flow = &t; in.env = e; in.env_len = (uint8_t)el;
int n = enc(in, 0, o);
EXPECT_EQ(73, n); EXPECT_EQ(0x9166, crc(o, n));
StatsBundleOut d; ASSERT_TRUE(sbDecode(o, n, &d));
EXPECT_EQ(11, d.env_len); EXPECT_FALSE(d.has(SB_RULES_AUTO));
}
TEST(StatsBundle, NeverExceedsBudget) {
StatsBundleIn in;
fillStatus(in);
+86 -2
View File
@@ -26,7 +26,24 @@ STATUS_IDS = {
ZIGZAG = {"temp_dc", "noise", "rssi", "snr4"}
FAIR_IDS = {"group": 24, "sender": 25, "advert": 26, "window": 27}
ID_RULES_AUTO, ID_RULES_STATIC, ID_PREFS_CRC, ID_PWR, ID_N_COUNTERS = 32, 33, 34, 35, 36
ID_COUNTERS, ID_RULE = 40, 41
ID_COUNTERS, ID_RULE, ID_ENV_LPP = 40, 41, 42
ENV_MAX = 128 # longest env record body (SB_ENV_MAX)
SELF_CHANNEL = 1 # LPP channel of the node itself (battery, MCU temperature): not in the env record
# CayenneLPP: type -> (name, data size, signed, divisor); divisor 1 = raw integer
LPP_TYPES = {
0: ("digital_input", 1, False, 1), 1: ("digital_output", 1, False, 1),
2: ("analog_input", 2, True, 100), 3: ("analog_output", 2, True, 100),
100: ("generic", 4, False, 1), 101: ("luminosity", 2, False, 1), 102: ("presence", 1, False, 1),
103: ("temperature", 2, True, 10), 104: ("humidity", 1, False, 2), 115: ("pressure", 2, False, 10),
116: ("voltage", 2, False, 100), 117: ("current", 2, False, 1000), 118: ("frequency", 4, False, 1),
120: ("percentage", 1, False, 1), 121: ("altitude", 2, True, 1), 125: ("concentration", 2, False, 1),
128: ("power", 2, False, 1), 130: ("distance", 4, False, 1000), 131: ("energy", 4, False, 1000),
132: ("direction", 2, False, 1), 133: ("unixtime", 4, False, 1), 142: ("switch", 1, False, 1),
# multi-value types are kept as raw bytes
113: ("accelerometer", 6, None, 1), 134: ("gyrometer", 6, None, 1), 135: ("colour", 3, None, 1),
136: ("gps", 9, None, 1),
}
def crc16_ccitt_false(data: bytes) -> int:
@@ -68,6 +85,44 @@ def read_varint(b: bytes, pos: int):
raise ValueError("varint too long")
# ---- CayenneLPP (the env record) -------------------------------------------
def lpp_exclude(buf: bytes, skip: int = SELF_CHANNEL, max_len: int = ENV_MAX) -> bytes:
"""The readings of an LPP buffer except channel `skip`, whole readings, <= max_len bytes;
stops at an unknown type (what the firmware puts in the env record, sbLppExclude)."""
out, p = b"", 0
while p + 2 <= len(buf):
t = LPP_TYPES.get(buf[p + 1])
if t is None or p + 2 + t[1] > len(buf):
break
if buf[p] != skip:
if len(out) + 2 + t[1] > max_len:
break
out += buf[p:p + 2 + t[1]]
p += 2 + t[1]
return out
def lpp_decode(buf: bytes):
"""[{channel, type, name, value}] ; value is a number (scaled), or hex for multi-value types.
Stops at an unknown type. Same scaling as the Cayenne LPP / meshcore telemetry decoder."""
out, p = [], 0
while p + 2 <= len(buf):
t = LPP_TYPES.get(buf[p + 1])
if t is None or p + 2 + t[1] > len(buf):
break
name, size, signed, div = t
raw = buf[p + 2:p + 2 + size]
if signed is None:
val = raw.hex()
else:
n = int.from_bytes(raw, "big", signed=signed)
val = n / div if div != 1 else n
out.append({"channel": buf[p], "type": buf[p + 1], "name": name, "value": val})
p += 2 + size
return out
# ---- flow rules (same canonical order and CRC as flow_rules_vectors) -------
def sort_key(e):
@@ -121,7 +176,12 @@ def records(case):
v = case["status"].get(name, 0)
if v:
recs.append(scalar(id_, zigzag(v) if name in ZIGZAG else v))
env = bytes.fromhex(case.get("env", ""))
if env and len(env) > ENV_MAX:
env = b""
if not case["admin"]:
if env:
recs.append(blob(ID_ENV_LPP, env))
return recs, []
for name, id_ in FAIR_IDS.items():
v = case.get("fair", {}).get(name, 0)
@@ -139,6 +199,8 @@ def records(case):
for i, e in enumerate(entries) if e.get("dropped", 0) or e.get("passed", 0)]
if trip:
recs.append(scalar(ID_N_COUNTERS, len(trip)))
if env: # sensors ahead of the counters and rules: page 0 is read every scrape
recs.append(blob(ID_ENV_LPP, env))
return recs, (trip, [blob(ID_RULE, rule_record(i, e)) for i, e in enumerate(entries)])
@@ -209,6 +271,9 @@ def decode_page(b: bytes):
out["counters"].append((s, d, p))
elif id_ == ID_RULE:
out["rules"].append(decode_rule(body))
elif id_ == ID_ENV_LPP:
out["env"] = body.hex()
out["env_lpp"] = lpp_decode(body)
else:
raise ValueError("bad wire type")
return out
@@ -310,6 +375,13 @@ TWO_RULES = [
]
# LPP as the node builds it: ch 1 = battery + MCU temp (not in the record), ch 2 = BME280-like sensor
LPP_FULL_3 = bytes.fromhex("01740190" "01670000" "026700e1" "02683c" "0273271c")
LPP_ENV_3 = lpp_exclude(LPP_FULL_3) # temp 22.5 C, humidity 30 %, pressure 1001.2 hPa = 11 B
# a node with an external sensor, a power meter and many channels: 28 readings fill the record
LPP_ENV_BIG = b"".join(bytes([ch, 103]) + (200 + ch).to_bytes(2, "big") for ch in range(2, 2 + 31))
def many_rules(n, dropped, passed=0):
return [{"kind": "a", "key": "%08x" % (0x11000000 + i), "mode": "throttle", "secs": 1800, "auto": i % 2 == 0,
"expires": 1800000000 + i, "remain": 3600 * (i + 1), "dropped": dropped + i, "passed": passed}
@@ -339,6 +411,14 @@ def cases():
"rules": []}),
("admin_two_rules", {"admin": True, "status": STATUS, "fair": {"group": 31, "sender": 4, "window": 120},
"prefs_crc": 0xBEEF, "pwr": 2, "rules": TWO_RULES}),
("admin_sensors", {"admin": True, "status": STATUS, "fair": {"group": 31, "sender": 4, "window": 120},
"prefs_crc": 0xBEEF, "pwr": 2, "rules": [], "env": LPP_ENV_3.hex()}),
("admin_sensors_two_rules", {"admin": True, "status": STATUS, "fair": {"group": 31, "sender": 4, "window": 120},
"prefs_crc": 0xBEEF, "pwr": 2, "rules": TWO_RULES, "env": LPP_ENV_3.hex()}),
("admin_sensors_spill", {"admin": True, "status": STATUS, "fair": {"group": 31, "sender": 4, "window": 120},
"prefs_crc": 0xBEEF, "pwr": 2, "rules": TWO_RULES, "env": LPP_ENV_BIG[:124].hex()}),
("readonly_sensors", {"admin": False, "status": STATUS, "rules": TWO_RULES, "prefs_crc": 1,
"env": LPP_ENV_3.hex()}),
("admin_16_rules", {"admin": True, "status": STATUS, "fair": {"group": 31, "sender": 4, "window": 120},
"prefs_crc": 0xBEEF, "pwr": 3, "rules": many_rules(16, 100000, 7)}),
]
@@ -354,7 +434,7 @@ def build():
"format": {"version": VERSION, "page_max": PAGE_MAX, "request": "F1 <page>"},
"ids": {"status": STATUS_IDS, "fair": FAIR_IDS, "rules_auto": ID_RULES_AUTO, "rules_static": ID_RULES_STATIC,
"prefs_crc": ID_PREFS_CRC, "pwr": ID_PWR, "n_counters": ID_N_COUNTERS, "counters": ID_COUNTERS,
"rule": ID_RULE},
"rule": ID_RULE, "env_lpp": ID_ENV_LPP},
"prefs": [],
"cases": [],
}
@@ -373,6 +453,10 @@ def build():
def selftest():
assert LPP_ENV_3.hex() == "026700e102683c0273271c", LPP_ENV_3.hex()
assert [(r["name"], r["value"]) for r in lpp_decode(LPP_ENV_3)] == [
("temperature", 22.5), ("humidity", 30.0), ("pressure", 1001.2)]
assert lpp_exclude(LPP_FULL_3 + b"\x09\xff\x00") == LPP_ENV_3 # unknown type stops the walk
for name, case in cases():
pages = encode_pages(case)
assert all(len(p) <= PAGE_MAX for p in pages), name
+704
View File
@@ -245,6 +245,709 @@
}
]
},
{
"decoded": [
{
"counters": [],
"env": "026700e102683c0273271c",
"env_lpp": [
{
"channel": 2,
"name": "temperature",
"type": 103,
"value": 22.5
},
{
"channel": 2,
"name": "humidity",
"type": 104,
"value": 30.0
},
{
"channel": 2,
"name": "pressure",
"type": 115,
"value": 1001.2
}
],
"page": 0,
"pages": 1,
"rules": [],
"scalars": {
"1": 3987,
"10": 148233,
"11": 9120,
"12": 8011,
"13": 1109,
"14": 130011,
"15": 18222,
"17": 412,
"18": 20991,
"19": 3071,
"2": 430,
"21": 2,
"24": 31,
"25": 4,
"27": 120,
"3": 1234567,
"32": 65535,
"33": 65535,
"34": 48879,
"35": 2,
"4": 842,
"5": 51234,
"6": 225,
"7": 193,
"8": 43
}
}
],
"input": {
"admin": true,
"env": "026700e102683c0273271c",
"fair": {
"group": 31,
"sender": 4,
"window": 120
},
"prefs_crc": 48879,
"pwr": 2,
"rules": [],
"status": {
"air_rx": 51234,
"air_tx": 842,
"batt_mv": 3987,
"direct_dups": 412,
"err_events": 0,
"flood_dups": 20991,
"noise": -113,
"recv": 148233,
"recv_direct": 18222,
"recv_errors": 3071,
"recv_flood": 130011,
"rssi": -97,
"sent": 9120,
"sent_direct": 1109,
"sent_flood": 8011,
"snr4": -22,
"temp_dc": 215,
"tx_queue": 0,
"tx_start_fail": 0,
"tx_timeout": 2,
"uptime": 1234567
}
},
"name": "admin_sensors",
"pages": [
{
"crc16": "6A05",
"hex": "010104931f08ae030c87ad4b10ca0614a2900318e1011cc101202b288986092ca04730cb3e34d50838dbf7073cae8e01449c0348ffa3014cff175402601f64046c7880ffff0384ffff0388effd028c02a90b026700e102683c0273271c",
"len": 93
}
]
},
{
"decoded": [
{
"counters": [
[
0,
416,
14
],
[
1,
37,
0
]
],
"env": "026700e102683c0273271c",
"env_lpp": [
{
"channel": 2,
"name": "temperature",
"type": 103,
"value": 22.5
},
{
"channel": 2,
"name": "humidity",
"type": 104,
"value": 30.0
},
{
"channel": 2,
"name": "pressure",
"type": 115,
"value": 1001.2
}
],
"page": 0,
"pages": 1,
"rules": [
{
"auto": false,
"key": "2e",
"kind": "c",
"left": 604800,
"mode": "throttle",
"secs": 1800,
"slot": 0
},
{
"auto": true,
"expires": 1800000000,
"key": "8b2c",
"kind": "r",
"mode": "block",
"slot": 1
}
],
"scalars": {
"1": 3987,
"10": 148233,
"11": 9120,
"12": 8011,
"13": 1109,
"14": 130011,
"15": 18222,
"17": 412,
"18": 20991,
"19": 3071,
"2": 430,
"21": 2,
"24": 31,
"25": 4,
"27": 120,
"3": 1234567,
"32": 96198,
"33": 92086,
"34": 48879,
"35": 2,
"36": 2,
"4": 842,
"5": 51234,
"6": 225,
"7": 193,
"8": 43
}
}
],
"input": {
"admin": true,
"env": "026700e102683c0273271c",
"fair": {
"group": 31,
"sender": 4,
"window": 120
},
"prefs_crc": 48879,
"pwr": 2,
"rules": [
{
"dropped": 416,
"key": "2e",
"kind": "c",
"mode": "throttle",
"passed": 14,
"remain": 604800,
"secs": 1800
},
{
"auto": true,
"dropped": 37,
"expires": 1800000000,
"key": "8b2c",
"kind": "r",
"mode": "block"
}
],
"status": {
"air_rx": 51234,
"air_tx": 842,
"batt_mv": 3987,
"direct_dups": 412,
"err_events": 0,
"flood_dups": 20991,
"noise": -113,
"recv": 148233,
"recv_direct": 18222,
"recv_errors": 3071,
"recv_flood": 130011,
"rssi": -97,
"sent": 9120,
"sent_direct": 1109,
"sent_flood": 8011,
"snr4": -22,
"temp_dc": 215,
"tx_queue": 0,
"tx_start_fail": 0,
"tx_timeout": 2,
"uptime": 1234567
}
},
"name": "admin_sensors_two_rules",
"pages": [
{
"crc16": "FF10",
"hex": "010104931f08ae030c87ad4b10ca0614a2900318e1011cc101202b288986092ca04730cb3e34d50838dbf7073cae8e01449c0348ffa3014cff175402601f64046c7880c6ef0584b6cf0588effd028c029002a90b026700e102683c0273271ca10700a0030e012500a50a0063012e11880e80f524a50b0172028b2c0c80a4a7da06",
"len": 129
}
]
},
{
"decoded": [
{
"counters": [],
"page": 0,
"pages": 3,
"rules": [],
"scalars": {
"1": 3987,
"10": 148233,
"11": 9120,
"12": 8011,
"13": 1109,
"14": 130011,
"15": 18222,
"17": 412,
"18": 20991,
"19": 3071,
"2": 430,
"21": 2,
"24": 31,
"25": 4,
"27": 120,
"3": 1234567,
"32": 96198,
"33": 92086,
"34": 48879,
"35": 2,
"36": 2,
"4": 842,
"5": 51234,
"6": 225,
"7": 193,
"8": 43
}
},
{
"counters": [
[
0,
416,
14
],
[
1,
37,
0
]
],
"env": "026700ca036700cb046700cc056700cd066700ce076700cf086700d0096700d10a6700d20b6700d30c6700d40d6700d50e6700d60f6700d7106700d8116700d9126700da136700db146700dc156700dd166700de176700df186700e0196700e11a6700e21b6700e31c6700e41d6700e51e6700e61f6700e7206700e8",
"env_lpp": [
{
"channel": 2,
"name": "temperature",
"type": 103,
"value": 20.2
},
{
"channel": 3,
"name": "temperature",
"type": 103,
"value": 20.3
},
{
"channel": 4,
"name": "temperature",
"type": 103,
"value": 20.4
},
{
"channel": 5,
"name": "temperature",
"type": 103,
"value": 20.5
},
{
"channel": 6,
"name": "temperature",
"type": 103,
"value": 20.6
},
{
"channel": 7,
"name": "temperature",
"type": 103,
"value": 20.7
},
{
"channel": 8,
"name": "temperature",
"type": 103,
"value": 20.8
},
{
"channel": 9,
"name": "temperature",
"type": 103,
"value": 20.9
},
{
"channel": 10,
"name": "temperature",
"type": 103,
"value": 21.0
},
{
"channel": 11,
"name": "temperature",
"type": 103,
"value": 21.1
},
{
"channel": 12,
"name": "temperature",
"type": 103,
"value": 21.2
},
{
"channel": 13,
"name": "temperature",
"type": 103,
"value": 21.3
},
{
"channel": 14,
"name": "temperature",
"type": 103,
"value": 21.4
},
{
"channel": 15,
"name": "temperature",
"type": 103,
"value": 21.5
},
{
"channel": 16,
"name": "temperature",
"type": 103,
"value": 21.6
},
{
"channel": 17,
"name": "temperature",
"type": 103,
"value": 21.7
},
{
"channel": 18,
"name": "temperature",
"type": 103,
"value": 21.8
},
{
"channel": 19,
"name": "temperature",
"type": 103,
"value": 21.9
},
{
"channel": 20,
"name": "temperature",
"type": 103,
"value": 22.0
},
{
"channel": 21,
"name": "temperature",
"type": 103,
"value": 22.1
},
{
"channel": 22,
"name": "temperature",
"type": 103,
"value": 22.2
},
{
"channel": 23,
"name": "temperature",
"type": 103,
"value": 22.3
},
{
"channel": 24,
"name": "temperature",
"type": 103,
"value": 22.4
},
{
"channel": 25,
"name": "temperature",
"type": 103,
"value": 22.5
},
{
"channel": 26,
"name": "temperature",
"type": 103,
"value": 22.6
},
{
"channel": 27,
"name": "temperature",
"type": 103,
"value": 22.7
},
{
"channel": 28,
"name": "temperature",
"type": 103,
"value": 22.8
},
{
"channel": 29,
"name": "temperature",
"type": 103,
"value": 22.9
},
{
"channel": 30,
"name": "temperature",
"type": 103,
"value": 23.0
},
{
"channel": 31,
"name": "temperature",
"type": 103,
"value": 23.1
},
{
"channel": 32,
"name": "temperature",
"type": 103,
"value": 23.2
}
],
"page": 1,
"pages": 3,
"rules": [],
"scalars": {
"32": 96198,
"33": 92086
}
},
{
"counters": [],
"page": 2,
"pages": 3,
"rules": [
{
"auto": false,
"key": "2e",
"kind": "c",
"left": 604800,
"mode": "throttle",
"secs": 1800,
"slot": 0
},
{
"auto": true,
"expires": 1800000000,
"key": "8b2c",
"kind": "r",
"mode": "block",
"slot": 1
}
],
"scalars": {
"32": 96198,
"33": 92086
}
}
],
"input": {
"admin": true,
"env": "026700ca036700cb046700cc056700cd066700ce076700cf086700d0096700d10a6700d20b6700d30c6700d40d6700d50e6700d60f6700d7106700d8116700d9126700da136700db146700dc156700dd166700de176700df186700e0196700e11a6700e21b6700e31c6700e41d6700e51e6700e61f6700e7206700e8",
"fair": {
"group": 31,
"sender": 4,
"window": 120
},
"prefs_crc": 48879,
"pwr": 2,
"rules": [
{
"dropped": 416,
"key": "2e",
"kind": "c",
"mode": "throttle",
"passed": 14,
"remain": 604800,
"secs": 1800
},
{
"auto": true,
"dropped": 37,
"expires": 1800000000,
"key": "8b2c",
"kind": "r",
"mode": "block"
}
],
"status": {
"air_rx": 51234,
"air_tx": 842,
"batt_mv": 3987,
"direct_dups": 412,
"err_events": 0,
"flood_dups": 20991,
"noise": -113,
"recv": 148233,
"recv_direct": 18222,
"recv_errors": 3071,
"recv_flood": 130011,
"rssi": -97,
"sent": 9120,
"sent_direct": 1109,
"sent_flood": 8011,
"snr4": -22,
"temp_dc": 215,
"tx_queue": 0,
"tx_start_fail": 0,
"tx_timeout": 2,
"uptime": 1234567
}
},
"name": "admin_sensors_spill",
"pages": [
{
"crc16": "A16B",
"hex": "010304931f08ae030c87ad4b10ca0614a2900318e1011cc101202b288986092ca04730cb3e34d50838dbf7073cae8e01449c0348ffa3014cff175402601f64046c7880c6ef0584b6cf0588effd028c029002",
"len": 82
},
{
"crc16": "BDF8",
"hex": "011380c6ef0584b6cf05a97c026700ca036700cb046700cc056700cd066700ce076700cf086700d0096700d10a6700d20b6700d30c6700d40d6700d50e6700d60f6700d7106700d8116700d9126700da136700db146700dc156700dd166700de176700df186700e0196700e11a6700e21b6700e31c6700e41d6700e51e6700e61f6700e7206700e8a10700a0030e012500",
"len": 145
},
{
"crc16": "1083",
"hex": "012380c6ef0584b6cf05a50a0063012e11880e80f524a50b0172028b2c0c80a4a7da06",
"len": 35
}
]
},
{
"decoded": [
{
"counters": [],
"env": "026700e102683c0273271c",
"env_lpp": [
{
"channel": 2,
"name": "temperature",
"type": 103,
"value": 22.5
},
{
"channel": 2,
"name": "humidity",
"type": 104,
"value": 30.0
},
{
"channel": 2,
"name": "pressure",
"type": 115,
"value": 1001.2
}
],
"page": 0,
"pages": 1,
"rules": [],
"scalars": {
"1": 3987,
"10": 148233,
"11": 9120,
"12": 8011,
"13": 1109,
"14": 130011,
"15": 18222,
"17": 412,
"18": 20991,
"19": 3071,
"2": 430,
"21": 2,
"3": 1234567,
"4": 842,
"5": 51234,
"6": 225,
"7": 193,
"8": 43
}
}
],
"input": {
"admin": false,
"env": "026700e102683c0273271c",
"prefs_crc": 1,
"rules": [
{
"dropped": 416,
"key": "2e",
"kind": "c",
"mode": "throttle",
"passed": 14,
"remain": 604800,
"secs": 1800
},
{
"auto": true,
"dropped": 37,
"expires": 1800000000,
"key": "8b2c",
"kind": "r",
"mode": "block"
}
],
"status": {
"air_rx": 51234,
"air_tx": 842,
"batt_mv": 3987,
"direct_dups": 412,
"err_events": 0,
"flood_dups": 20991,
"noise": -113,
"recv": 148233,
"recv_direct": 18222,
"recv_errors": 3071,
"recv_flood": 130011,
"rssi": -97,
"sent": 9120,
"sent_direct": 1109,
"sent_flood": 8011,
"snr4": -22,
"temp_dc": 215,
"tx_queue": 0,
"tx_start_fail": 0,
"tx_timeout": 2,
"uptime": 1234567
}
},
"name": "readonly_sensors",
"pages": [
{
"crc16": "9166",
"hex": "010104931f08ae030c87ad4b10ca0614a2900318e1011cc101202b288986092ca04730cb3e34d50838dbf7073cae8e01449c0348ffa3014cff175402a90b026700e102683c0273271c",
"len": 73
}
]
},
{
"decoded": [
{
@@ -1296,6 +1999,7 @@
},
"ids": {
"counters": 40,
"env_lpp": 42,
"fair": {
"advert": 26,
"group": 24,