From ec507a833aa5bb398ddcafc4b2a47154045a3d65 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Wed, 27 Mar 2024 02:05:35 +1300 Subject: [PATCH] add mqtt collector docs --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 94cb13a..9b08181 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,36 @@ npx prisma migrate dev You will now need to restart the `index.js` and `mqtt.js` scripts. +## MQTT Collector + +By default, the [MQTT Collector](./src/mqtt.js) connects to the public Meshtastic MQTT server. +Alternatively, you may provide the relevant options shown in the help section below to connect to your own MQTT server along with your own decryption keys. + +``` +node src/mqtt.js --help +``` + +``` +Meshtastic MQTT Collector + + Collects and processes service envelopes from a Meshtastic MQTT server. + +Options + + -h, --help Display this usage guide. + --mqtt-broker-url string MQTT Broker URL (e.g: mqtt://mqtt.meshtastic.org) + --mqtt-username string MQTT Username (e.g: meshdev) + --mqtt-password string MQTT Password (e.g: large4cats) + --collect-service-envelopes This option will save all received service envelopes to the database. + --decryption-keys ... Decryption keys encoded in base64 to use when decrypting service envelopes. +``` + +To connect to your own MQTT server, you could do something like the following; + +``` +node src/mqtt.js --mqtt-broker-url mqtt://mqtt.example.com --mqtt-username username --mqtt-password password --decryption-keys 1PG7OiApB1nwvP+rz05pAQ== +``` + ## Contributing If you have a feature request, or find a bug, please [open an issue](https://github.com/liamcottle/meshtastic-map/issues) here on GitHub.