From 0f4035ec3a5f50f4b5e0a9e8d34dd553739a625f Mon Sep 17 00:00:00 2001 From: matt Date: Thu, 17 Apr 2025 14:22:37 +0000 Subject: [PATCH] add debug-incoming-packets option --- mqtt/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mqtt/index.js b/mqtt/index.js index 1701e27..b3da98c 100644 --- a/mqtt/index.js +++ b/mqtt/index.js @@ -107,6 +107,11 @@ const optionsList = [ type: Boolean, description: "This option will drop all packets that have 'OK to MQTT' set to false.", }, + { + name: "debug-incoming-packets", + type: Boolean, + description: "This option will print out all known packets as they arrive.", + }, { name: "drop-portnums-without-bitfield", type: Number, @@ -225,7 +230,7 @@ const collectorEnabled = { const decryptionKeys = options["decryption-keys"] ?? [ "1PG7OiApB1nwvP+rz05pAQ==", // add default "AQ==" decryption key ]; -const logKnownPacketTypes = false; +const logKnownPacketTypes = options["debug-incoming-packets"] ?? false; const dropPacketsNotOkToMqtt = options["drop-packets-not-ok-to-mqtt"] ?? false; const dropPortnumsWithoutBitfield = options["drop-portnums-without-bitfield"] ?? null; const oldFirmwarePositionPrecision = options["old-firmware-position-precision"] ?? null;