Commit Graph

14 Commits

Author SHA1 Message Date
claude[bot] e94f065451 fix: update default TCP port from 12345 to 5000 in code and tests
Updates the default TCP port throughout the codebase to match the
documentation changes made in the previous commit.

Changes:
- config.py: Update TCP port validator default (line 136)
- config.py: Update environment variable fallback default (line 255)
- test_config.py: Update test assertions (lines 117, 145)
- test_bridge.py: Update test assertion and fixture (lines 23, 63)
- test_command_forwarding.py: Update test fixture (line 20)
- test_rate_limiting.py: Update test fixtures (lines 22, 37)

Co-authored-by: JingleManSweep <jinglemansweep@users.noreply.github.com>
2025-11-16 22:32:55 +00:00
Louis King 48e81610b5 feat: implement comprehensive rate limiting and update defaults to 15 seconds
- Implement global send lock to ensure all message operations are rate limited
- Add centralized _rate_limited_send() method with async.Lock for thread safety
- Fix _reset_path() to respect rate limiting via centralized method
- Update all MQTT command handlers to use rate-limited pathways
- Change default message_initial_delay and message_send_delay from 5.0/10.0 to 15.0 seconds
- Update documentation in README.md and CLAUDE.md with new defaults
- Fix test configurations to use zero delays to prevent hanging in test environments
- Prevents repeater congestion by ensuring both incoming and outgoing messages are properly spaced

This addresses the critical issue where rate limiting was bypassed for certain
message pathways, allowing messages to be sent instantly and potentially
causing repeater congestion in mesh networks.
2025-09-25 21:14:59 +01:00
Louis King 95bfed2c5c test: fix type annotations and code quality issues in rate limiting tests 2025-09-25 20:05:25 +01:00
Louis King bc121f2e1b feat: add message rate limiting to prevent network flooding 2025-09-25 19:48:15 +01:00
Louis King 64f017641a test: improve type hints and imports in deduplication tests 2025-09-21 17:42:31 +01:00
Louis King 3c582c5a96 Merge branch 'main' of github.com:ipnet-mesh/meshcore-mqtt 2025-09-21 17:38:11 +01:00
Louis King 9719042343 feat: enhance retry logic with acknowledgement tracking and startup grace period 2025-09-21 17:36:56 +01:00
claude[bot] 20c673c3e0 feat: Add retry logic for message sending with acknowledgement tracking
- Add configurable retry parameters (count, delay, path reset)
- Implement exponential backoff between retries
- Track message acknowledgements with timeout
- Reset routing path after max retries for direct messages
- Add comprehensive tests for retry functionality
- Update CLI and environment variable configuration

Fixes #2

Co-authored-by: JingleManSweep <jinglemansweep@users.noreply.github.com>
2025-09-21 00:08:33 +00:00
Louis King dc82a4c7b0 feat: add message deduplication to prevent duplicate MQTT messages on reconnect 2025-09-03 10:51:34 +01:00
Louis King 31c727cab0 feat: add telemetry request command and move SELF_INFO to optional events 2025-08-19 23:06:23 +01:00
Louis King 9f49979a6a refactor: clean up event types and update defaults for better device monitoring 2025-08-19 22:37:52 +01:00
Louis King 8a3ab441c1 refactor: move CONNECTED/DISCONNECTED events from default to optional 2025-08-19 22:22:26 +01:00
Louis King 7b0e7ef4e1 feat: add send_trace command with TRACE_DATA event support 2025-08-17 20:38:55 +01:00
Louis King 14c19238da Initial commit 2025-08-16 21:45:38 +01:00