Filter packages not sent over LoRa from stats
This commit is contained in:
parent
189c89a7ca
commit
c251c5adb8
1 changed files with 2 additions and 0 deletions
|
|
@ -100,6 +100,7 @@ router.get('/most-active-nodes', async (req, res) => {
|
||||||
created_at >= NOW() - INTERVAL 1 DAY
|
created_at >= NOW() - INTERVAL 1 DAY
|
||||||
AND packet_id IS NOT NULL
|
AND packet_id IS NOT NULL
|
||||||
AND portnum != 73
|
AND portnum != 73
|
||||||
|
AND \`to\` != 1
|
||||||
) AS unique_packets
|
) AS unique_packets
|
||||||
JOIN nodes n ON unique_packets.from = n.node_id
|
JOIN nodes n ON unique_packets.from = n.node_id
|
||||||
GROUP BY n.long_name
|
GROUP BY n.long_name
|
||||||
|
|
@ -128,6 +129,7 @@ router.get('/portnum-counts', async (req, res) => {
|
||||||
created_at: { gte: startTime },
|
created_at: { gte: startTime },
|
||||||
...(Number.isInteger(nodeId) ? { from: nodeId } : {}),
|
...(Number.isInteger(nodeId) ? { from: nodeId } : {}),
|
||||||
packet_id: { not: null },
|
packet_id: { not: null },
|
||||||
|
to: { not: 1 }, // Filter out NODENUM_BROADCAST_NO_LORA
|
||||||
OR: [
|
OR: [
|
||||||
{ portnum: { not: 73 } }, // Exclude portnum 73 (e.g. map reports)
|
{ portnum: { not: 73 } }, // Exclude portnum 73 (e.g. map reports)
|
||||||
{ portnum: null } // But include PKI packages, they have no portnum
|
{ portnum: null } // But include PKI packages, they have no portnum
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue