Meshtastic Home Assistant Integration
A Home Assistant custom integration for Meshtastic mesh networking devices. Extends the upstream Meshtastic HA integration with MQTT as a first-class connection method — allowing you to monitor your entire Meshtastic mesh network without a physical device connected to your Home Assistant host.
Supports dual-mode operation: MQTT and device-based connections can run simultaneously, with nodes automatically merged into a single Home Assistant device.
Features
- MQTT Connection — Subscribe to a Meshtastic MQTT broker and automatically discover all nodes on the mesh (no physical device required)
- Device Connections — Connect directly via TCP, Bluetooth, or Serial (inherited from upstream)
- Dual-Mode Operation — Run MQTT and device-based connections simultaneously
- Automatic Node Discovery — Nodes created as HA devices with comprehensive sensors
- Encrypted Traffic Decoding — AES-CTR decryption of encrypted Meshtastic channels using configurable keys
- Send Messages via MQTT — Text messages, direct messages, and channel broadcasts
- Full Entity Support — Sensors, binary sensors, device trackers, and notify platform per node
- Comprehensive Telemetry — Battery, voltage, signal strength, position, telemetry, environment data
Installation
Option 1: HACS (Recommended)
- Install HACS if you haven’t already
- In HACS: Integrations → three-dot menu → Custom repositories
- Add this repository URL and select “Integration” as the category
- Install the “Meshtastic” integration from HACS
- Restart Home Assistant
- Go to Settings → Devices & Services → Add Integration → Meshtastic
Option 2: Manual Installation
- Copy
custom_components/meshtastic/into your Home Assistantconfig/custom_components/directory - Restart Home Assistant
- Go to Settings → Devices & Services → Add Integration → Meshtastic
MQTT Configuration
When adding the integration, select MQTT as the connection type and provide:
| Setting | Description | Default |
|---|---|---|
| Broker Host | MQTT broker hostname or IP | — |
| Broker Port | MQTT broker port | 1883 |
| Username | MQTT username (optional) | — |
| Password | MQTT password (optional) | — |
| TLS | Enable TLS/SSL encryption | Off |
| Topic Pattern | MQTT topic to subscribe to | msh/US/2/e/# |
| Channel Keys | Channel name → base64 encryption key pairs | LongFast: AQ== |
The default channel key AQ== is the standard Meshtastic encryption key for the LongFast channel.
Entities Per Node
Each discovered Meshtastic node gets a Home Assistant device with:
- Sensors: Battery level, voltage, channel utilization, airtime, uptime, SNR, hops away, role, short/long name
- Environment Sensors: Temperature, humidity, barometric pressure (when reported)
- Device Tracker: GPS position (latitude, longitude, altitude)
- Binary Sensor: Online/offline status
- Notify Service: Send text messages to the node
Services
| Service | MQTT Mode | Device Mode |
|---|---|---|
meshtastic.send_text | ✅ | ✅ |
meshtastic.send_direct_message | ✅ | ✅ |
meshtastic.broadcast_channel_message | ✅ | ✅ |
meshtastic.request_telemetry | ❌ | ✅ |
meshtastic.request_position | ❌ | ✅ |
meshtastic.request_traceroute | ❌ | ✅ |
Request-response services require a direct device connection (not available in MQTT-only mode).
Project Structure
homeassistant-meshtastic/
├── custom_components/meshtastic/ # The HA integration
│ └── aiomeshtastic/ # Async Meshtastic library
│ ├── connection/ # Connection implementations
│ │ ├── mqtt.py
│ │ ├── decoder.py
│ │ ├── errors.py
│ │ ├── listener.py
│ │ └── streaming.py
│ ├── protobuf/ # Meshtastic protobuf definitions
│ ├── interface.py
│ ├── packet.py
│ ├── errors.py
│ └── const.py
├── tests/ # Comprehensive test suite
├── docs/ # Full documentation
│ ├── api/
│ ├── user-guide.md
│ ├── developer-guide.md
│ └── features.md
├── .github/ # CI workflows, templates
├── .vscode/launch.json # Debug configurations
├── Makefile # Dev automation
├── requirements-dev.txt # Dependencies
├── renovate.json # Dependency updates
└── README.md
Development
Prerequisites
- Python 3.12+
Setup
git clone https://github.com/netnutmike/homeassistant-meshtastic.git
cd homeassistant-meshtastic
python -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txt
Commands
make test # Run tests
make lint # Lint code
make lint-fix # Auto-fix
make type-check # Type checking
make verify-setup # Verify prerequisites
Tech Stack
- Home Assistant - Automation platform
- Python 3.12+ - Primary language
- MQTT - Message broker
- Meshtastic Protocol - Mesh networking
- AES-CTR - Encryption/decryption
- asyncio - Async networking
- pytest - Testing
- mypy - Type checking
Status
Production Ready (April 2, 2026)
All major features complete and stable for production use:
- Core MQTT connection fully implemented
- Automatic node discovery and entity creation
- Full message sending capabilities
- Comprehensive telemetry and sensor support
- Encrypted channel support
- Complete test coverage
- Full documentation suite
- HACS integration ready
- CI/CD workflows configured
