meshtastic/docs/software/settings/canned-message-plugin.md

83 lines
2.9 KiB
Markdown
Raw Normal View History

2022-01-18 14:27:59 -08:00
---
2022-01-28 10:02:39 -08:00
id: canned-message-plugin
title: Canned Message Plugin
sidebar_label: Canned Message Plugin
2022-01-18 14:27:59 -08:00
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<!--- TODO add link to hardware setup to admonition--->
:::note
This plugin requires attaching a peripheral accessory to your device. It will not work without one.
:::
2022-01-18 14:27:59 -08:00
## Overview
2022-01-26 14:10:09 -08:00
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.
2022-01-18 14:27:59 -08:00
2022-01-28 10:04:46 -08:00
Please also follow settings of the [Rotary Encoder Plugin](rotary-encoder-plugin) to configure input source!
2022-01-18 14:27:59 -08:00
2022-01-28 10:11:19 -08:00
:::tip
2022-01-27 20:32:18 -08:00
Once plugin settings are changed, a **reset** is required for them to take effect.
:::
2022-01-18 14:27:59 -08:00
## Settings
| Setting | Acceptable Values | Default |
| :-----: | :---------------: | :-----: |
| canned_message_plugin_enabled | `true`, `false` | `false` |
2022-01-27 22:34:48 -08:00
| canned_message_plugin_allow_input_source | `rotEnc1`, `_any` | `_any` |
| canned_message_plugin_messages | `string` | `""` |
2022-01-18 14:27:59 -08:00
| canned_message_plugin_send_bell | `true`, `false` | `false` |
### canned_message_plugin_enabled
Enables the plugin.
### canned_message_plugin_allow_input_source
2022-01-28 09:45:37 -08:00
Input event source accepted by the canned message plugin.
2022-01-18 14:27:59 -08:00
| Value | Description |
| :---: | :---------: |
2022-01-28 09:45:37 -08:00
| `_any` | Default. Allows any peripheral input device connected to the device. |
| `rotEnc1` | Hardcoded value naming the input device that this plugin listens to. This could allow multiple input devices to be named with future software development. At present, this doesn't do anything differently than the default setting. |
2022-01-27 20:43:53 -08:00
2022-01-18 14:27:59 -08:00
### canned_message_plugin_messages
2022-01-27 20:43:13 -08:00
Predefined messages for CannedMessagePlugin separated by `|` characters.
2022-01-18 14:27:59 -08:00
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.
2022-01-27 22:36:16 -08:00
The [External Notification Plugin](external-notification-plugin) can benefit from this feature as it utilizes the bell character.
2022-01-18 14:27:59 -08:00
## Details
2022-01-28 10:53:46 -08:00
### Prerequisites
<!--- TODO add link to hardware pages to first bullet point --->
- Attach a compatible peripheral device. Take note of the GPIO numbers you use, as they will be used in the following step.
- Once attached, configure peripheral device with [Rotary Encoder Plugin Settings](rotary-encoder-plugin).
:::note
Replace `GPIO` below with the GPIO numbers from hardware setup.
```bash title="Canned Message Plugin - Required Rotary Encoder Plugin Settings"
meshtastic --set rotary1_pin_a GPIO
meshtastic --set rotary1_pin_b GPIO
meshtastic --set rotary1_pin_press GPIO
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
```
:::
That's it! With a functioning and enabled rotary encoder, you're ready to begin configuring the Canned Message Plugin.
2022-01-18 14:27:59 -08:00
## Examples
2022-01-26 14:10:09 -08:00
See "Software / Plugins / Canned messages" for examples!