meshtastic/docs/configuration/module-config/mqtt.mdx

101 lines
3.5 KiB
Plaintext
Raw Normal View History

2022-08-31 20:12:29 -07:00
---
id: mqtt
title: MQTT Module Configuration
2022-11-02 11:46:54 -07:00
slug: /settings/moduleconfig/mqtt
2022-08-31 20:12:29 -07:00
sidebar_label: MQTT
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2022-11-14 06:04:57 -08:00
If your device is connected to Internet via wifi or ethernet, 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. One or more channels must be enabled as uplink and/or downlink for protobufs to be transmitted from and/or to the mesh (See [channels](/docs/settings/config/channels#downlink-enabled)). Without these settings the node will still connect to MQTT server and send status messages.
2022-08-31 20:12:29 -07:00
2022-09-06 12:11:42 -07:00
The MQTT module config options are: Enabled, Server Address, Username, Password, Encryption Enabled and JSON Enabled. MQTT Module config uses an admin message sending a `ConfigModule.MQTT` protobuf.
2022-08-31 20:12:29 -07:00
## 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
2022-11-02 11:46:54 -07:00
MQTT Server username to use (most useful for a custom MQTT server). If using a custom server, this will be honored even if empty. If using the default public server, this will only be honored if set, otherwise the device will use the default username.
2022-08-31 20:12:29 -07:00
### Password
2022-11-02 11:46:54 -07:00
MQTT password to use (most useful for a custom MQTT server). If using a custom server, this will be honored even if empty. If using the default server, this will only be honored if set, otherwise the device will use the default password
2022-08-31 20:12:29 -07:00
### Encryption Enabled
2022-11-02 11:46:54 -07:00
Whether to send encrypted or decrypted packets to MQTT. This parameter is only honored 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.
2022-08-31 20:12:29 -07:00
2022-09-03 14:54:03 -07:00
### JSON Enabled
Enable the sending / consumption of JSON packets on MQTT. These packets are not encrypted, but offer an easy way to integrate with systems that can read JSON.
2022-08-31 20:12:29 -07:00
## 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
2022-12-04 13:30:08 -08:00
MQTT Config options are available for Android.
1. Open the Meshtastic App
2. Navigate to: **Vertical Ellipsis (3 dots top right) > Module Settings > MQTT Config**
2022-08-31 20:12:29 -07:00
:::
</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` | |
2022-09-03 14:54:03 -07:00
| mqtt.json_enabled | `true`, `false` | `false` |
2022-08-31 20:12:29 -07:00
```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>