meshtastic/docs/settings/moduleconfig/external-notification.mdx
2022-07-14 22:29:59 -07:00

161 lines
4.9 KiB
Plaintext

---
id: external-notification
title: External Notification Module Configuration
sidebar_label: External Notification
---
import Tabs from '@theme/Tabs';
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
Enables the external notification module.
### Alert when receiving a bell
Specifies if an alert should be triggered when receiving an incoming bell.
### Alert when receiving a message
Specifies if an alert should be triggered when receiving an incoming message.
### Active
Specifies whether the external circuit is triggered when the device's GPIO is low or high.
### GPIO to monitor
Specifies the GPIO that your external circuit is attached to on the device.
### How long monitored GPIO is triggered
Specifies how long in milliseconds you would like your external circuit to be triggered.
Default of 0 is 1000ms
## External Notification Module Config Client Availability
<Tabs
groupId="settings"
defaultValue="flasher"
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
External notification module config is not available for Android.
:::
</TabItem>
<TabItem value="apple">
:::info
All external notification module config options are available on iOS, iPadOS and macOS at Settings > Modules > External Notification.
:::
</TabItem>
<TabItem value="cli">
All external noftification module config options are available in the python CLI. Example commands are below:
| Setting | Acceptable Values | Default |
| :-----------------------------------: | :----------------------: | :-----: |
| ext_notification_module_enabled | `true`, `false` | `false` |
| ext_notification_module_active | `true`, `false` | `false` |
| ext_notification_module_alert_bell | `true`, `false` | `false` |
| ext_notification_module_alert_message | `true`, `false` | `false` |
| ext_notification_module_output | `integer` | `0` |
| ext_notification_module_output_ms | `integer` (milliseconds) | `0` |
```shell title="Enable/Disable External Notification Module"
meshtastic --set ext_notification_module_enabled true
meshtastic --set ext_notification_module_enabled false
```
```shell title="Enable/Disable alert on incoming bell"
meshtastic --set ext_notification_module_alert_bell true
meshtastic --set ext_notification_module_alert_bell false
```
```shell title="Set GPIO active high / low (defalut of false is low)"
meshtastic --set ext_notification_module_active false
meshtastic --set ext_notification_module_active true
```
```shell title="Enable/Disable alert on incoming message"
meshtastic --set ext_notification_module_alert_message true
meshtastic --set ext_notification_module_alert_message false
```
```shell title="Set GPIO to monitor to 21"
meshtastic --set ext_notification_module_output 21
```
```shell title="Set monitored GPIO output duration (default of 0 is 1000ms)"
meshtastic --set ext_notification_module_output_ms 0
meshtastic --set ext_notification_module_output_ms 1500
```
</TabItem>
<TabItem value="flasher">
:::info
External Notification module config is not available in the Flasher.
:::
</TabItem>
<TabItem value="web">
:::info
External Notification module config is not available for the Web UI.
:::
</TabItem>
</Tabs>
:::warning
GPIO access is fundamentally dangerous because invalid options can physically damage or destroy your hardware. Ensure that you fully understand the schematic for your particular device before trying this as we do not offer a warranty. Use at your own risk.
This module requires attaching a peripheral accessory to your device. It will not work without one.
:::
## Examples
### Alert Types
We support being alerted on two events:
1. Incoming Text Message
2. Incoming Text Message that contains the ASCII bell character. At present, only the Python API can send an ASCII bell character, but more support may be added in the future.
:::info
The bell character is ASCII 0x07. Include 0x07 anywhere in the text message and with ext_notification_module_alert_bell enabled, we will issue an external notification.
:::
## External Hardware
Be mindful of the max current sink and source of the ESP32 GPIO. The easiest devices to interface with would be either an LED or Active Buzzer.
Ideas for external hardware:
- LED
- Active Buzzer
- Flame thrower
- Strobe Light
- Siren
## Known Problems
- This won't directly support a passive (normal) speaker as it does not generate any audio wave forms.
- This module only monitors text messages. We won't trigger on any other packet types.