docs: comprehensive documentation update for v2 features
Update all documentation to reflect features added since last doc update: - README: new features list, gallery screenshots, development status - User Guide: global search, console commands, device dashboard, settings, system log, backup, updated DM and contact management sections - Architecture: complete API reference, WebSocket namespaces, updated project structure and database tables - Troubleshooting: remove v1 bridge references, add UI-based backup, system log references - Gallery: add 4 new screenshots (search, filtering, settings, system log), update 12 existing screenshots Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
54
README.md
@@ -7,7 +7,7 @@ A lightweight web interface providing browser-based access to MeshCore mesh netw
|
||||
|
||||
## Overview
|
||||
|
||||
**mc-webui** is a Flask-based web application that wraps `meshcore-cli`, eliminating the need for SSH/terminal access when using MeshCore chat on a LoRa device connected to a Debian VM via USB, BLE, or TCP. Tested on Heltec V3 and Heltec V4.
|
||||
**mc-webui** is a Flask-based web application providing browser-based access to MeshCore mesh network. It communicates directly with your LoRa device (via USB, BLE, or TCP) using the `meshcore` Python library, eliminating the need for SSH/terminal access. Tested on Heltec V3 and Heltec V4.
|
||||
|
||||

|
||||
|
||||
@@ -15,17 +15,23 @@ A lightweight web interface providing browser-based access to MeshCore mesh netw
|
||||
|
||||
- **Mobile-first design** - Responsive UI optimized for small screens
|
||||
- **Channel management** - Create, join, share (QR code), and switch between encrypted channels
|
||||
- **Direct Messages (DM)** - Private messaging with delivery status tracking
|
||||
- **Direct Messages (DM)** - Private messaging with searchable contact selector, delivery tracking, and configurable retry strategy
|
||||
- **Smart notifications** - Unread message counters per channel with cross-device sync
|
||||
- **Contact management** - Manual approval mode, filtering, protection, ignoring, blocking, and cleanup tools
|
||||
- **Contact management** - Manual approval mode, filtering, protection, ignoring, blocking, batch operations, and cleanup tools
|
||||
- **Global search** - Full-text search across all messages (channels and DMs) with FTS5 backend
|
||||
- **Database** - Fast and reliable SQLite storage for messages, contacts, and configurations
|
||||
- **Contact map** - View contacts with GPS coordinates on OpenStreetMap (Leaflet)
|
||||
- **Contact map** - View contacts and own device on OpenStreetMap (Leaflet) with last seen info
|
||||
- **Message archives** - Automatic daily archiving with browse-by-date selector
|
||||
- **Interactive Console** - Direct meshcli command execution via WebSocket
|
||||
- **Interactive Console** - Full MeshCore command suite via WebSocket — repeater, contact, device, and channel management
|
||||
- **Device dashboard** - Device info and statistics with firmware details
|
||||
- **Settings** - Configurable DM retry parameters, message retention, and quote length
|
||||
- **System Log** - Real-time log viewer with streaming
|
||||
- **Database backup** - Create, list, and download database backups from the UI
|
||||
- **@Mentions autocomplete** - Type @ to see contact suggestions with fuzzy search
|
||||
- **Echo tracking** - "Heard X repeats" with repeater IDs for sent messages, all route paths for incoming messages with deterministic payload matching (persisted across restarts)
|
||||
- **MeshCore Analyzer** - View packet details on analyzer.letsmesh.net directly from channel messages
|
||||
- **DM delivery tracking** - ACK-based delivery confirmation with SNR and route info
|
||||
- **Multi-device support** - Database file named after device for easy multi-device setups
|
||||
- **PWA support** - Browser notifications and installable app (experimental)
|
||||
- **Full offline support** - Works without internet (local Bootstrap, icons, emoji picker)
|
||||
|
||||
@@ -99,7 +105,7 @@ For detailed feature documentation, see the [User Guide](docs/user-guide.md).
|
||||
|
||||
This will:
|
||||
- Download base images (Python, Alpine Linux)
|
||||
- Install meshcore-cli inside containers
|
||||
- Install the `meshcore` Python library
|
||||
- Create `./data/` directory structure automatically
|
||||
- Start the mc-webui container
|
||||
|
||||
@@ -108,7 +114,7 @@ For detailed feature documentation, see the [User Guide](docs/user-guide.md).
|
||||
docker compose ps
|
||||
```
|
||||
|
||||
Both containers should show `Up` status. Check logs if needed:
|
||||
The container should show `Up` status. Check logs if needed:
|
||||
```bash
|
||||
docker compose logs -f
|
||||
```
|
||||
@@ -136,7 +142,9 @@ For detailed feature documentation, see the [User Guide](docs/user-guide.md).
|
||||
3. **Switch channels** - Use the dropdown in navbar
|
||||
4. **Direct Messages** - Access via menu (☰) → "Direct Messages"
|
||||
5. **Manage contacts** - Access via menu (☰) → "Contact Management"
|
||||
6. **Console** - Access via menu (☰) → "Console" for direct meshcli commands
|
||||
6. **Console** - Access via menu (☰) → "Console" for MeshCore commands
|
||||
7. **Search** - Access via menu (☰) → "Search" for full-text message search
|
||||
8. **Settings** - Access via menu (☰) → "Settings" for DM retry and other configuration
|
||||
|
||||
For complete usage instructions, see the [User Guide](docs/user-guide.md).
|
||||
|
||||
@@ -266,6 +274,12 @@ sudo ~/mc-webui/scripts/updater/install.sh --uninstall
|
||||
<td align="center"><a href="gallery/approve_contact.png"><img src="gallery/approve_contact.png" width="150"><br>Approve Contact</a></td>
|
||||
<td align="center"><a href="gallery/channel_management.png"><img src="gallery/channel_management.png" width="150"><br>Channel Management</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="gallery/global_search.png"><img src="gallery/global_search.png" width="150"><br>Global Search</a></td>
|
||||
<td align="center"><a href="gallery/message_filtering.png"><img src="gallery/message_filtering.png" width="150"><br>Message Filtering</a></td>
|
||||
<td align="center"><a href="gallery/DM_Settings.png"><img src="gallery/DM_Settings.png" width="150"><br>Settings</a></td>
|
||||
<td align="center"><a href="gallery/sytem_log.png"><img src="gallery/sytem_log.png" width="150"><br>System Log</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="gallery/map.png"><img src="gallery/map.png" width="150"><br>Map</a></td>
|
||||
<td align="center"><a href="gallery/map_individual.png"><img src="gallery/map_individual.png" width="150"><br>Map (Individual)</a></td>
|
||||
@@ -292,33 +306,37 @@ sudo ~/mc-webui/scripts/updater/install.sh --uninstall
|
||||
|
||||
### Completed Features
|
||||
|
||||
- [x] Environment Setup & Docker Architecture
|
||||
- [x] Backend Basics (REST API, message parsing, CLI wrapper)
|
||||
- [x] Frontend Chat View (Bootstrap UI, message display)
|
||||
- [x] Message Sending (Send form, reply functionality)
|
||||
- [x] Environment Setup & Docker Architecture (single-container, direct device access)
|
||||
- [x] Backend Basics (REST API, SQLite database, meshcore library integration)
|
||||
- [x] Frontend Chat View (Bootstrap UI, message display, quote/reply)
|
||||
- [x] Message Sending (Send form, reply, quote with configurable length)
|
||||
- [x] Intelligent Auto-refresh (10s checks, UI updates only when needed)
|
||||
- [x] Contact Management (Cleanup modal with configurable threshold)
|
||||
- [x] Contact Management (Approval, filtering, protection, ignore/block, batch operations, cleanup)
|
||||
- [x] Channel Management (Create, join, share via QR, delete with auto-cleanup)
|
||||
- [x] Public Channels (# prefix support, auto-key generation)
|
||||
- [x] Message Archiving (Daily archiving with browse-by-date selector)
|
||||
- [x] Smart Notifications (Unread counters per channel and total)
|
||||
- [x] Direct Messages (DM) - Private messaging with delivery status tracking
|
||||
- [x] Advanced Contact Management - Multi-page interface with sorting, filtering
|
||||
- [x] Direct Messages (DM) - Searchable contact selector, delivery tracking, configurable retry
|
||||
- [x] Global Message Search - Full-text search across channels and DMs (FTS5)
|
||||
- [x] Message Content Enhancements - Mention badges, clickable URLs, image previews
|
||||
- [x] @Mentions Autocomplete - Type @ to get contact suggestions with fuzzy search
|
||||
- [x] PWA Notifications (Experimental) - Browser notifications and app badge counters
|
||||
- [x] Full Offline Support - Local Bootstrap libraries and Service Worker caching
|
||||
- [x] Interactive Console - Direct MeshCore commands access via WebSocket with command history
|
||||
- [x] Contact Map - View contacts with GPS coordinates on OpenStreetMap (Leaflet)
|
||||
- [x] Interactive Console - Full MeshCore command suite (repeater, contact, device, channel management)
|
||||
- [x] Contact Map - View contacts and own device on OpenStreetMap (Leaflet)
|
||||
- [x] Echo Tracking - "Heard X repeats" badge for sent channel messages
|
||||
- [x] MeshCore Analyzer - Packet analysis links on channel messages (analyzer.letsmesh.net)
|
||||
- [x] DM Delivery Tracking - ACK-based delivery checkmarks with SNR/route details
|
||||
- [x] Device Dashboard - Device info and statistics with firmware details
|
||||
- [x] Settings Modal - Configurable DM retry parameters and message retention
|
||||
- [x] System Log - Real-time log viewer with streaming
|
||||
- [x] Database Backup - Create, list, and download backups from the UI
|
||||
- [x] Multi-device Support - Database file named after device name
|
||||
|
||||
### Next Steps
|
||||
|
||||
- [ ] Performance Optimization - Frontend and backend improvements
|
||||
- [ ] Enhanced Testing - Unit and integration tests
|
||||
- [ ] Documentation Polish - API docs and usage guides
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ Technical documentation for mc-webui, covering system architecture, project stru
|
||||
- [Project Structure](#project-structure)
|
||||
- [Database Architecture](#database-architecture)
|
||||
- [API Reference](#api-reference)
|
||||
- [WebSocket API](#websocket-api)
|
||||
- [Offline Support](#offline-support)
|
||||
|
||||
---
|
||||
@@ -75,11 +76,13 @@ mc-webui/
|
||||
├── docker-compose.yml # Single-container orchestration
|
||||
├── app/
|
||||
│ ├── __init__.py
|
||||
│ ├── main.py # Flask entry point + Socket.IO
|
||||
│ ├── main.py # Flask entry point + Socket.IO handlers
|
||||
│ ├── config.py # Configuration from env vars
|
||||
│ ├── database.py # SQLite database models and CRUD operations
|
||||
│ ├── device_manager.py # Core logic for meshcore communication
|
||||
│ ├── contacts_cache.py # Persistent contacts cache
|
||||
│ ├── read_status.py # Server-side read status manager
|
||||
│ ├── version.py # Git-based version management
|
||||
│ ├── migrate_v1.py # Migration script from v1 flat files to v2 SQLite
|
||||
│ ├── meshcore/
|
||||
│ │ ├── __init__.py
|
||||
@@ -94,7 +97,7 @@ mc-webui/
|
||||
│ ├── static/ # Frontend assets (CSS, JS, images, vendors)
|
||||
│ └── templates/ # HTML templates
|
||||
├── docs/ # Documentation
|
||||
├── scripts/ # Utility scripts (update, watchdog, etc.)
|
||||
├── scripts/ # Utility scripts (update, watchdog, updater)
|
||||
└── README.md
|
||||
```
|
||||
|
||||
@@ -107,45 +110,151 @@ mc-webui v2 uses a robust **SQLite Database** with WAL (Write-Ahead Logging) ena
|
||||
Location: `./data/meshcore/<device_name>.db`
|
||||
|
||||
Key tables:
|
||||
- `messages` - All channel and direct messages
|
||||
- `messages` - All channel and direct messages (with FTS5 index for full-text search)
|
||||
- `contacts` - Contact list with sync status, types, block/ignore flags
|
||||
- `channels` - Channel configuration and keys
|
||||
- `echoes` - Sent message tracking and repeater paths
|
||||
- `acks` - DM delivery status
|
||||
- `settings` - Application settings (migrated from .webui_settings.json)
|
||||
|
||||
The use of SQLite allows for fast queries, reliable data storage, and complex filtering (such as contact ignoring/blocking) without the risk of file corruption inherent to flat JSON files.
|
||||
The use of SQLite allows for fast queries, reliable data storage, full-text search, and complex filtering (such as contact ignoring/blocking) without the risk of file corruption inherent to flat JSON files.
|
||||
|
||||
---
|
||||
|
||||
## API Reference
|
||||
|
||||
### Main Web UI Endpoints
|
||||
### Messages
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| GET | `/api/messages` | List messages (supports `?archive_date`, `?days`, `?channel_idx`) |
|
||||
| GET | `/api/messages` | List messages (`?archive_date`, `?days`, `?channel_idx`) |
|
||||
| POST | `/api/messages` | Send message (`{text, channel_idx, reply_to?}`) |
|
||||
| GET | `/api/messages/updates` | Check for new messages (smart refresh) |
|
||||
| GET | `/api/status` | Connection status |
|
||||
| GET | `/api/messages/<id>/meta` | Get message metadata (echoes, paths) |
|
||||
| GET | `/api/messages/search` | Full-text search (`?q=`, `?channel_idx=`, `?limit=`) |
|
||||
|
||||
### Contacts
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| GET | `/api/contacts` | List contacts |
|
||||
| GET | `/api/contacts/detailed` | Full contact data |
|
||||
| POST | `/api/contacts/delete` | Soft-delete contact by name |
|
||||
| POST | `/api/contacts/update` | Update contact properties (ignore, block) |
|
||||
| GET | `/api/contacts/detailed` | Full contact data (includes protection, ignore, block flags) |
|
||||
| GET | `/api/contacts/cached` | Get cached contacts (superset of device contacts) |
|
||||
| POST | `/api/contacts/delete` | Soft-delete contact (`{selector}`) |
|
||||
| POST | `/api/contacts/cached/delete` | Delete cached contact |
|
||||
| GET | `/api/contacts/protected` | List protected public keys |
|
||||
| POST | `/api/contacts/<key>/protect` | Toggle contact protection |
|
||||
| POST | `/api/contacts/<key>/ignore` | Toggle contact ignore |
|
||||
| POST | `/api/contacts/<key>/block` | Toggle contact block |
|
||||
| GET | `/api/contacts/blocked-names` | Get blocked names count |
|
||||
| POST | `/api/contacts/block-name` | Block a name pattern |
|
||||
| GET | `/api/contacts/blocked-names-list` | List blocked name patterns |
|
||||
| POST | `/api/contacts/preview-cleanup` | Preview cleanup criteria |
|
||||
| POST | `/api/contacts/cleanup` | Remove contacts by filter |
|
||||
| GET | `/api/contacts/cleanup-settings` | Get auto-cleanup settings |
|
||||
| POST | `/api/contacts/cleanup-settings` | Update auto-cleanup settings |
|
||||
| GET | `/api/contacts/pending` | Pending contacts (`?types=1&types=2`) |
|
||||
| POST | `/api/contacts/pending/approve` | Approve pending contact |
|
||||
| POST | `/api/contacts/pending/reject` | Reject pending contact |
|
||||
| POST | `/api/contacts/pending/clear` | Clear all pending contacts |
|
||||
|
||||
### Channels
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| GET | `/api/channels` | List all channels |
|
||||
| POST | `/api/channels` | Create new channel |
|
||||
| POST | `/api/channels/join` | Join existing channel |
|
||||
| DELETE | `/api/channels/<index>` | Remove channel |
|
||||
| GET | `/api/dm/conversations` | List DM conversations |
|
||||
| GET | `/api/dm/messages` | Get messages for conversation |
|
||||
| POST | `/api/dm/messages` | Send DM |
|
||||
| GET | `/api/device/info` | Device information |
|
||||
| GET | `/api/read_status` | Get server-side read status |
|
||||
| GET | `/api/channels/<index>/qr` | QR code (`?format=json\|png`) |
|
||||
| GET | `/api/channels/muted` | Get muted channels |
|
||||
| POST | `/api/channels/<index>/mute` | Toggle channel mute |
|
||||
|
||||
### WebSocket API (Console)
|
||||
### Direct Messages
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| GET | `/api/dm/conversations` | List DM conversations |
|
||||
| GET | `/api/dm/messages` | Get messages (`?conversation_id=`, `?limit=`) |
|
||||
| POST | `/api/dm/messages` | Send DM (`{recipient, text}`) |
|
||||
| GET | `/api/dm/updates` | Check for new DMs |
|
||||
| GET | `/api/dm/auto_retry` | Get DM retry configuration |
|
||||
| POST | `/api/dm/auto_retry` | Update DM retry configuration |
|
||||
|
||||
### Device & Settings
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| GET | `/api/status` | Connection status (device name, serial port) |
|
||||
| GET | `/api/device/info` | Device information |
|
||||
| GET | `/api/device/stats` | Device statistics |
|
||||
| GET | `/api/device/settings` | Get device settings |
|
||||
| POST | `/api/device/settings` | Update device settings |
|
||||
| POST | `/api/device/command` | Execute command (advert, floodadv) |
|
||||
| GET | `/api/device/commands` | List available special commands |
|
||||
| GET | `/api/chat/settings` | Get chat settings (quote length) |
|
||||
| POST | `/api/chat/settings` | Update chat settings |
|
||||
| GET | `/api/retention-settings` | Get message retention settings |
|
||||
| POST | `/api/retention-settings` | Update retention settings |
|
||||
|
||||
### Archives & Backup
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| GET | `/api/archives` | List archives |
|
||||
| POST | `/api/archive/trigger` | Manual archive |
|
||||
| GET | `/api/backup/list` | List database backups |
|
||||
| POST | `/api/backup/create` | Create database backup |
|
||||
| GET | `/api/backup/download` | Download backup file |
|
||||
|
||||
### Other
|
||||
|
||||
| Method | Endpoint | Description |
|
||||
|--------|----------|-------------|
|
||||
| GET | `/api/read_status` | Get server-side read status |
|
||||
| POST | `/api/read_status/mark_read` | Mark messages as read |
|
||||
| POST | `/api/read_status/mark_all_read` | Mark all messages as read |
|
||||
| GET | `/api/version` | Get app version |
|
||||
| GET | `/api/check-update` | Check for available updates |
|
||||
| GET | `/api/updater/status` | Get updater service status |
|
||||
| POST | `/api/updater/trigger` | Trigger remote update |
|
||||
| GET | `/api/advertisements` | Get recent advertisements |
|
||||
| GET | `/api/console/history` | Get console command history |
|
||||
| POST | `/api/console/history` | Save console command |
|
||||
| DELETE | `/api/console/history` | Clear console history |
|
||||
| GET | `/api/logs` | Get application logs |
|
||||
|
||||
---
|
||||
|
||||
## WebSocket API
|
||||
|
||||
### Console Namespace (`/console`)
|
||||
|
||||
Interactive console via Socket.IO WebSocket connection.
|
||||
|
||||
**Namespace:** `/console`
|
||||
**Client → Server:**
|
||||
- `send_command` - Execute command (`{command: "infos"}`)
|
||||
|
||||
**Server → Client:**
|
||||
- `console_status` - Connection status
|
||||
- `command_response` - Command result (`{success, command, output}`)
|
||||
|
||||
### Chat Namespace (`/chat`)
|
||||
|
||||
Real-time message delivery via Socket.IO.
|
||||
|
||||
**Server → Client:**
|
||||
- `new_channel_message` - New channel message received
|
||||
- `new_dm_message` - New DM received
|
||||
- `message_echo` - Echo/ACK update for sent message
|
||||
- `dm_ack` - DM delivery confirmation
|
||||
|
||||
### Logs Namespace (`/logs`)
|
||||
|
||||
Real-time log streaming via Socket.IO.
|
||||
|
||||
**Server → Client:**
|
||||
- `log_line` - New log line
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@ Common issues and solutions for mc-webui.
|
||||
## Table of Contents
|
||||
|
||||
- [Common Issues](#common-issues)
|
||||
- [Device Not Responding](#device-not-responding-bridge-crash-loop)
|
||||
- [Device Not Responding](#device-not-responding)
|
||||
- [Docker Commands](#docker-commands)
|
||||
- [Testing Bridge API](#testing-bridge-api)
|
||||
- [Backup and Restore](#backup-and-restore)
|
||||
- [Next Steps](#next-steps)
|
||||
- [Getting Help](#getting-help)
|
||||
@@ -20,8 +19,7 @@ Common issues and solutions for mc-webui.
|
||||
|
||||
**Check logs:**
|
||||
```bash
|
||||
docker compose logs meshcore-bridge
|
||||
docker compose logs mc-webui
|
||||
docker compose logs -f mc-webui
|
||||
```
|
||||
|
||||
**Common causes:**
|
||||
@@ -53,18 +51,19 @@ docker compose ps
|
||||
|
||||
### No messages appearing
|
||||
|
||||
**Verify meshcli is working:**
|
||||
**Check device connection:**
|
||||
```bash
|
||||
# Test meshcli directly in bridge container
|
||||
docker compose exec meshcore-bridge meshcli -s /dev/ttyUSB0 infos
|
||||
# Check container logs for device communication
|
||||
docker compose logs -f mc-webui
|
||||
```
|
||||
|
||||
**Check .msgs file:**
|
||||
**Check database:**
|
||||
```bash
|
||||
docker compose exec mc-webui cat /root/.config/meshcore/YourDeviceName.msgs
|
||||
# Verify the database file exists
|
||||
ls -la data/meshcore/*.db
|
||||
```
|
||||
|
||||
Replace `YourDeviceName` with your `MC_DEVICE_NAME`.
|
||||
**Check System Log in the web UI** (Menu → System Log) for real-time device event information.
|
||||
|
||||
---
|
||||
|
||||
@@ -87,9 +86,9 @@ sudo chmod 666 /dev/serial/by-id/usb-Espressif*
|
||||
ls -l /dev/serial/by-id/
|
||||
```
|
||||
|
||||
**Restart bridge container:**
|
||||
**Restart container:**
|
||||
```bash
|
||||
docker compose restart meshcore-bridge
|
||||
docker compose restart mc-webui
|
||||
```
|
||||
|
||||
**Check device permissions:**
|
||||
@@ -101,32 +100,15 @@ Should show `crw-rw----` with group `dialout`.
|
||||
|
||||
---
|
||||
|
||||
### USB Communication Issues
|
||||
|
||||
The 2-container architecture resolves common USB timeout/deadlock problems:
|
||||
|
||||
- **meshcore-bridge** has exclusive USB access
|
||||
- **mc-webui** uses HTTP (no direct device access)
|
||||
- Restarting `mc-webui` **does not** affect USB connection
|
||||
- If bridge has USB issues, restart only that service:
|
||||
```bash
|
||||
docker compose restart meshcore-bridge
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Device not responding (bridge crash-loop)
|
||||
### Device not responding
|
||||
|
||||
**Symptoms:**
|
||||
- `meshcore-bridge` container shows `unhealthy` status
|
||||
- Bridge logs show repeated `no_event_received` errors and restarts:
|
||||
- Container logs show repeated `no_event_received` errors and restarts:
|
||||
```
|
||||
ERROR:meshcore:Error while querying device: Event(type=<EventType.ERROR: 'command_error'>, payload={'reason': 'no_event_received'})
|
||||
meshcli process died (exit code: 0)
|
||||
Attempting to restart meshcli session...
|
||||
```
|
||||
- Device name not detected, falls back to `auto.msgs` (file not found)
|
||||
- All commands (`infos`, `contacts`, etc.) time out
|
||||
- Device name not detected (auto-detection fails)
|
||||
- All commands timeout in the Console
|
||||
|
||||
**What this means:**
|
||||
|
||||
@@ -148,44 +130,15 @@ This can happen after a power failure during OTA update, flash memory corruption
|
||||
|
||||
---
|
||||
|
||||
### Bridge connection errors
|
||||
|
||||
```bash
|
||||
# Check bridge health
|
||||
docker compose exec mc-webui curl http://meshcore-bridge:5001/health
|
||||
|
||||
# Bridge logs
|
||||
docker compose logs -f meshcore-bridge
|
||||
|
||||
# Test meshcli directly in bridge container
|
||||
docker compose exec meshcore-bridge meshcli -s /dev/ttyUSB0 infos
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Messages not updating
|
||||
|
||||
- Check that `.msgs` file exists in `MC_CONFIG_DIR`
|
||||
- Verify bridge service is healthy: `docker compose ps`
|
||||
- Check bridge logs for command errors
|
||||
|
||||
---
|
||||
|
||||
### Contact Management Issues
|
||||
|
||||
**Check logs:**
|
||||
```bash
|
||||
# mc-webui container logs
|
||||
docker compose logs -f mc-webui
|
||||
|
||||
# meshcore-bridge container logs (where settings are applied)
|
||||
docker compose logs -f meshcore-bridge
|
||||
```
|
||||
|
||||
**Look for:**
|
||||
- "Loaded webui settings" - confirms settings file is being read
|
||||
- "manual_add_contacts set to on/off" - confirms setting is applied to meshcli session
|
||||
- "Saved manual_add_contacts=..." - confirms setting is persisted to file
|
||||
You can also check the System Log in the web UI (Menu → System Log) for real-time information about contact events and settings changes.
|
||||
|
||||
---
|
||||
|
||||
@@ -194,17 +147,13 @@ docker compose logs -f meshcore-bridge
|
||||
### View logs
|
||||
|
||||
```bash
|
||||
docker compose logs -f # All services
|
||||
docker compose logs -f mc-webui # Main app only
|
||||
docker compose logs -f meshcore-bridge # Bridge only
|
||||
docker compose logs -f mc-webui
|
||||
```
|
||||
|
||||
### Restart services
|
||||
### Restart
|
||||
|
||||
```bash
|
||||
docker compose restart # Restart both
|
||||
docker compose restart mc-webui # Restart main app only
|
||||
docker compose restart meshcore-bridge # Restart bridge only
|
||||
docker compose restart mc-webui
|
||||
```
|
||||
|
||||
### Start / Stop
|
||||
@@ -230,69 +179,22 @@ docker compose ps
|
||||
|
||||
```bash
|
||||
docker compose exec mc-webui sh
|
||||
docker compose exec meshcore-bridge sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Testing Bridge API
|
||||
|
||||
The `meshcore-bridge` container exposes HTTP endpoints for diagnostics.
|
||||
|
||||
### Test endpoints
|
||||
|
||||
```bash
|
||||
# List pending contacts (from inside mc-webui container or server)
|
||||
curl -s http://meshcore-bridge:5001/pending_contacts | jq
|
||||
|
||||
# Add a pending contact
|
||||
curl -s -X POST http://meshcore-bridge:5001/add_pending \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"selector":"Skyllancer"}' | jq
|
||||
|
||||
# Check bridge health
|
||||
docker compose exec mc-webui curl http://meshcore-bridge:5001/health
|
||||
```
|
||||
|
||||
### Example responses
|
||||
|
||||
**GET /pending_contacts:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"pending": [
|
||||
{
|
||||
"name": "Skyllancer",
|
||||
"public_key": "f9ef..."
|
||||
},
|
||||
{
|
||||
"name": "KRA Reksio mob2🐕",
|
||||
"public_key": "41d5..."
|
||||
}
|
||||
],
|
||||
"raw_stdout": "Skyllancer: f9ef...\nKRA Reksio mob2🐕: 41d5..."
|
||||
}
|
||||
```
|
||||
|
||||
**POST /add_pending:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"stdout": "Contact added successfully",
|
||||
"stderr": "",
|
||||
"returncode": 0
|
||||
}
|
||||
```
|
||||
|
||||
**Note:** These endpoints require `manual_add_contacts` mode to be enabled.
|
||||
|
||||
---
|
||||
|
||||
## Backup and Restore
|
||||
|
||||
**All important data is in the `data/` directory.**
|
||||
|
||||
### Create backup
|
||||
### UI Backup (recommended)
|
||||
|
||||
You can create and download database backups directly from the web UI:
|
||||
1. Click the menu icon (☰) → "Backup"
|
||||
2. Click "Create Backup" to create a timestamped backup
|
||||
3. Click "Download" to save a backup to your local machine
|
||||
|
||||
### Manual backup (CLI)
|
||||
|
||||
```bash
|
||||
cd ~/mc-webui
|
||||
@@ -343,9 +245,8 @@ After successful installation:
|
||||
- [Architecture](architecture.md) - Technical documentation
|
||||
- [README](../README.md) - Installation guide
|
||||
- MeshCore docs: https://meshcore.org
|
||||
- meshcore-cli docs: https://github.com/meshcore-dev/meshcore-cli
|
||||
|
||||
**Issues:**
|
||||
- GitHub Issues: https://github.com/MarekWo/mc-webui/issues
|
||||
- Check existing issues before creating new ones
|
||||
- Include logs when reporting problems
|
||||
- Include logs when reporting problems (use Menu → System Log for easy access)
|
||||
|
||||
@@ -10,7 +10,13 @@ This guide covers all features and functionality of mc-webui. For installation i
|
||||
- [Sending Messages](#sending-messages)
|
||||
- [Message Content Features](#message-content-features)
|
||||
- [Direct Messages (DM)](#direct-messages-dm)
|
||||
- [Global Search](#global-search)
|
||||
- [Contact Management](#contact-management)
|
||||
- [Interactive Console](#interactive-console)
|
||||
- [Device Dashboard](#device-dashboard)
|
||||
- [Settings](#settings)
|
||||
- [System Log](#system-log)
|
||||
- [Database Backup](#database-backup)
|
||||
- [Network Commands](#network-commands)
|
||||
- [PWA Notifications](#pwa-notifications)
|
||||
|
||||
@@ -146,11 +152,12 @@ Access the Direct Messages feature:
|
||||
|
||||
### Using the DM Page
|
||||
|
||||
1. **Select a recipient** from the dropdown at the top:
|
||||
1. **Select a recipient** using the searchable contact selector at the top:
|
||||
- Type to search contacts by name (fuzzy matching)
|
||||
- **Existing conversations** are shown first (with message history)
|
||||
- Separator: "--- Available contacts ---"
|
||||
- **All companion contacts** from your device (only COM type, no repeaters/rooms)
|
||||
- You can start a new conversation with anyone in your contacts list
|
||||
- Click the info icon next to a contact to view their details (public key, type, location)
|
||||
- Use the (x) button to clear the search and select a different contact
|
||||
2. Type your message in the input field (max 140 bytes, same as channels)
|
||||
3. Use the emoji picker button to insert emojis
|
||||
4. Press Enter or click Send
|
||||
@@ -162,7 +169,7 @@ Access the Direct Messages feature:
|
||||
- When you return to the DM page, it automatically opens the last conversation you were viewing
|
||||
- This works similarly to how the main page remembers your selected channel
|
||||
|
||||
**Note:** Only companion contacts (COM) are shown in the dropdown. Repeaters (REP), rooms (ROOM), and sensors (SENS) are automatically filtered out.
|
||||
**Note:** Only companion contacts (COM) are shown in the selector. Repeaters (REP), rooms (ROOM), and sensors (SENS) are automatically filtered out.
|
||||
|
||||
### Message Status Indicators
|
||||
|
||||
@@ -178,6 +185,23 @@ Access the Direct Messages feature:
|
||||
|
||||
---
|
||||
|
||||
## Global Search
|
||||
|
||||
Search across all your messages (channels and DMs) using full-text search:
|
||||
|
||||
1. Click the menu icon (☰) in the navbar
|
||||
2. Select "Search" from the menu
|
||||
3. Type your search query and press Enter or click the search button
|
||||
|
||||
**Features:**
|
||||
- **Full-text search** powered by SQLite FTS5 for fast results
|
||||
- **FTS5 syntax support** - Use quotes for exact phrases (`"hello world"`), prefix matching (`mesh*`), boolean operators (`hello AND world`)
|
||||
- Results show message content, sender, channel/conversation, and timestamp
|
||||
- Click a result to navigate to that channel or DM conversation
|
||||
- Syntax help available via the (?) icon next to the search field
|
||||
|
||||
---
|
||||
|
||||
## Contact Management
|
||||
|
||||
Access the Contact Management feature to control who can connect to your node:
|
||||
@@ -225,8 +249,12 @@ When manual approval is enabled, new contacts appear in the Pending Contacts lis
|
||||
- Confirmation modal shows list of contacts to be approved
|
||||
- Progress indicator during batch approval
|
||||
|
||||
**Ignore contacts:**
|
||||
- **Batch ignore:** Click "Ignore Filtered" to ignore all filtered contacts at once
|
||||
- **Single ignore:** Click "Ignore" on individual contacts
|
||||
|
||||
**Other actions:**
|
||||
- Click "Map" button to view contact location on Google Maps (when GPS data available)
|
||||
- Click "Map" button to view contact location on the map (when GPS data available)
|
||||
- Click "Copy Key" to copy full public key to clipboard
|
||||
- Click "Refresh" to reload pending contacts list
|
||||
|
||||
@@ -317,6 +345,130 @@ You can schedule automatic cleanup to run daily at a specified hour:
|
||||
|
||||
---
|
||||
|
||||
## Interactive Console
|
||||
|
||||
Access the interactive console for direct MeshCore command execution:
|
||||
|
||||
1. Click the menu icon (☰) in the navbar
|
||||
2. Select "Console" from the menu
|
||||
3. Opens in a fullscreen modal with a command prompt
|
||||
|
||||
### Available Command Categories
|
||||
|
||||
The console supports a comprehensive set of MeshCore commands organized into categories:
|
||||
|
||||
**Repeater Management:**
|
||||
- `req_owner <name>` - Request repeater owner info
|
||||
- `req_regions <name>` - Request repeater regions
|
||||
- `req_clock <name>` - Request repeater clock
|
||||
- `req_neighbours <name>` - Request repeater neighbors list
|
||||
- `set_owner <name> <value>` - Set repeater owner
|
||||
- `set_regions <name> <value>` - Set repeater regions
|
||||
- `set_clock <name>` - Sync repeater clock
|
||||
|
||||
**Contact Management:**
|
||||
- `contacts` - List all device contacts
|
||||
- `.contacts` - List contacts (JSON format)
|
||||
- `.pending_contacts` - List pending contacts
|
||||
- `add_pending <key>` - Approve pending contact
|
||||
- `remove_contact <name>` - Remove contact
|
||||
|
||||
**Device & Channel Management:**
|
||||
- `infos` / `ver` - Device info / firmware version
|
||||
- `stats` - Device statistics
|
||||
- `self_telemetry` - Own device telemetry
|
||||
- `get_channels` - List channels
|
||||
- `get <param>` / `set <param> <value>` - Get/set device parameters
|
||||
- `trace <name>` - Trace route to contact
|
||||
- `neighbours` - Request neighbor list from device
|
||||
|
||||
### Console Features
|
||||
|
||||
- **Command history** - Navigate with up/down arrows, or use the history dropdown
|
||||
- **Persistent history** - Saved on server, accessible across sessions
|
||||
- **Auto-reconnect** - WebSocket reconnects automatically on disconnect
|
||||
- **Status indicator** - Green/yellow/red dot shows connection status
|
||||
- **Human-readable output** - Clock times, statistics, and telemetry formatted for readability
|
||||
|
||||
---
|
||||
|
||||
## Device Dashboard
|
||||
|
||||
Access device information and statistics:
|
||||
|
||||
1. Click the menu icon (☰) in the navbar
|
||||
2. Select "Device Info" from the menu
|
||||
|
||||
### Info Tab
|
||||
|
||||
Displays device parameters in a readable table:
|
||||
- Device name, type, public key
|
||||
- Location coordinates with map button
|
||||
- Radio parameters (frequency, bandwidth, spreading factor, coding rate)
|
||||
- TX power, multi-acks, location sharing settings
|
||||
|
||||
### Stats Tab
|
||||
|
||||
Shows live device statistics:
|
||||
- Uptime, free memory, battery voltage
|
||||
- Message counters (sent, received, forwarded)
|
||||
- Current airtime usage
|
||||
|
||||
---
|
||||
|
||||
## Settings
|
||||
|
||||
Access the Settings modal to configure application behavior:
|
||||
|
||||
1. Click the menu icon (☰) in the navbar
|
||||
2. Select "Settings" from the menu
|
||||
|
||||
### DM Retry Settings
|
||||
|
||||
Configure how direct messages are retried when delivery is not confirmed:
|
||||
- **Retry count** - Number of retry attempts (includes initial send)
|
||||
- **Retry interval** - Seconds between retries
|
||||
- **Flood fallback attempt** - After which attempt to switch from DIRECT to FLOOD routing
|
||||
- **Grace period** - Seconds to wait for late ACKs after all retries complete
|
||||
|
||||
### Quote Settings
|
||||
|
||||
- **Max quote length** - Maximum number of bytes to include when quoting a message
|
||||
|
||||
### Message Retention
|
||||
|
||||
- **Live view days** - Number of days of messages shown in the live view (older messages are archived)
|
||||
|
||||
---
|
||||
|
||||
## System Log
|
||||
|
||||
View real-time application logs:
|
||||
|
||||
1. Click the menu icon (☰) in the navbar
|
||||
2. Select "System Log" from the menu
|
||||
3. Opens in a fullscreen modal with streaming log output
|
||||
|
||||
The log viewer shows the most recent application log entries and streams new entries in real-time. Useful for monitoring device events, debugging issues, and verifying message delivery.
|
||||
|
||||
---
|
||||
|
||||
## Database Backup
|
||||
|
||||
Create and manage database backups:
|
||||
|
||||
1. Click the menu icon (☰) in the navbar
|
||||
2. Select "Backup" from the menu
|
||||
|
||||
**Features:**
|
||||
- **Create backup** - Creates a timestamped copy of the current database
|
||||
- **List backups** - View all available backups with timestamps and file sizes
|
||||
- **Download** - Download any backup file to your local machine
|
||||
|
||||
Backups are stored in the `./data/` directory alongside the main database.
|
||||
|
||||
---
|
||||
|
||||
## Network Commands
|
||||
|
||||
Access network commands from the slide-out menu under "Network Commands" section:
|
||||
@@ -432,6 +584,6 @@ To get the full PWA experience with app badge counters:
|
||||
- **Repeater Management:** [rpt-mgmt.md](rpt-mgmt.md)
|
||||
- **Troubleshooting:** [troubleshooting.md](troubleshooting.md)
|
||||
- **Architecture:** [architecture.md](architecture.md)
|
||||
- **Container Watchdog:** [watchdog.md](watchdog.md)
|
||||
- **MeshCore docs:** https://meshcore.org
|
||||
- **meshcore-cli docs:** https://github.com/meshcore-dev/meshcore-cli
|
||||
- **GitHub Issues:** https://github.com/MarekWo/mc-webui/issues
|
||||
|
||||
BIN
gallery/DM_Settings.png
Normal file
|
After Width: | Height: | Size: 152 KiB |
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 145 KiB |
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 203 KiB |
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 150 KiB |
BIN
gallery/dm.png
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 175 KiB |
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 207 KiB |
BIN
gallery/global_search.png
Normal file
|
After Width: | Height: | Size: 174 KiB |
|
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 257 KiB |
BIN
gallery/map.png
|
Before Width: | Height: | Size: 442 KiB After Width: | Height: | Size: 666 KiB |
|
Before Width: | Height: | Size: 442 KiB After Width: | Height: | Size: 600 KiB |
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 152 KiB |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 148 KiB |
BIN
gallery/message_filtering.png
Normal file
|
After Width: | Height: | Size: 233 KiB |
BIN
gallery/sytem_log.png
Normal file
|
After Width: | Height: | Size: 350 KiB |