33 Commits

Author SHA1 Message Date
pe1hvh
3d5cea221a Merge pull request #6 from pe1hvh/BotName
BotName+BugFixes
2026-02-09 16:06:03 +01:00
pe1hvh
54943d0f47 BotName+BugFixes 2026-02-09 15:33:10 +01:00
pe1hvh
5665dadcb8 Update README with additional screenshots
Added new screenshots to the README for better visualization.
2026-02-08 21:48:09 +01:00
pe1hvh
29d0b5863e Merge pull request #4 from pe1hvh/feature/contactlist_maintainance
feature/archive and contactlist
2026-02-08 21:37:26 +01:00
pe1hvh
f9cc91ebc8 feature/archive and contactlist 2026-02-08 21:29:52 +01:00
pe1hvh
b2399235b5 Merge pull request #3 from pe1hvh/feature/bot-extends
Feature/Archiving of all messages
2026-02-08 09:19:03 +01:00
pe1hvh
6ec90b57fd feature: persistent storage for all incoming messages
This feature implements persistent storage for all incoming messages, RX log entries, and contacts with configurable retention periods. The system uses a dual-layer architecture to balance real-time UI performance with comprehensive data retention.
2026-02-08 09:12:31 +01:00
pe1hvh
ac4d10dece BugFix 2026-02-07 23:27:17 +01:00
pe1hvh
159be96662 BugFix 2026-02-07 22:06:20 +01:00
pe1hvh
a8c3fcddf4 V5.2.2 2026-02-07 21:26:25 +01:00
pe1hvh
6d2992eed7 Update MAC address format in README
Removed 'literal:' prefix from MAC address examples in README.
2026-02-06 05:56:23 +01:00
pe1hvh
43a8a73223 Merge pull request #2 from pe1hvh/feature/data-cache
feat: add local JSON cache for instant startup and offline resilience
2026-02-05 22:50:06 +01:00
pe1hvh
4b338861aa feat: add local JSON cache for instant startup and offline resilience
- New: services/cache.py — DeviceCache stores device info, contacts,
  channel keys per BLE address in ~/.meshcore-gui/cache/
- Changed: ble/worker.py — cache-first startup flow, background BLE
  refresh, periodic contact refresh (every 5 min)
- Changed: config.py — added CONTACT_REFRESH_SECONDS setting
- GUI renders immediately from cached data; BLE updates in background
- Contacts are merged (new/changed from device, offline nodes preserved)
- Channel decryption keys cached for instant packet decoding on restart
2026-02-05 22:48:05 +01:00
pe1hvh
70cba6ecb8 Delete meshcore_gui.zip 2026-02-05 19:13:52 +01:00
pe1hvh
2f3ac32885 Update status badge in README.md 2026-02-05 18:55:21 +01:00
pe1hvh
b752abc503 Revise README for production readiness and features
Updated README to reflect production readiness and added details about new features and dependencies.
2026-02-05 18:51:53 +01:00
pe1hvh
2375fdef0f Remove completed TODO for message route visualization
Removed a completed TODO item related to message route visualization.
2026-02-05 18:38:27 +01:00
pe1hvh
cd8bc2d60a Update screenshots in README.md 2026-02-05 18:36:50 +01:00
pe1hvh
bb838cb3a4 Add new screenshot to README
Added a new screenshot to the README for better visualization.
2026-02-05 18:36:00 +01:00
pe1hvh
b6933dd7de Fix formatting and update screenshot section in README 2026-02-05 18:33:37 +01:00
pe1hvh
72dd7c2d75 Merge pull request #1 from pe1hvh/feature/map-route-visualization
Refactor to modular package architecture + new features

Summary

Restructures the single-file meshcore_gui.py (v2.0) into a proper Python package with clear separation of concerns, and adds three major features: message route visualization, a keyword auto-reply bot, and raw LoRa packet decoding with deduplication.
New features
Message route visualization
Click any message to open a route page (/route/{msg_index}) in a new tab showing:

Hop count summary with SNR
Interactive Leaflet map with sender → repeaters → receiver connected by polyline
Detailed route table (name, ID, node type, GPS coordinates per hop)
Pre-filled reply panel with route acknowledgement

Route data is resolved from two sources in priority order:

Path hashes decoded from the raw LoRa packet (via meshcoredecoder)
Stored out_path from the sender's contact record (fallback)

Keyword bot
Built-in auto-reply bot, toggled via 🤖 BOT checkbox in the filter bar.

Configurable keyword → reply template mapping (supports {bot}, {sender}, {snr}, {path} variables)
Listens on configurable channels only
Guards against reply loops (ignores own messages and senders ending in "Bot")
Cooldown between replies (default 5s)

Packet decoding & deduplication

Raw LoRa packets from RX_LOG_DATA are decoded and decrypted using channel keys via meshcoredecoder, extracting message hashes, path hashes and hop data
Dual-strategy deduplication (hash-based from decoded packets + content-based fallback) prevents duplicate messages

Architecture changes
Before (v2.0): Single 700+ line file with all logic intermixed.
After (v5.0): Modular package following SOLID principles:
meshcore_gui/
├── ble/                    # BLE communication layer
│   ├── worker.py           # Thread lifecycle and connection
│   ├── commands.py         # Command execution (SRP)
│   ├── events.py           # Event callbacks (SRP)
│   └── packet_decoder.py   # LoRa packet decoding
├── core/                   # Domain layer
│   ├── models.py           # Typed dataclasses (Message, Contact, RouteNode, ...)
│   ├── shared_data.py      # Thread-safe shared state
│   └── protocols.py        # Protocol interfaces (ISP/DIP)
├── gui/                    # Presentation layer
│   ├── dashboard.py        # Main page orchestrator
│   ├── route_page.py       # Route visualization page
│   └── panels/             # 8 modular UI panels
└── services/               # Business logic
    ├── bot.py              # Keyword auto-reply
    ├── dedup.py            # Message deduplication
    └── route_builder.py    # Route data construction
Key design decisions:

Protocol interfaces (typing.Protocol) decouple components — consumers depend on narrow interfaces, not the concrete SharedData class
Typed dataclasses replace untyped dicts for Message, Contact, RxLogEntry, RouteNode and DeviceInfo
Services layer keeps business logic (bot, dedup, route building) independent of both BLE and GUI

Dependencies
New dependency: meshcoredecoder (LoRa packet decoder and channel crypto)
bashpip install nicegui meshcore bleak meshcoredecoder
Breaking changes

Entry point is still python meshcore_gui.py <ADDRESS> but now delegates to the package
Channel configuration moved from meshcore_gui.py to meshcore_gui/config.py
--debug-on CLI flag added (replaces editing DEBUG = True in source)

Testing
Tested on Linux (Ubuntu 24.04) with SenseCAP T1000-E over BLE. macOS and Windows remain untested.
2026-02-05 18:31:38 +01:00
pe1hvh
5bfd103e97 Refactoring 2026-02-05 18:10:53 +01:00
pe1hvh
35f46651dd fix(bot,ui): bot self-detection, message display and browser reconnect
- Use BOT_NAME for self-reply detection instead of literal 'BOT'
- Suppress device name in bot message display to avoid duplication
- Add logging filter for NiceGUI deleted-client warning
- Reset local UI state on render() so browser reconnect repopulates
  device info, contacts and channels from SharedData without BLE refetch
2026-02-05 14:07:22 +01:00
pe1hvh
661f565f34 Update route_page.py 2026-02-05 08:07:37 +01:00
pe1hvh
cfd2d39b25 Route page added 2026-02-05 07:17:27 +01:00
pe1hvh
dcb3037db7 Refactoring part 1 2026-02-04 10:00:20 +01:00
pe1hvh
8c106fb7de Remove obsolete capture tool sections from BLE explanation docs
The ble_observe.py capture tool has been removed from the project.
Updated both NL and EN versions of the BLE explanation document:
- Rewrote intro (section 1) to focus on BLE concepts rather than captures
- Removed sections 8 (workflow), 9 (common mistakes), 10 (sequence diagram)
- Updated conclusion to remove capture references
- Renumbered remaining sections (conclusion → 8, references → 9)
2026-02-03 14:39:40 +01:00
pe1hvh
379388e71d Merge branch 'main' of https://github.com/pe1hvh/meshcore-gui 2026-02-03 14:29:56 +01:00
pe1hvh
60e132c010 Add English translation of BLE capture workflow explanation
Add English translation of BLE capture workflow explanation

Translated ble_capture_workflow_t_1000_e_uitleg.md to English as
ble_capture_workflow_t_1000_e_explanation.md. This companion document
covers BLE concepts, GATT services, NUS, the ownership problem, and
the capture workflow for the T1000-e on Linux.

Intended to make the documentation accessible to non-Dutch speakers
in the MeshCore community.
2026-02-03 14:29:46 +01:00
pe1hvh
0948dd1194 Format TODO list items in README.md 2026-02-03 13:13:42 +01:00
pe1hvh
a5f1caa6cd Update README to specify desktop usage
Clarified the description of the GUI for desktop use.
2026-02-03 13:11:07 +01:00
pe1hvh
1258efb7ea Add screenshot in README
Add  screenshot in README
2026-02-03 13:08:53 +01:00
pe1hvh
e4b9947c1e Initial commit 2026-02-03 13:01:55 +01:00