Control your HomeAssistant from anywhere via packet radio
PacketQTH is a minimal, text-based interface for HomeAssistant designed for use over packet radio. Connect via telnet through your linBPQ node and control your smart home with simple commands, at 1200, or even 300 baud.
PacketQTH v0.1.0
KN4XYZ
Welcome KN4XYZ!
Type H for help
> L
DEVICES (pg 1/1)
1.LT Kitchen [ON]
2.LT Bedroom [--]
3.SW Garage [ON]
4.SN Temp 72F
N:
> OFF 1
TOTP Code: 123456
OK: Kitchen Light turned off
> H
COMMANDS
L [pg] List devices
S <id> Show device
ON <id> Turn on
OFF <id> Turn off
SET <id> <val> Set value
A [pg] List automations
T <id> Trigger automation
H Help (this menu)
Q Quit
* Write operations (ON/OFF/SET/T) require fresh TOTP code
- π Enhanced Security - TOTP code required for every write operation (not just login)
- π‘οΈ Natural Rate Limiting - Write operations limited to 30-second intervals by TOTP window
- π‘ Ultra Low Bandwidth - Optimized for 1200 baud packet radio connections
- β‘ Simple Commands - Single-letter shortcuts for fast operation
- π Full HA Control - Lights, switches, sensors, blinds, and automations
- π³ Containerized - Docker deployment with security hardening
- π Brute Force Protection - 5 attempts trigger 5-minute lockout
- π± Standard TOTP - Works with Google Authenticator, Authy, password managers, etc.
Packet radio provides reliable communication when internet and cellular networks fail. With PacketQTH, you can:
- Meet part 97 requirements for automatic operation using relays managed by HomeAssistant without depending on the internet
- Access home automation from remote locations without internet
- Monitor your station's power usage with HomeAssistant-connected sensors over the air
- Demonstrate practical applications of packet radio technology
- HomeAssistant instance with API access
- Docker or Podman
- A linBPQ node (for packet radio use; telnet works directly for testing)
git clone https://github.com/ben-kuhn/packetqth.git
cd packetqthThe wizard generates config.yaml, .env, users.yaml, and docker-compose.generated.yml in one interactive session. It connects to your HomeAssistant to test the connection and lets you select which entities to expose.
# Podman (rootless):
podman run --rm -it \
--userns=keep-id \
-v $(pwd):/config \
ghcr.io/ben-kuhn/packetqth-tools:latest \
python tools/configure.py --config /config/config.yaml --env /config/.env --users /config/users.yaml
# Docker:
docker run --rm -it \
--user $(id -u):$(id -g) \
-v $(pwd):/config \
ghcr.io/ben-kuhn/packetqth-tools:latest \
python tools/configure.py --config /config/config.yaml --env /config/.env --users /config/users.yamlDuring setup you will be shown a QR code β scan it with your authenticator app (Google Authenticator, Authy, etc.) before closing the wizard.
Prefer to configure manually? See docs/MANUAL_SETUP.md.
# Use the generated compose file, or rename it:
cp docker-compose.generated.yml docker-compose.yml
docker compose up -d
docker compose logs -fAdd to your bpq32.cfg:
In the telnet port definition, add PacketQTH's port to CMDPORT:
CMDPORT 8023
In the main section with other APPLICATION lines:
APPLICATION 4,PQTH,C 1 HOST 0 S
Configuration explained:
CMDPORT 8023β defines HOST 0 as port 8023 (add more ports separated by spaces for additional hosts)APPLICATION 4,PQTHβ application index 4, named "PQTH" (indexes 1-3 are often used by built-in services)C 1β connect telnet port 1 to this application (adjust to match your telnet port number)HOST 0β connect to the first CMDPORT entry (index 0 = port 8023)Sβ return to node on disconnect
Users connect by typing PQTH.
telnet localhost 8023L [pg] List devices (paginated)
S <id> Show device status
ON <id> Turn device on
OFF <id> Turn device off
SET <id> <val> Set device value (brightness, position, etc.)
A [pg] List automations
T <id> Trigger automation
H Help
Q Quit
Write operations (ON/OFF/SET/T) require a fresh TOTP code. Read operations (L/S/A/H) execute immediately.
| Code | Type |
|---|---|
LT |
Light |
SW |
Switch |
SN |
Sensor |
BL |
Blind/Cover |
linBPQ Node β Telnet Server β Session Manager β TOTP Auth
β
Command Parser
β
HomeAssistant API Client
β
Entity Cache
β
Text Formatter
See ARCHITECTURE.md for detailed design documentation.
PacketQTH is designed for security over cleartext radio:
- β No password transmission - Uses TOTP one-time codes
- β TOTP-per-write - Fresh code required for every state change
- β Natural rate limiting - 30-second intervals enforced by TOTP window
- β Authentication rate limiting - Failed attempts trigger lockout
- β Session timeout - Configurable inactivity timeout
- β Container isolation - Dropped capabilities, read-only filesystem
- β Audit logging - Authentication and write attempts logged
Packet radio in amateur bands (USA) prohibits encryption of message content. TOTP provides authentication without encrypting the communication, making it legal for amateur radio use.
packetqth/
βββ auth/ # TOTP authentication
βββ server/ # Telnet server and session management
βββ commands/ # Command parsing and handlers
βββ homeassistant/ # HomeAssistant API client
βββ formatting/ # Text output formatting
βββ tools/ # Setup scripts and utilities
βββ docs/ # Documentation
.venv/bin/pytestdocker build -t packetqth:latest .Contributions welcome! Areas of interest:
- Additional entity types (climate, media players, etc.)
- Command macros/scripting
- Status monitoring/polling for live updates
- Documentation improvements
- Testing and bug fixes
Please open an issue first to discuss major changes.
Completed:
- Telnet server, command parser, HomeAssistant API client
- TOTP authentication with rate limiting and per-write codes
- Entity caching and text formatter with pagination
- LinBPQ compatibility (BPQ mode)
- Multi-platform Docker images (amd64, arm64, armv7)
- Interactive setup wizard
- Security hardening
- Script support
Planned:
- Command macros for custom shortcuts
- Scene support
- Climate support
GNU General Public License v3.0 or later β see LICENSE.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: ku0hn@ku0hn.radio
Built for the amateur radio and home automation communities. Special thanks to:
- The HomeAssistant team for their excellent API
- John G8BPQ for linBPQ
- The packet radio community keeping the mode alive
73 de PacketQTH π‘π
Control your QTH from anywhere on the airwaves