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;