From db2f070fb4c3cc413337eac761b72f275ae4b895 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Mon, 31 Oct 2022 09:00:38 -0700 Subject: [PATCH 1/3] Encryption updates --- docs/software/mqtt/index.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/software/mqtt/index.mdx b/docs/software/mqtt/index.mdx index d112f92d..a3207548 100644 --- a/docs/software/mqtt/index.mdx +++ b/docs/software/mqtt/index.mdx @@ -7,9 +7,9 @@ sidebar_position: 4 ## Bridging networks -Meshtastic networks in different locations beyond the reach of LoRa can be easily bridged together using MQTT. The simplest option is to connect your mesh to the official Meshtastic MQTT broker. This makes your devices appear on the world map, and provides a copy of your mesh traffic, translated into JSON. All you have to do to join the public MQTT server is to Enable MQTT and set uplink and downlink on the channels that you want to share over MQTT. +Meshtastic networks in different locations beyond the reach of LoRa can be easily bridged together using MQTT. The simplest option is to connect your mesh to the official Meshtastic MQTT broker. This makes your devices appear on the world map, and provides a copy of your mesh traffic, translated into JSON. All you have to do to join the public MQTT server is to Enable MQTT and set uplink and downlink on the channels that you want to share over MQTT. The default device configuration using the public MQTT Server is encrypted. -You can also share channel settings with a remote network and enable encryption for MQTT, encryption is off by default for MQTT. You can also specify your own private MQTT broker and specify authentication for that broker to bridge several mesh networks together, via the internet (or just a local IP network). +You can also share channel settings with a remote network. If you use the default meshtastic MQTT server, packets are always encrypted. If you use a custom MQTT broker (ie set `mqtt.address`), the `mqtt.encryption_enabled` setting applies, which by default is false. You can also specify your own private MQTT broker and specify authentication for that broker to bridge several mesh networks together, via the internet (or just a local IP network). You can find the settings available for MQTT [here](https://meshtastic.org/docs/settings/moduleconfig/mqtt). @@ -19,7 +19,7 @@ Using or emitting packets directly in/from smart home control software such as H When MQTT is enabled, the Meshtastic device simply uplinks and/or downlinks every raw protobuf packet that it sees to the MQTT broker. In addition, some packet types are serialized or deserialized from/to JSON messages for easier use in consumers. All packets are sent to the broker, whether they originate from another device on the mesh, or the gateway node itself. -Packets may be encrypted. If you use the default meshtastic MQTT server, packets are always encrypted. If you use a custom MQTT broker (ie set `mqtt_server`), the `mqtt_encryption_enabled` setting applies, which by default is false. +Packets may be encrypted. If you use the default meshtastic MQTT server, packets are always encrypted. If you use a custom MQTT broker (ie set `mqtt.address`), the `mqtt.encryption_enabled` setting applies, which by default is false. IMPORTANT: When MQTT is turned on, you are potentially broadcasting your entire mesh traffic onto the public internet. This includes messages and position information. From 58b80dd343a8e47175c3ce639dc178e71f42cdcb Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Mon, 31 Oct 2022 10:45:51 -0700 Subject: [PATCH 2/3] Add envelope details --- docs/software/mqtt/index.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/software/mqtt/index.mdx b/docs/software/mqtt/index.mdx index a3207548..61f71062 100644 --- a/docs/software/mqtt/index.mdx +++ b/docs/software/mqtt/index.mdx @@ -227,6 +227,15 @@ if __name__ == '__main__': ### Using MQTT with Node-RED +Below is a valid json envelope for information sent by MQTT to a device for broadcast onto the mesh. + ``` + { + "sender":"whatever you want to be the SENDER", + "type":"sendtext", + "payload": text or a json object go here + } + ``` + Node-RED is a free cross-platform programming tool for wiring together hardware, APIs, and online services developed originally by IBM for IOT. It is widely used for home automation by many non-professional programmers and runs well on Pi's. Node-red has many plug-in modules written by the community. I will use this platform as a practical example on how to interface with the MQTT features of Meshtastic. Everything can be done from GUI's without using command line. Step one: use http://client.meshtastic.org/ one of the Apple apps or the CLI to connect to your device and adjust these settings. From c58d68146da6849a3c9c1d8f2b69f7273398f5f3 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 31 Oct 2022 12:45:53 -0500 Subject: [PATCH 3/3] Found some more old commands on this page --- docs/software/python/uses.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/software/python/uses.mdx b/docs/software/python/uses.mdx index 3a0a1f52..0fc0dd0a 100644 --- a/docs/software/python/uses.mdx +++ b/docs/software/python/uses.mdx @@ -25,9 +25,9 @@ to keep the Bluetooth link alive for eight hours (any usage of the Bluetooth pro ```shell title="Expected Output" # You should see a result similar to this: -mydir$ meshtastic --set wait_bluetooth_secs 28800 +mydir$ meshtastic --set bluetooth.wait_bluetooth_secs 28800 Connected to radio... -Setting preference wait_bluetooth_secs to 28800 +Setting bluetooth.wait_bluetooth_secs to 28800 Writing modified preferences to device... ``` @@ -40,7 +40,7 @@ meshtastic --setlat 25.2 --setlon -16.8 --setalt 120 Or to configure an ESP32 based board to join a Wifi network as a station: ```shell -meshtastic --set network.wifi_ssid mywifissid --set network.wifi_password mywifipsw +meshtastic --set network.wifi_ssid mywifissid --set network.wifi_psk mywifipsw ``` :::note