From b2c94eeec793165cabc72db75786165c7e4b44b3 Mon Sep 17 00:00:00 2001 From: andrekir Date: Tue, 11 Jan 2022 11:33:36 -0300 Subject: [PATCH 01/25] update android usage.md --- docs/software/android/usage.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/software/android/usage.md b/docs/software/android/usage.md index f2120c2a..4b11862a 100644 --- a/docs/software/android/usage.md +++ b/docs/software/android/usage.md @@ -162,11 +162,11 @@ Pressing the three vertical dots in the top right corner shows the configuration #### Broadcast position period -This allows you to change the frequency with which your location is broadcast across the mesh. By default, this is set to 900 seconds (15 minutes). The minimum time this can be set to is 375 seconds, the reasons for which have been [discussed on the forum](https://meshtastic.discourse.group/t/lost-messages-while-testing/2455/19). +This allows you to change the frequency with which your location is broadcast across the mesh. By default, this is set to 900 seconds (15 minutes). The minimum time this can be set for the default channel is 375 seconds, the reasons for which have been [discussed on the forum](https://meshtastic.discourse.group/t/lost-messages-while-testing/2455/19). #### Device sleep period -By default, ESP32 devices will enter sleep mode after 300 seconds of inactivity to save battery power. Unfortunately, this will also turn off the Bluetooth radio. They can be woken by either receiving a message over LoRa (the LoRa receiver never switches off), or by pressing a program button if there is one on the device. For example, to keep the Bluetooth link awake for eight hours (any usage of the Bluetooth protocol from your phone will reset this timer), set this to 28800 seconds. +ESP32 devices can enter sleep mode to save battery life. During sleep Bluetooth is turned off. This setting allows the length of the sleep mode to be changed from the default 300 seconds (5 minutes). After this time period, they awake to check the phone for any queued messages and then go back to sleep, alternating between sleep and awake states. Receiving a message over LoRa (the LoRa receiver never switches off) or pressing a program button (if there is one on the device) also awakes the device. ### Debug page From 275e9d5af63efdc6ad8958042d9664a2fcba82c7 Mon Sep 17 00:00:00 2001 From: GDR! Date: Tue, 11 Jan 2022 17:42:43 +0100 Subject: [PATCH 02/25] Clarify PSK docs Add all possible values of the setting `psk` and clarify which settings are secure and which are not. Closes issue #176 --- docs/software/settings/channel.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/software/settings/channel.md b/docs/software/settings/channel.md index 45515de9..196a929f 100644 --- a/docs/software/settings/channel.md +++ b/docs/software/settings/channel.md @@ -20,7 +20,7 @@ Channel settings are an integral part of the way your devices communicate across | id | `integer` | `0` | | modem_config | `Bw125Cr45Sf128`, `Bw500Cr45Sf128`, `Bw31_25Cr48Sf512`, `Bw125Cr48Sf4096` | TODO | | name | `string` | `""` | -| psk | `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` | `1` | +| psk | `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `none`, `default`, `random` | `1` | | region | `Unset`, `US`, `EU433`, `EU865`, `CN`, `JP`, `ANZ`, `KR`, `TW`, `RU` | `Unset` | | uplink_enabled | `true`, `false` | `false` | @@ -57,6 +57,8 @@ This is in active development and not ready for casual users. Testing only. +The following table uses publicly known encryption keys. They're shipped with Meshtastic source code and thus, anyone can listen to messages encrypted by them. + | Setting | Behavior | | :-----: | :------: | | `0` | Disable Encryption | @@ -70,8 +72,10 @@ This is in active development and not ready for casual users. Testing only. | Setting | Behavior | | :-----: | :------: | | `none` | Disable Encryption | -| `default` | Default Encryption | -| `random` | TODO | +| `default` | Default Encryption (use the weak encryption key) | +| `random` | Generate a secure 256-bit encryption key. Use this setting for private communication. | + +If you use Meshtastic for exchanging messages you don't want other people to see, `random` is the setting you should use. ### region From 8c982b0917bf3d7f8450a2e47d52a3f870a57460 Mon Sep 17 00:00:00 2001 From: GDR! Date: Tue, 11 Jan 2022 17:44:51 +0100 Subject: [PATCH 03/25] Better wording for PSK --- docs/software/settings/channel.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/software/settings/channel.md b/docs/software/settings/channel.md index 196a929f..07258d2b 100644 --- a/docs/software/settings/channel.md +++ b/docs/software/settings/channel.md @@ -57,7 +57,7 @@ This is in active development and not ready for casual users. Testing only. -The following table uses publicly known encryption keys. They're shipped with Meshtastic source code and thus, anyone can listen to messages encrypted by them. +Selecting a number from the following table will use publicly known encryption keys. They're shipped with Meshtastic source code and thus, anyone can listen to messages encrypted by them. They're great for testing and public channels. | Setting | Behavior | | :-----: | :------: | From 0ccc85c68555cab3b3df914eb1b0552407b9e462 Mon Sep 17 00:00:00 2001 From: GDR! Date: Tue, 11 Jan 2022 20:26:15 +0100 Subject: [PATCH 04/25] put the note about using random PSK into an admonition --- docs/software/settings/channel.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/software/settings/channel.md b/docs/software/settings/channel.md index 07258d2b..ff6b8907 100644 --- a/docs/software/settings/channel.md +++ b/docs/software/settings/channel.md @@ -75,7 +75,9 @@ Selecting a number from the following table will use publicly known encryption k | `default` | Default Encryption (use the weak encryption key) | | `random` | Generate a secure 256-bit encryption key. Use this setting for private communication. | +:::note If you use Meshtastic for exchanging messages you don't want other people to see, `random` is the setting you should use. +::: ### region From 8ddd7709b0dd0e0a8ea3e34ce142803cc47e571b Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Tue, 11 Jan 2022 12:51:33 -0800 Subject: [PATCH 05/25] add standalone python info --- docs/software/python/installation.md | 6 ++- docs/software/python/standalone.md | 64 ++++++++++++++++++++++++++++ sidebars.js | 1 + 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 docs/software/python/standalone.md diff --git a/docs/software/python/installation.md b/docs/software/python/installation.md index 639ea2bf..1db2884d 100644 --- a/docs/software/python/installation.md +++ b/docs/software/python/installation.md @@ -6,13 +6,15 @@ sidebar_label: Installation import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -This library provides a command line interface for Meshtastic nodes and provides an easy API for sending and receiving messages over mesh radios, in addition to changing user settings. Using the command line is currently the most powerful. Events are delivered using a publish-subscribe model, and you can subscribe to only the message types you are interested in. +This library provides a command line interface (CLI) for Meshtastic nodes and provides an easy API for sending and receiving messages over mesh radios, in addition to changing user settings. Using the command line is currently the most powerful. Events are delivered using a publish-subscribe model, and you can subscribe to only the message types you are interested in. [Full documentation](https://meshtastic.org/docs/software/python/python-installation) for the library, including examples, is available. If you wish to view the code or contribute to development of the python library or the command line interface, please visit the Meshtastic python GitHub page. -Installation is easily done through the [Python package installer pip](https://pypi.org/project/meshtastic/): +There are standalone executables for Mac, Windows and Ubuntu if you do not want to install python and/or the python libraries required to run the mestastic CLI tool. See [Standalone](https://meshtastic.org/docs/software/python/python-standalone) for more information. + +Installation can also be easily done through the [Python package installer pip](https://pypi.org/project/meshtastic/): :::note You must use pip version 20 or later. To upgrade to the latest pip, do: `pip install --upgrade pip` ::: diff --git a/docs/software/python/standalone.md b/docs/software/python/standalone.md new file mode 100644 index 00000000..64cca31f --- /dev/null +++ b/docs/software/python/standalone.md @@ -0,0 +1,64 @@ +--- +id: python-standalone +title: Meshtastic-python standalone executable +sidebar_label: Standalone +--- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +There are standalone executable files for Mac, Windows and Ubuntu. A single file is all you need to run the command line interface (CLI) Meshtastic tool. There is a zip file per operating system. To use, see the operating system specific notes below: + + + + + +* Download meshtastic_ubuntu.zip + +* Unzip. + +* Run: "chmod +x meshtastic" + +* To run: "./meshtastic" + +* Tip: Copy (or move) this binary somewhere in your path. + + + + +* Download meshtastic_mac.zip + +* Unzip. + +* Run: "chmod +x meshtastic" + +* Try to run it: "./meshtastic". You may get a dialog that says: + "meshtastic" can't be opened because Apple cannot check it for malicious software. + +* To fix, go into "System Preferences", "Security & Privacy", "General" tab, and click on the "Allow Anyway" button. + +* Try to run it again: "./meshtastic". You may get a dialog that says: + "meshtastic" can't be opened because Apple cannot check it for malicious software. + Click "Open". + +* Now when you want to run it, you can simply run "./meshtastic". + +* Tip: Copy (or move) this binary somewhere in your path. + + + + +* Download meshtastic_windows.zip + +* Unzip. + +* To run, double click on "meshtastic.exe" or from a command prompt run "./meshtastic.exe" + + + diff --git a/sidebars.js b/sidebars.js index dc01c654..7c301e32 100644 --- a/sidebars.js +++ b/sidebars.js @@ -50,6 +50,7 @@ module.exports = { { "Meshtastic-python": [ "software/python/python-installation", + "software/python/python-standalone", "software/python/python-cli", "software/python/python-uses", "software/python/python-commands", From 952545a5a072aa7e05ce0f3e3806e8f4609b5d6d Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Wed, 12 Jan 2022 11:14:44 -0800 Subject: [PATCH 06/25] remove duplicate page; re-format standalone; fix links --- docs/software/python/commands.md | 396 --------------------------- docs/software/python/installation.md | 4 +- docs/software/python/standalone.md | 66 ++++- sidebars.js | 1 - 4 files changed, 58 insertions(+), 409 deletions(-) delete mode 100644 docs/software/python/commands.md diff --git a/docs/software/python/commands.md b/docs/software/python/commands.md deleted file mode 100644 index 091bb078..00000000 --- a/docs/software/python/commands.md +++ /dev/null @@ -1,396 +0,0 @@ ---- -id: python-commands -title: Meshtastic-python Commands -sidebar_label: Commands ---- - -# Python API Commands Guide - -The python pip package installs a "meshtastic" command line executable, which displays packets sent over the network as JSON and lets you see serial debugging information from the meshtastic devices. This command is not run inside of python, you run it from your operating system shell prompt directly. If when you type "meshtastic" it doesn't find the command and you are using Windows: Check that the python "scripts" directory is in your path. - -## Optional Arguments - -### -h or --help - -Shows a help message that describes the arguments. - -**Usage** - -```shell -meshtastic -h -``` - -### --port PORT - -The port the Meshtastic device is connected to, i.e. /dev/ttyUSB0 or COM4. if unspecified, meshtastic will try to find it. Important to use when multiple devices are connected to ensure you call the command for the correct device. - -**Usage** - -```shell -meshtastic --port /dev/ttyUSB0 --info -meshtastic --port COM4 --info -``` - -### --host HOST - -The hostname/ipaddr of the device to connect to (over TCP). - -**Usage** - -```shell -meshtastic --host HOST -``` - -### --seriallog SERIALLOG - -Logs device serial output to either 'stdout', 'none' or a filename to append to. - -**Usage** - -```shell -meshtastic --port /dev/ttyUSB0 --seriallog -``` - -### --info - -Read and display the radio config information. - -**Usage** - -```shell -meshtastic --port /dev/ttyUSB0 --info -``` - -### --nodes - -Prints a node list in a pretty, formatted table. - -**Usage** - -```shell -meshtastic --nodes -``` - -### --qr - -Displays the QR code that corresponds to the current channel. - -**Usage** - -```shell -meshtastic --qr -``` - -### --get GET - -Gets a preferences field. - -**Usage** - -```shell -meshtastic --get modem_config -``` - -### --set SET SET - -Sets a preferences field. - -**Usage** - -```shell -meshtastic --set region Unset -``` - -### --seturl SETURL - -Set a channel URL. - -**Usage** - -```shell -meshtastic --seturl https://www.meshtastic.org/c/GAMiIE67C6zsNmlWQ-KE1tKt0fRKFciHka-DShI6G7ElvGOiKgZzaGFyZWQ= -``` - -### --ch-index CH_INDEX - -Set the specified channel index - -**Usage** - -```shell -meshtastic --ch-index 1 --ch-disable -``` - -### --ch-add CH_ADD - -Add a secondary channel, you must specify a channel name. - -**Usage** - -```shell -meshtastic --ch-add testing-channel -``` - -### --ch-del - -Delete the ch-index channel. - -**Usage** - -```shell -meshtastic --ch-index 1 --ch-del -``` - -### --ch-enable - -Enable the specified channel. - -**Usage** - -```shell -meshtastic --ch-index 1 --ch-enable -``` - -### --ch-disable - -Disable the specified channel. - -**Usage** - -```shell -meshtastic --ch-index 1 --ch-disable -``` - -### --ch-set CH_SET CH_SET - -Set a channel parameter. - -**Usage** - -```shell -meshtastic --ch-set id 1234 -``` - -### --ch-longslow - -Change to the standard long-range (but slow) channel. - -**Usage** - -```shell -meshtastic --ch-longslow -``` - -### --ch-shortfast - -Change to the standard fast (but short range) channel. - -**Usage** - -```shell -meshtastic --ch-shortfast -``` - -### --set-owner SET_OWNER - -Set device owner name. - -**Usage** - -```shell -meshtastic --dest \!28979058 --set-owner "MeshyJohn" -``` - -### --set-ham SET_HAM - -Set licensed Ham ID and turn off encryption. - -**Usage** - -```shell -meshtastic --set-ham KI1345 -``` - -### --dest DEST - -The destination node id for any sent commands - -**Usage** - -```shell -meshtastic --dest \!28979058 --set-owner "MeshyJohn" -``` - -### --sendtext SENDTEXT - -Send a text message. - -**Usage** - -```shell -meshtastic --sendtext "Hello Mesh!" -``` - -### --sendping - -Send a ping message (which requests a reply). - -**Usage** - -```shell -meshtastic --sendping -``` - -### --reboot - -Tell the destination node to reboot. - -**Usage** - -```shell -meshtastic --dest \!28979058 --reboot -``` - -### --reply - -Reply to received messages. - -**Usage** - -```shell -meshtastic --reply -``` - -### --gpio-wrb GPIO_WRB GPIO_WRB - -Set a particular GPIO # to 1 or 0. - -**Usage** - -```shell -meshtastic --port /dev/ttyUSB0 --gpio-wrb 4 1 --dest \!28979058 -``` - -### --gpio-rd GPIO_RD - -Read from a GPIO mask. - -**Usage** - -```shell -meshtastic --port /dev/ttyUSB0 --gpio-rd 0x10 --dest \!28979058 -``` - -### --gpio-watch GPIO_WATCH - -Start watching a GPIO mask for changes. - -**Usage** - -```shell -meshtastic --port /dev/ttyUSB0 --gpio-watch 0x10 --dest \!28979058 -``` - -### --no-time - -Suppress sending the current time to the mesh. - -**Usage** - -```shell -meshtastic --port /dev/ttyUSB0 --no-time -``` - -### --setalt SETALT - -Set device altitude (allows use without GPS). - -**Usage** - -```shell -meshtastic --setalt 120 -``` - -### --setlat SETLAT - -Set device latitude (allows use without GPS). - -**Usage** - -```shell -meshtastic --setlat 25.2 -``` - -### --setlon SETLON - -Set device longitude (allows use without GPS). - -**Usage** - -```shell -meshtastic --setlon -16.8 -``` - -### --debug - -Show API library debug log messages. - -**Usage** - -```shell -meshtastic --debug --info -``` - -### --test - -Run stress test against all connected Meshtastic devices. - -**Usage** - -```shell -meshtastic --test -``` - -### --ble BLE - -BLE mac address to connect to (BLE is not yet supported for this tool). - -**Usage** - -```shell -meshtastic --ble "83:38:92:32:37:48" -``` - -### --noproto - -Don't start the API, just function as a dumb serial terminal. - -**Usage** - -```shell -meshtastic --noproto -``` - -### --version - -Show program's version number and exit. - -**Usage** - -```shell -meshtastic --version -``` - -## Deprecated Arguments - -### --setchan - -Deprecated - use "--ch-set param value" instead. - -### --set-router - -Deprecated - use "--set is_router true" instead. - -### --unset-router - -Deprecated - use "--set is_router false" instead. diff --git a/docs/software/python/installation.md b/docs/software/python/installation.md index 1db2884d..2e7abc00 100644 --- a/docs/software/python/installation.md +++ b/docs/software/python/installation.md @@ -8,9 +8,9 @@ import TabItem from '@theme/TabItem'; This library provides a command line interface (CLI) for Meshtastic nodes and provides an easy API for sending and receiving messages over mesh radios, in addition to changing user settings. Using the command line is currently the most powerful. Events are delivered using a publish-subscribe model, and you can subscribe to only the message types you are interested in. -[Full documentation](https://meshtastic.org/docs/software/python/python-installation) for the library, including examples, is available. +The [Meshtastic-python repo](https://github.com/meshtastic/Meshtastic-python) and [API documentation](https://meshtastic-python.vercel.app/meshtastic/index.html) are excellent sources of information. -If you wish to view the code or contribute to development of the python library or the command line interface, please visit the Meshtastic python GitHub page. +If you wish to view the code or contribute to development of the python library or the command line interface, please visit the Meshtastic python GitHub page. There are standalone executables for Mac, Windows and Ubuntu if you do not want to install python and/or the python libraries required to run the mestastic CLI tool. See [Standalone](https://meshtastic.org/docs/software/python/python-standalone) for more information. diff --git a/docs/software/python/standalone.md b/docs/software/python/standalone.md index 64cca31f..232f5f11 100644 --- a/docs/software/python/standalone.md +++ b/docs/software/python/standalone.md @@ -8,6 +8,8 @@ import TabItem from '@theme/TabItem'; There are standalone executable files for Mac, Windows and Ubuntu. A single file is all you need to run the command line interface (CLI) Meshtastic tool. There is a zip file per operating system. To use, see the operating system specific notes below: +They can be found on the [Releases](https://github.com/meshtastic/Meshtastic-python/releases) page. + @@ -36,20 +52,46 @@ There are standalone executable files for Mac, Windows and Ubuntu. A single file * Unzip. -* Run: "chmod +x meshtastic" +* Run the following command to make the file executable: -* Try to run it: "./meshtastic". You may get a dialog that says: - "meshtastic" can't be opened because Apple cannot check it for malicious software. +``` +chmod +x meshtastic +``` + +* Try to run it: + +``` +./meshtastic +``` + +:::note + You may get a dialog that says: + "meshtastic" can't be opened because Apple cannot check it for malicious software. +::: * To fix, go into "System Preferences", "Security & Privacy", "General" tab, and click on the "Allow Anyway" button. -* Try to run it again: "./meshtastic". You may get a dialog that says: +* Try to run it again: + +``` +./meshtastic +``` + +:::note +You may get a dialog that says: "meshtastic" can't be opened because Apple cannot check it for malicious software. Click "Open". +::: -* Now when you want to run it, you can simply run "./meshtastic". +* Now when you want to run it, you can simply run: -* Tip: Copy (or move) this binary somewhere in your path. +``` +./meshtastic +``` + +:::tip +Copy (or move) this binary somewhere in your path. +::: @@ -58,7 +100,11 @@ There are standalone executable files for Mac, Windows and Ubuntu. A single file * Unzip. -* To run, double click on "meshtastic.exe" or from a command prompt run "./meshtastic.exe" +* To run, double click on "meshtastic.exe" or from a command prompt run: + +``` +.\meshtastic.exe +``` diff --git a/sidebars.js b/sidebars.js index 7c301e32..caaba47c 100644 --- a/sidebars.js +++ b/sidebars.js @@ -53,7 +53,6 @@ module.exports = { "software/python/python-standalone", "software/python/python-cli", "software/python/python-uses", - "software/python/python-commands", "software/python/python-stream", { type: "link", From be1ccbed8da7d543e6299403c1ea7d9f57cd8bc0 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 14 Jan 2022 00:55:36 +0000 Subject: [PATCH 07/25] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index 18fc4cdb..e992214c 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 18fc4cdb522cb3740b3b547b3eac57781ca9c1f0 +Subproject commit e992214cefbf9eb6e291eaab064333ae88610809 From b75ce2a7e5f9535c2285973db4685989d6b4e48f Mon Sep 17 00:00:00 2001 From: andrekir Date: Sat, 15 Jan 2022 09:13:49 -0300 Subject: [PATCH 08/25] update link to pyhton api docs --- sidebars.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sidebars.js b/sidebars.js index caaba47c..e4c5afa6 100644 --- a/sidebars.js +++ b/sidebars.js @@ -57,7 +57,7 @@ module.exports = { { type: "link", label: "API Docs", - href: "https://meshtastic-python.vercel.app/meshtastic/index.html", + href: "https://python.meshtastic.org/", }, ], }, From a0d0f0665b11cf4ccb3bfcd7a80bd97719e696bd Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 15 Jan 2022 17:34:02 +0000 Subject: [PATCH 09/25] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index e992214c..d7b2791b 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit e992214cefbf9eb6e291eaab064333ae88610809 +Subproject commit d7b2791b7cf00a4d7be61370fc5cd9554f075585 From fc24742957f8f30bc08c4ac5e8171a190f8e36c6 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 16 Jan 2022 22:31:57 +0000 Subject: [PATCH 10/25] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index d7b2791b..6eff12b9 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit d7b2791b7cf00a4d7be61370fc5cd9554f075585 +Subproject commit 6eff12b91dfea369c6ee5b24003a14742ac52adc From ea0d82ebefd08db97e212c097ad12780d5c6f867 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 16 Jan 2022 23:18:14 +0000 Subject: [PATCH 11/25] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index 6eff12b9..be14ce59 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 6eff12b91dfea369c6ee5b24003a14742ac52adc +Subproject commit be14ce595fc30e1f87f8182fab0a06fd8600cdaa From c4f49a0d2d362e35be9080968c59535faab5e3fe Mon Sep 17 00:00:00 2001 From: Balazs Kelemen <10376327+prampec@users.noreply.github.com> Date: Tue, 18 Jan 2022 23:27:59 +0100 Subject: [PATCH 12/25] CannedMessagePlugin --- docs/software/overview.md | 1 + docs/software/plugins/canned-message.md | 149 ++++++++++++++++++ docs/software/plugins/plugins.md | 1 + .../settings/canned-message-plugin.md | 53 +++++++ docs/software/settings/rotary-encoder.md | 58 +++++++ sidebars.js | 3 + 6 files changed, 265 insertions(+) create mode 100644 docs/software/plugins/canned-message.md create mode 100644 docs/software/settings/canned-message-plugin.md create mode 100644 docs/software/settings/rotary-encoder.md diff --git a/docs/software/overview.md b/docs/software/overview.md index c8da9c90..8df4f221 100644 --- a/docs/software/overview.md +++ b/docs/software/overview.md @@ -16,6 +16,7 @@ The following applications are available to support your Meshtastic network: - Pre-installed device plugins for: - [Range testing](/docs/software/plugins/range-test-plugin) - [External notifications](/docs/software/plugins/ext-notif-plugin) + - [Canned messages](/docs/software/plugins/canned-message-plugin) - [Serial communication](/docs/software/plugins/serial-plugin) - [Store and forwarding messages](/docs/software/plugins/store-forward-plugin) (in development) - [Environment measurement](/docs/software/plugins/environment-plugin) (in development) diff --git a/docs/software/plugins/canned-message.md b/docs/software/plugins/canned-message.md new file mode 100644 index 00000000..6b046cf3 --- /dev/null +++ b/docs/software/plugins/canned-message.md @@ -0,0 +1,149 @@ +--- +id: canned-message-plugin +title: Canned messages +sidebar_label: Canned messages +--- +## About + +The CannedMessage Plugin will allow you to send messages to the mesh network +from the device without using the phone app. +You can predefine text messages to choose from. + +## Hardware + +To navigate through messages and select one, you will require some +hardware attached to your device. +Currently, the plugin is tested with a generic rotary encoder, but this is +not a limitation further input methods can be added in the future. + +### Rotary encoder + +Meshtastic supports hardwired rotary encoders as input devices. +(Technically CannedMessage plugin is independent of rotary +encoders. It is described here, because no other module utilizes rotary encoders just yet.) + +You will need a generic rotary encoder. The types listed below has five legs +where two is dedicated to a "press" action, +but any other types will likely do the job. You can also use a +three-legged version, where the "press" action should be wired from +an independent switch. + +* [Amazon link](https://www.amazon.com/Rotary-Encoder-Washers-Digital-Potentiometer/dp/B07Y619CZR/ref=sr_1_21?keywords=rotary+encoder&qid=1642317807&sprefix=rotary+enco%2Caps%2C186&sr=8-21) +* [Amazon.DE link](https://www.amazon.de/-/en/sourcing-Degree-Rotary-Encoder-Digital/dp/B07RLZPX5K/ref=sr_1_12?keywords=rotary+encoder&qid=1642320025&sprefix=rotary%2Caps%2C105&sr=8-12) +* [Aliexpress link1](https://www.aliexpress.com/item/32992227812.html?spm=a2g0o.productlist.0.0.1afe21a50SLvi2&algo_pvid=a19c4182-08aa-406d-bfdf-132582ef5ebb&algo_exp_id=a19c4182-08aa-406d-bfdf-132582ef5ebb-23&pdp_ext_f=%7B%22sku_id%22%3A%2266940265509%22%7D&pdp_pi=-1%3B1.66%3B-1%3B-1%40salePrice%3BUSD%3Bsearch-mainSearch) +* [Aliexpress link2](https://www.aliexpress.com/item/32946444853.html?spm=a2g0o.productlist.0.0.1afe21a50SLvi2&algo_pvid=a19c4182-08aa-406d-bfdf-132582ef5ebb&aem_p4p_detail=2022011523263276283624312400022072680&algo_exp_id=a19c4182-08aa-406d-bfdf-132582ef5ebb-6&pdp_ext_f=%7B%22sku_id%22%3A%2266223434642%22%7D&pdp_pi=-1%3B1.91%3B-1%3B-1%40salePrice%3BUSD%3Bsearch-mainSearch) +* [Aliexpress link3](https://www.aliexpress.com/item/10000056483250.html?spm=a2g0o.productlist.0.0.1afe21a50SLvi2&algo_pvid=a19c4182-08aa-406d-bfdf-132582ef5ebb&algo_exp_id=a19c4182-08aa-406d-bfdf-132582ef5ebb-9&pdp_ext_f=%7B%22sku_id%22%3A%2220000000116682147%22%7D&pdp_pi=-1%3B2.51%3B-1%3B-1%40salePrice%3BUSD%3Bsearch-mainSearch) + +Connect your rotary encoder as follows. The rotary encoder has two +rows of legs. One of the rows contains two legs, the other contains three +legs. Bottom side view: + + B o --- o PRESS + GND o | | + A o --- o GND + +The two legs is to sense the press action (or push). Connect +one of the two to GROUND and the other to a GPIO pin. (No matter which one +goes where.) Let's call this connected ports 'PRESS'. + +The three legs is to sense the rotation action. +Connect the middle leg to GROUND and the ones on the side +to GPIO pins. Let's call these ports 'A' and 'B', according to +the scheme below. + + A --|| + GND --||]======== + B --|| + +Recommended GPIO pins for connecting a rotary encoder. + +* TTGO LoRa V1: + * A - GPIO-22 + * B - GPIO-23 + * PRESS - GPIO-21 + +There is a reference case 3D-design utilizing the rotary encoder for TTGO LoRa V1: +[Case for TTGO-ESP32-LORA-OLED-v1.0 with rotary encoder](https://www.thingiverse.com/thing:5178495) + +### Configuration of the rotary encoder #1 + + rotary1_enabled + Enable the rotary encoder #1 + + rotary1_pin_a + GPIO pin for rotary encoder A port. + + rotary1_pin_b + GPIO pin for rotary encoder B port. + + rotary1_pin_press + GPIO pin for rotary encoder Press port. + + rotary1_event_cw + Generate input event on CW of this kind. + For using with CannedMessagePlugin you must choose value "UP" here! + + rotary1_event_ccw + Generate input event on CCW of this kind. + For using with CannedMessagePlugin you must choose value "DOWN" here! + + rotary1_event_press + Generate input event on Press of this kind. + For using with CannedMessagePlugin you must choose value "SELECT" here! + +The rotary encoder #1 will send input events under name "rotEnc1". + +## Configuration of the plugin + +Following configuration can be set for the plugin. + + canned_message_plugin_enabled + Enable/disable CannedMessagePlugin. + + canned_message_plugin_allow_input_source + Input event origin accepted by the canned message plugin. + Can be e.g. "rotEnc1" or keyword "_any" + + canned_message_plugin_messages + Predefined messages for CannedMessagePlugin separated by '|' characters. + + canned_message_plugin_send_bell + CannedMessagePlugin also sends a bell character with the messages. + ExternalNotificationPlugin can benefit from this feature. + +## Usage Notes + +For setting up the rotary encoder #1 using the Python CLI you will +need to execute a sequence like this: + + meshtastic --set rotary1_pin_a 22 + meshtastic --set rotary1_pin_b 23 + meshtastic --set rotary1_pin_press 21 + meshtastic --set rotary1_event_cw KEY_UP + meshtastic --set rotary1_event_ccw KEY_DOWN + meshtastic --set rotary1_event_press KEY_SELECT + meshtastic --set rotary1_enabled True + +For setting up the plugin you will +need to execute a sequence like this: + + meshtastic --set canned_message_plugin_allow_input_source "_any" + meshtastic --set canned_message_plugin_messages "I'm fine|I'm out|I'm back|Need helping hand|Help me with saw|I need an alpinist|I need ambulance|Keep Calm|On my way|I will be late|I'm already waiting|We have company|Beer is cold|Roger" + meshtastic --set canned_message_plugin_send_bell False + meshtastic --set canned_message_plugin_enabled True + +:::note +You can define up to 50 messages with a total length 200 bytes. +(We are working on a solution to extend total length.) +Use short texts as end of line will be truncated on the screen. +::: + +:::note +The device must be restarted after the settings have been changed for the plugin to take effect. +::: + +## Known Problems + +* Rotary encoder input uses a technology called "interrupts". Using the +rotary encoder might cause unexpected software problems. This needs to be +tested. \ No newline at end of file diff --git a/docs/software/plugins/plugins.md b/docs/software/plugins/plugins.md index ece12078..da3f717b 100644 --- a/docs/software/plugins/plugins.md +++ b/docs/software/plugins/plugins.md @@ -9,6 +9,7 @@ There are a number of plugins that have been integrated into the device firmware These plugins are currently integrated into the firmware: * Range test - Allows automated testing of communication range of nodes * External notifications - Allows a speaker, LED or other device to indicate when a message has been received +* Canned messages - Device can be used without the phone to send a message by choosing a predefined text * Serial - Allows messages to be sent across the mesh by sending strings across a serial port These plugins are currently in development: diff --git a/docs/software/settings/canned-message-plugin.md b/docs/software/settings/canned-message-plugin.md new file mode 100644 index 00000000..d2b74b99 --- /dev/null +++ b/docs/software/settings/canned-message-plugin.md @@ -0,0 +1,53 @@ +--- +id: canned-message-plugin-settings +title: Canned Message Plugin Settings +sidebar_label: Canned Message Plugin Settings +--- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + +## Overview + +The CannedMessage Plugin will allow you to send messages to the mesh network +from the device without using the phone app. +You can predefine text messages to choose from. + +Please also follow settings of Rotary Encoder to configure input source! + +## Settings + +| Setting | Acceptable Values | Default | +| :-----: | :---------------: | :-----: | +| canned_message_plugin_enabled | `true`, `false` | `false` | +| canned_message_plugin_allow_input_source | `string` | `_all` | +| canned_message_plugin_messages | `string` | (not defined) | +| canned_message_plugin_send_bell | `true`, `false` | `false` | + +### canned_message_plugin_enabled + +Enables the plugin. + +### canned_message_plugin_allow_input_source + +Input event origin accepted by the canned message plugin. +Can be e.g. "rotEnc1" or keyword "_any" + +### canned_message_plugin_messages + +Predefined messages for CannedMessagePlugin separated by '|' characters. + +You can define up to 50 messages with a total length 1024 bytes. + +### canned_message_plugin_send_bell + +CannedMessagePlugin also sends a bell character with the messages. +ExternalNotificationPlugin can benefit from this feature. + +## Details + +See "Software / Plugins / Canned messages" for details! + +## Examples + +See "Software / Plugins / Canned messages" for examples! diff --git a/docs/software/settings/rotary-encoder.md b/docs/software/settings/rotary-encoder.md new file mode 100644 index 00000000..191dc3fa --- /dev/null +++ b/docs/software/settings/rotary-encoder.md @@ -0,0 +1,58 @@ +--- +id: rotary-encoder-settings +title: Rotary Encoder +sidebar_label: Rotary Encoder +--- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + +## Overview + +Meshtastic supports hardwired rotary encoders as input devices. +Currently, one rotary encoder (`rotary1`) is defined, but later more rotary encoders +can be added (if needed) the same way. + +## Settings + +| Setting | Acceptable Values | Default | +| :-----: | :---------------: | :-----: | +| rotary1_enabled | `true`, `false` | `false` | +| rotary1_pin_a | `integer` | (not defined) | +| rotary1_pin_b | `integer` | (not defined) | +| rotary1_pin_press | `integer` | (not defined) | +| rotary1_event_cw | `InputEventChar` | (not defined) | +| rotary1_event_ccw | `InputEventChar` | (not defined) | +| rotary1_event_press | `InputEventChar` | (not defined) | + +### rotary1_enabled +Enable the rotary encoder #1 + +### rotary1_pin_a +GPIO pin for rotary encoder A port. + +### rotary1_pin_b +GPIO pin for rotary encoder B port. + +### rotary1_pin_press +GPIO pin for rotary encoder Press port. + +### rotary1_event_cw +Generate input event on CW of this kind. +(For using with CannedMessagePlugin you must choose value "UP" here.) + +### rotary1_event_ccw +Generate input event on CCW of this kind. +(For using with CannedMessagePlugin you must choose value "DOWN" here.) + +### rotary1_event_press +Generate input event on Press of this kind. +(For using with CannedMessagePlugin you must choose value "SELECT" here.) + +## Details + +See "Software / Plugins / Canned messages" for details! + +## Examples + +See "Software / Plugins / Canned messages" for examples! diff --git a/sidebars.js b/sidebars.js index e4c5afa6..695d61ea 100644 --- a/sidebars.js +++ b/sidebars.js @@ -66,6 +66,7 @@ module.exports = { "software/plugins/plugins", "software/plugins/range-test-plugin", "software/plugins/ext-notif-plugin", + "software/plugins/canned-message-plugin", "software/plugins/serial-plugin", "software/plugins/store-forward-plugin", "software/plugins/environment-plugin", @@ -116,9 +117,11 @@ module.exports = { Plugins: [ "software/settings/environmental-measurement-plugin", "software/settings/external-notification-plugin", + "software/settings/canned-message-plugin-settings", "software/settings/range-test-plugin", "software/settings/serial-plugin", "software/settings/store-and-forward-plugin", + "software/settings/rotary-encoder-settings", ], Advanced: [ "software/settings/channel-advanced", From 57de02d53fa62f628cab80b2626dc841081d61d5 Mon Sep 17 00:00:00 2001 From: Foster Irwin Date: Wed, 19 Jan 2022 12:32:54 -0700 Subject: [PATCH 13/25] reorganize navigation and sidebars --- docusaurus.config.js | 42 +++++++++++++++++++++--- sidebars.js | 78 ++++++++++++++++++++++++-------------------- 2 files changed, 80 insertions(+), 40 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 39a7ceb6..91069abb 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -42,6 +42,43 @@ const config = { activeBasePath: "docs/academy", }, */ + { + label: "Documentation", + items: [ + { + label: "About Meshtastic", + to: "docs/software", + }, + { + label: "Getting Started", + to: "docs/getting-started", + }, + { + label: "Device Settings", + to: "docs/settings", + }, + { + label: "Hardware Details", + to: "docs/hardware", + }, + { + label: "Contribute to Meshtastic", + to: "docs/developers", + }, + /* + TODO add Docusaurus and Vercel instructions for how to manage the docs + { + label: "About this Documentation", + to: "docs/about-documentation", + }, + */ + { + label: "Legal", + to: "docs/legal", + }, + + ], + }, { label: "Firmware", to: "firmware", @@ -52,11 +89,6 @@ const config = { to: "showcase", activeBasePath: "showcase", }, - { - label: "Docs", - to: "docs/getting-started", - activeBasePath: "docs/getting-started", - }, { href: "https://meshtastic.discourse.group", label: "Forum", diff --git a/sidebars.js b/sidebars.js index 695d61ea..3add6e24 100644 --- a/sidebars.js +++ b/sidebars.js @@ -1,16 +1,5 @@ module.exports = { - Sidebar: { - "Getting Started": [ - "getting-started/overview", - "getting-started/faq", - { - "Flashing firmware": [ - "getting-started/flashing-esp32", - "getting-started/flashing-nrf52", - ], - }, - "getting-started/concepts", - ], + About: { Software: [ "software/overview", { @@ -104,33 +93,48 @@ module.exports = { "software/other/ant", ], }, + ], + }, + GettingStarted: { + "Getting Started": [ + "getting-started/overview", + "getting-started/faq", { - Settings: [ - "software/settings/overview", - "software/settings/channel", - "software/settings/gps", - "software/settings/mqtt", - "software/settings/power", - "software/settings/router", - "software/settings/wifi", - { - Plugins: [ - "software/settings/environmental-measurement-plugin", - "software/settings/external-notification-plugin", - "software/settings/canned-message-plugin-settings", - "software/settings/range-test-plugin", - "software/settings/serial-plugin", - "software/settings/store-and-forward-plugin", - "software/settings/rotary-encoder-settings", - ], - Advanced: [ - "software/settings/channel-advanced", - "software/settings/misc", - ], - }, + "Flashing firmware": [ + "getting-started/flashing-esp32", + "getting-started/flashing-nrf52", + ], + }, + "getting-started/concepts", + ], + }, + Settings: { + Settings: [ + "software/settings/overview", + "software/settings/channel", + "software/settings/gps", + "software/settings/mqtt", + "software/settings/power", + "software/settings/router", + "software/settings/wifi", + { + Plugins: [ + "software/settings/environmental-measurement-plugin", + "software/settings/external-notification-plugin", + "software/settings/canned-message-plugin-settings", + "software/settings/range-test-plugin", + "software/settings/serial-plugin", + "software/settings/store-and-forward-plugin", + "software/settings/rotary-encoder-settings", + ], + Advanced: [ + "software/settings/channel-advanced", + "software/settings/misc", ], }, ], + }, + Hardware: { Hardware: [ "hardware/overview", { @@ -155,6 +159,8 @@ module.exports = { ], }, ], + }, + Contribute: { Developers: [ "developers/overview", { @@ -183,6 +189,8 @@ module.exports = { ], }, ], + }, + Legal: { Legal: [ "legal/overview", "legal/licensing", From 21b40392a7ba8457b14e0387eb78821f7d2e88d5 Mon Sep 17 00:00:00 2001 From: Foster Irwin Date: Wed, 19 Jan 2022 16:17:34 -0700 Subject: [PATCH 14/25] relocated admonition specific to windows to a tab --- docs/getting-started/flashing-esp32.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/getting-started/flashing-esp32.md b/docs/getting-started/flashing-esp32.md index f21bbbbd..ad34e207 100644 --- a/docs/getting-started/flashing-esp32.md +++ b/docs/getting-started/flashing-esp32.md @@ -173,12 +173,27 @@ pip --version ### Confirm Communication With Chip -Connect the radio to your computer using a data USB cable. Confirm your device is talking to your computer using the following command: + + + + :::important -On windows, you must explicitly declare esptools as a .py script. Use `esptools.py chip_id`. +On Windows, you must explicitly declare esptools as a .py script. Use `esptools.py chip_id`. ::: + + + +Connect the radio to your computer using a data USB cable. Confirm your device is talking to your computer using the following command: + ```bash title="Command" esptool chip_id ``` @@ -278,7 +293,7 @@ values={[ Browse to the previously downloaded firmware and select the correct firmware based on the board type and frequency. :::caution -Be very careful to install the correct load for your board. In particular the popular 'T-BEAM' radio from TTGO is not called 'TTGO-Lora' (that is a different board). So don't install the 'TTGO-Lora' build on a TBEAM, it won't work correctly. If you flash the incorrect firmware: It may appear to flash correctly, but if your device has a screen it might stay blank. On-board radio peripherals might be damaged because of GPIO pin direction, but you should just try to flash with the correct version. +Be very careful to install the correct load for your board. In particular the popular 'T-BEAM' radio from TTGO is not called 'TTGO-Lora' (that is a different board). So don't install the 'TTGO-Lora' build on a TBEAM, it won't work correctly. If you flash the incorrect firmware: It may appear to flash correctly, but if your device has a screen it might stay blank. On-board radio peripherals might be damaged because of GPIO pin direction, but you should just try to flash with the correct version. ::: ### Flash Firmware From 5537d37afd71e8eb07793a4268804855f7c669d9 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 19 Jan 2022 23:36:41 +0000 Subject: [PATCH 15/25] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index be14ce59..8cf54cb5 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit be14ce595fc30e1f87f8182fab0a06fd8600cdaa +Subproject commit 8cf54cb54b74fdb9f43e291a40cb7f39be118973 From f81da5b51ccff4f2b558da5ae2807c6c32bea3a1 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 19 Jan 2022 23:48:40 +0000 Subject: [PATCH 16/25] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index 8cf54cb5..b8f47da7 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 8cf54cb54b74fdb9f43e291a40cb7f39be118973 +Subproject commit b8f47da71ab24b783e28366438872f171e843195 From 9aa606f969f656759055919c5951adcc5c27d6c3 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 20 Jan 2022 01:02:23 +0000 Subject: [PATCH 17/25] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index b8f47da7..3d25dfda 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit b8f47da71ab24b783e28366438872f171e843195 +Subproject commit 3d25dfda00bf7a580ab690e3d9a914590ba36746 From 251d1965c66380505dfeb6a4181a287fa42df7fb Mon Sep 17 00:00:00 2001 From: andrekir Date: Wed, 19 Jan 2022 23:10:06 -0300 Subject: [PATCH 18/25] add --ch-index at channel-advanced --- docs/software/settings/channel-advanced.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/software/settings/channel-advanced.md b/docs/software/settings/channel-advanced.md index 69a02a67..b1df529b 100644 --- a/docs/software/settings/channel-advanced.md +++ b/docs/software/settings/channel-advanced.md @@ -57,7 +57,9 @@ TODO ]}> - TODO +```bash +meshtastic --ch-set bandwidth 125 --ch-index 0 +``` @@ -99,7 +101,9 @@ TODO ]}> - TODO +```bash +meshtastic --ch-set coding_rate 8 --ch-index 0 +``` @@ -120,7 +124,9 @@ TODO ]}> - TODO +```bash +meshtastic --ch-set spread_factor 12 --ch-index 0 +``` From ff0f8518eed67216982adf924040713325bae9a1 Mon Sep 17 00:00:00 2001 From: andrekir Date: Thu, 20 Jan 2022 11:10:24 -0300 Subject: [PATCH 19/25] add --ch-index at radio-settings --- docs/developers/device/radio-settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developers/device/radio-settings.md b/docs/developers/device/radio-settings.md index 12b3c30a..ed49a598 100644 --- a/docs/developers/device/radio-settings.md +++ b/docs/developers/device/radio-settings.md @@ -75,7 +75,7 @@ Note: The link budget used by these calculations assumes a transmit power of 17d You may want to select other channels for your usage. The other settings can be set by using the Python API. ```bash -meshtastic --setchan spread_factor 10 --setchan coding_rate 4 --setchan bandwidth 125 +meshtastic --setchan spread_factor 10 --setchan coding_rate 4 --setchan bandwidth 125 --ch-index 0 ``` After applying the settings, you will need to restart the device. After your device is restarted, it will generate a new crypto key and you will need to share the newly generated QR Code or URL to all your other devices. From d19bb0833275d015f4a84b09efeadc3669e162e2 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 20 Jan 2022 18:04:00 +0000 Subject: [PATCH 20/25] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index 3d25dfda..5af171a1 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 3d25dfda00bf7a580ab690e3d9a914590ba36746 +Subproject commit 5af171a1a25379869c4dd31fec2fefada3790ebe From 2ef43b7dceddfc1fb945f93f43d48af83cd04e9f Mon Sep 17 00:00:00 2001 From: andrekir Date: Thu, 20 Jan 2022 15:19:24 -0300 Subject: [PATCH 21/25] update --setchan to --ch-set at radio-settings --- docs/developers/device/radio-settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developers/device/radio-settings.md b/docs/developers/device/radio-settings.md index ed49a598..7dba5ccb 100644 --- a/docs/developers/device/radio-settings.md +++ b/docs/developers/device/radio-settings.md @@ -75,7 +75,7 @@ Note: The link budget used by these calculations assumes a transmit power of 17d You may want to select other channels for your usage. The other settings can be set by using the Python API. ```bash -meshtastic --setchan spread_factor 10 --setchan coding_rate 4 --setchan bandwidth 125 --ch-index 0 +meshtastic --ch-set spread_factor 10 --ch-set coding_rate 4 --ch-set bandwidth 125 --ch-index 0 ``` After applying the settings, you will need to restart the device. After your device is restarted, it will generate a new crypto key and you will need to share the newly generated QR Code or URL to all your other devices. From 8474e6268c2c16fdeb0f02889fb5828c16842f40 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 21 Jan 2022 01:02:28 +0000 Subject: [PATCH 22/25] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index 5af171a1..62cb78fc 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 5af171a1a25379869c4dd31fec2fefada3790ebe +Subproject commit 62cb78fcbe2563f48b190b67cb6fc19fc463064d From 1e71ee7e02c43c9aba37561589d713c9e0b84cbe Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 22 Jan 2022 15:04:50 +0000 Subject: [PATCH 23/25] Update protobuf submodule --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index 62cb78fc..60cf0545 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 62cb78fcbe2563f48b190b67cb6fc19fc463064d +Subproject commit 60cf0545612bde3daf53f319db1b72d053f870d3 From 4b4a242dd3dc464b269e413f2a2a83821124ce02 Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Sat, 22 Jan 2022 13:03:40 -0800 Subject: [PATCH 24/25] add more info about env sensors --- docs/software/plugins/environment.md | 31 ++++++++++++------- .../environmental-measurment-plugin.md | 27 +++++++++++----- 2 files changed, 39 insertions(+), 19 deletions(-) diff --git a/docs/software/plugins/environment.md b/docs/software/plugins/environment.md index a1023474..8ff1b6ee 100644 --- a/docs/software/plugins/environment.md +++ b/docs/software/plugins/environment.md @@ -5,7 +5,9 @@ sidebar_label: Environment measurement --- ## About -The Environment Measurement Plugin will allow nodes to send a specific message with information from connected environmental sensors. Currently supported sensors are DHT11 and Dallas 1-wire DS18B20. This plugin does only work on ESP32 devices. +The Environment Measurement Plugin will allow nodes to send a specific message with information from connected environmental sensors. Currently supported sensors are BME280, BME680, DHT11, DHT12, DHT21, DHT22 and Dallas 1-wire DS18B20. + +The preferred setup is using I2C, so the `environmental_measurement_plugin_sensor_pin` may not be needed. ## Configuration @@ -13,7 +15,7 @@ These are the settings that can be configured. environmental_measurement_plugin_enabled Is the plugin enabled? - + 0 = Disabled (Default) 1 = Enabled @@ -40,21 +42,26 @@ These are the settings that can be configured. environmental_measurement_plugin_display_fahrenheit Should temperature readings be converted to fahrenheit? - + 0 = Disabled (Default) 1 = Enabled - + environmental_measurement_plugin_sensor_type What sensor is connected? - + 0 = DHT11 (Default) 1 = Dallas 1-wire DS18B20 - + 2 = DHT12 + 3 = DHT21 + 4 = DHT22 + 5 = BME280 + 6 = BME680 + environmental_measurement_plugin_sensor_pin Which pin is the sensor connected to? - + Default = 0 - + ## Usage Notes @@ -63,22 +70,22 @@ For basic usage, start with: environmental_measurement_plugin_enabled = 1 environmental_measurement_plugin_screen_enabled = 1 - + Depending on which pin your sensor is connected to, set it accordingly: environmental_measurement_plugin_sensor_pin = 13 - + :::note The device must be restarted after the settings have been changed for the plugin to take effect. ::: - + ## Hardware The sensors can be wired differently, here's one example for sensor DS18B20 https://randomnerdtutorials.com/esp32-ds18b20-temperature-arduino-ide - + ## Known Problems * No default configuration values are currently set, so this must be done when enabling the plugin. diff --git a/docs/software/settings/environmental-measurment-plugin.md b/docs/software/settings/environmental-measurment-plugin.md index 099d4880..f37628d9 100644 --- a/docs/software/settings/environmental-measurment-plugin.md +++ b/docs/software/settings/environmental-measurment-plugin.md @@ -9,11 +9,7 @@ import TabItem from '@theme/TabItem'; ## Overview -:::caution -This is a work in progress and is not yet available. -::: - -The Environmental Measurement Plugin will allow you to connect climate sensors to report local conditions to your mesh. +The Environmental Measurement Plugin will allow you to connect environment sensors to report conditions to your mesh. Examples are temperature, humidity and gas pressure. ## Settings @@ -50,7 +46,7 @@ Enable/Disable the environmental measurement plugin on-device display. ### environmental_measurement_plugin_sensor_pin -Specify the preferred GPIO Pin for sensor readings. +Specify the preferred GPIO Pin for sensor readings. May not be needed if using I2C. ### environmental_measurement_plugin_sensor_type @@ -72,15 +68,32 @@ Interval in seconds of how often we should try to send our measurements to the m values={[ {label: 'CLI', value: 'cli'}, {label: 'Android', value: 'android'}, + {label: 'iOS', value: 'iOS'}, + {label: 'web', value: 'web'}, ]}> - TODO +meshtastic --set environmental_measurement_plugin_measurement_enabled true +meshtastic --set environmental_measurement_plugin_screen_enabled true +meshtastic --set environmental_measurement_plugin_update_interval 15 +meshtastic --set environmental_measurement_plugin_display_farenheit true +meshtastic --set environmental_measurement_plugin_sensor_type 5 +meshtastic --set environmental_measurement_plugin_sensor_type BME280 TODO + + + + TODO + + + + + TODO + From 7ff42f4f6f339f4b1d5c642826eed9504ae225d8 Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Sat, 22 Jan 2022 13:30:22 -0800 Subject: [PATCH 25/25] add quotes around cli commands --- docs/software/settings/environmental-measurment-plugin.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/software/settings/environmental-measurment-plugin.md b/docs/software/settings/environmental-measurment-plugin.md index f37628d9..5803583d 100644 --- a/docs/software/settings/environmental-measurment-plugin.md +++ b/docs/software/settings/environmental-measurment-plugin.md @@ -73,12 +73,14 @@ Interval in seconds of how often we should try to send our measurements to the m ]}> +``` meshtastic --set environmental_measurement_plugin_measurement_enabled true meshtastic --set environmental_measurement_plugin_screen_enabled true meshtastic --set environmental_measurement_plugin_update_interval 15 meshtastic --set environmental_measurement_plugin_display_farenheit true meshtastic --set environmental_measurement_plugin_sensor_type 5 meshtastic --set environmental_measurement_plugin_sensor_type BME280 +```