Merge pull request #394 from meshtastic/external_notification_fixes

Update commands to use right external_notification prefixes
This commit is contained in:
Garth Vander Houwen 2022-08-31 20:29:44 -07:00 committed by GitHub
commit 9c80f980ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 108 additions and 20 deletions

View file

@ -9,8 +9,6 @@ import TabItem from '@theme/TabItem';
The External Notification Module will allow you to connect a buzzer, speaker, LED, or other device to notify you when a message has been received from the mesh network.
## External Notification Module Config Values
### Enabled
@ -71,40 +69,40 @@ All external noftification module config options are available in the python CLI
| Setting | Acceptable Values | Default |
| :----------------------------: | :----------------------: | :-----: |
| ext_notification.enabled | `true`, `false` | `false` |
| ext_notification.active | `true`, `false` | `false` |
| ext_notification.alert_bell | `true`, `false` | `false` |
| ext_notification.alert_message | `true`, `false` | `false` |
| ext_notification.output | `integer` | `0` |
| ext_notification.output_ms | `integer` (milliseconds) | `0` |
| external_notification.enabled | `true`, `false` | `false` |
| external_notification.active | `true`, `false` | `false` |
| external_notification.alert_bell | `true`, `false` | `false` |
| external_notification.alert_message | `true`, `false` | `false` |
| external_notification.output | `integer` | `0` |
| external_notification.output_ms | `integer` (milliseconds) | `0` |
```shell title="Enable/Disable External Notification Module"
meshtastic --set ext_notification.enabled true
meshtastic --set ext_notification.enabled false
meshtastic --set external_notification.enabled true
meshtastic --set external_notification.enabled false
```
```shell title="Enable/Disable alert on incoming bell"
meshtastic --set ext_notification.alert_bell true
meshtastic --set ext_notification.alert_bell false
meshtastic --set external_notification.alert_bell true
meshtastic --set external_notification.alert_bell false
```
```shell title="Set GPIO active high / low (defalut of false is low)"
meshtastic --set ext_notification.active false
meshtastic --set ext_notification.active true
meshtastic --set external_notification.active false
meshtastic --set external_notification.active true
```
```shell title="Enable/Disable alert on incoming message"
meshtastic --set ext_notification.alert_message true
meshtastic --set ext_notification.alert_message false
meshtastic --set external_notification.alert_message true
meshtastic --set external_notification.alert_message false
```
```shell title="Set GPIO to monitor to 21"
meshtastic --set ext_notification.output 21
meshtastic --set external_notification.output 21
```
```shell title="Set monitored GPIO output duration (default of 0 is 1000ms)"
meshtastic --set ext_notification.output_ms 0
meshtastic --set ext_notification.output_ms 1500
meshtastic --set external_notification.output_ms 0
meshtastic --set external_notification.output_ms 1500
```
</TabItem>
<TabItem value="flasher">

View file

@ -11,6 +11,7 @@ Modules are included in the firmware and allow users to extend the functionality
|:----:|:-----------:|
| [Canned Message](canned-message) | Set a number of predefined messages to send out directly from the device with the use of an input device like a rotary encoder. |
| [External Notification](external-notification) | Incoming messages are able to alert you using circuits you attach to the device (LEDs, Buzzers, etc) |
| [MQTT](mqtt) | Forward packets along to an MQTT server. This allows users on the local mesh to communicate with users on another mesh over the internet. |
| [Range Test](range-test) | Send messages with GPS location at an interval to test the distance your devices can communicate. Requires (at least) one device set up as a sender and one as a receiver. The receiver(s) will log all incoming messages to a CSV. |
| [Serial Module](serial) | Send messages across the mesh by sending strings over a serial port. |
| [Telemetry](telemetry) | Attach sensors to the device and transmit readings on a regular interval to the mesh. |

View file

@ -0,0 +1,89 @@
---
id: mqtt
title: MQTT Module Configuration
sidebar_label: MQTT
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
If your device is connected to WiFi you can enable it to forward packets along to an MQTT server. This allows users on the local mesh to communicate with users on the internet.
The canned message module config options are: Enabled, Server Address, Username, Password and Encryption Enabled. MQTT Module config uses an admin message sending a `ConfigModule.MQTT` protobuf.
## Settings
## MQTT Module Config Values
### Enabled
Enables the MQTT module.
### Server Address
The server to use for MQTT. If not set, the default server public will be used.
### Username
MQTT Server username to use (most useful for a custom MQTT server). If using a custom server, this will be honoured even if empty. If using the default public server, this will only be honoured if set, otherwise the device will use the default username.
### Password
MQTT password to use (most useful for a custom MQTT server). If using a custom server, this will be honoured even if empty. If using the default server, this will only be honoured if set, otherwise the device will use the default password
### Encryption Enabled
Whether to send encrypted or decrypted packets to MQTT. This parameter is only honoured if you also set server (the default official mqtt.meshtastic.org server can handle encrypted packets) Decrypted packets may be useful for external systems that want to consume meshtastic packets.
## MQTT Module Config Client Availability
<Tabs
groupId="settings"
defaultValue="apple"
values={[
{label: 'Android', value: 'android'},
{label: 'Apple', value: 'apple'},
{label: 'CLI', value: 'cli'},
{label: 'Flasher', value: 'flasher'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="android">
:::info
MQTT module config is not available for Android.
:::
</TabItem>
<TabItem value="apple">
:::info
MQTT module config is not available for Apple.
:::
</TabItem>
<TabItem value="cli">
All MQTT module config options are available in the python CLI. Example commands are below:
| Setting | Acceptable Values | Default |
| :--------------------------: | :----------------------: | :-----: |
| mqtt.enabled | `true`, `false` | `false` |
| mqtt.address | `string` | |
| mqtt.username | `string` | |
| mqtt.password | `string` | |
| mqtt.encryption_enabled | `string` | |
```shell title="Enable/Disable MQTT Module"
meshtastic --set mqtt.enabled true
meshtastic --set mqtt.enabled false
```
</TabItem>
<TabItem value="web">
:::info
All MQTT module config options are available for the Web UI.
:::
</TabItem>
</Tabs>

View file

@ -467,4 +467,4 @@ Configuring this setting is not yet available for the selected platform. If this
:::
</TabItem>
</Tabs>
</Tabs>