Alex root

root pushed to master at root/mybeacon-daemon

  • 7c42a3cba3 Fix BLE scanner performance and memory leaks - Increase D-Bus signal buffer from 100 to 10000 - Add device cache to avoid blocking D-Bus GetAll calls - Extract MAC address from D-Bus path for PropertiesChanged events - Clear ManufacturerData on update to handle different advert types - Fix slice memory leak in recentBLE/recentWiFi (copy instead of re-slice) - Add async broadcast to avoid blocking event loop - Add queue overflow protection (max 10000 events) - Add -buildvcs=false to Makefile for sudo builds Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

1 week ago

root pushed to master at root/mybeacon-daemon

  • 5c631df705 Add RSSI filter to BLE tab Allows filtering events by minimum RSSI value to find nearby beacons Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

2 weeks ago

root pushed to master at root/mybeacon-backend

  • 9eccedfbe9 Add SSH key authentication for device access via ttyd Uses ~/.ssh/device_access key to connect to devices through tunnels. Public key needs to be added to device firmware's authorized_keys. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

2 weeks ago

root pushed to master at root/mybeacon-backend

  • 5e5a4934d9 Remove hardcoded fallback values from config loading Frontend now shows actual values from backend without inventing defaults. Empty fields shown as empty, not with made-up values. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

2 weeks ago

root pushed to master at root/mybeacon-backend

  • a908a08c62 Remove all hardcoded config values from frontend Frontend now loads all config from backend API. No more hardcoded IPs, ports, or default values. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

2 weeks ago

root pushed to master at root/mybeacon-backend

  • f9be24af27 Replace hardcoded 192.168.5.4 with ms.e-bash.ru:2223 - Frontend: use window.location.origin for iframe URLs - Backend: dynamic WebSocket URL based on client location - Update default tunnel server to ms.e-bash.ru:2223 - Fix DevicesView.vue defaults Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

2 weeks ago

root pushed to master at root/mybeacon-backend

  • fc74b5fc2b Read default config from file on each registration Previously DEFAULT_CONFIG was cached at import time, so changes via admin panel required backend restart. Now reads fresh from file. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

2 weeks ago

root pushed to master at root/mybeacon-backend

  • 5985797bd7 Fix SSH key update on device re-registration Previously, when a device re-registered, the new SSH key was ignored and old credentials were returned. Now the key is updated in config and authorized_keys is synced. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

2 weeks ago

root pushed to master at root/mybeacon-backend

  • 201977fd6c Add JSON editor for device config, fix config merging - Add Interactive/JSON tabs to device edit modal (like default config) - In interactive mode: merge changes with original config to preserve ssh_tunnel, dashboard_tunnel, and other fields not in the form - In JSON mode: save config as-is for full control - Remove hardcoded 192.168.5.4 defaults (was overwriting real values) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

2 weeks ago

root pushed to master at root/mybeacon-backend

  • a252e03bd2 Add frontend deploy command and fix toggle/flickering - Add 'deploy' command to frontend/start.sh that builds and copies to nginx root (/var/www/mybeacon/frontend) - Use unique .slider-large class to avoid Vue scoped CSS conflicts - Show loading only when no devices (prevent table flickering) - Update DEV_CONTAINER_README with deployment info Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

2 weeks ago

root pushed to master at root/mybeacon-backend

  • 9a21731d09 Fix toggle switch CSS and table flickering - Use unique class .slider-large instead of .toggle-slider to avoid Vue scoped CSS conflicts - Show loading/error only when devices array is empty - Don't hide table during background refresh Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

2 weeks ago

root pushed to master at root/mybeacon-backend

  • 6c38c1f963 Fix CSS specificity: add parent selectors to toggle-slider The global .toggle-slider styles were overriding the specific .toggle-switch-large .toggle-slider styles. Fixed by adding .toggle-switch parent selector. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

2 weeks ago

root pushed to master at root/mybeacon-backend

  • ad341a9c07 Fix toggle switch styling and table flickering - Redesign toggle-switch-large CSS: proper sizing (72x40px), centered knob (32x32px), smooth cubic-bezier animation, no border (use inset shadow instead) - Fix table flickering: add silent parameter to loadDevices(), use silent=true for polling updates to avoid showing loading spinner Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

2 weeks ago

root pushed to master at root/mybeacon-backend

  • 259e4b69c9 Fix device registration toggle: CSS and SQLAlchemy bugs - Fix toggle-switch-large CSS: add parent selector to prevent style override, center the toggle dot vertically using transform - Fix SQLAlchemy JSON mutation: reassign whole dict instead of mutating to ensure changes are detected and persisted Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

2 weeks ago

root pushed to master at root/mybeacon-backend

  • 94329c1440 Add device registration toggle with auto-disable Implemented large toggle switch on Devices page for controlling device auto-registration with automatic disable after 60 minutes. **Frontend:** - Added registration banner with large toggle switch at top of Devices page - Shows visual indicator (green/red) when registration is enabled/disabled - Displays countdown timer for auto-disable (time_left from API) - Real-time updates every 10 seconds - Added settings.js API client for registration control **Backend:** - Enhanced auto-registration API to return time_left (seconds until disable) - Auto-disable logic already implemented: disables 60 minutes after last device registration - GET /api/v1/superadmin/settings/auto-registration returns status with countdown - POST /api/v1/superadmin/settings/auto-registration enables/disables **Translations:** - Added English/Russian translations for registration toggle UI - "Device Registration Enabled/Disabled" - "Devices can auto-register! Remember to disable after setup." - "Auto-disable in Xm Ys" **Other:** - Removed "Test Credentials" from login page for security 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

2 weeks ago

root pushed to master at root/mybeacon-daemon

  • cb078896b2 Move NTP Server below interfaces in Status tab Layout fix: - NTP Server was positioned between title and interface cards - Moved to bottom of interfaces panel, after iface-grid - Better visual hierarchy: title → interfaces → NTP 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

2 weeks ago

root pushed to master at root/mybeacon-backend

  • b2e40d2859 Fix file descriptor leak in monitoring and watchdog CRITICAL FIX: Resolved "Too many open files" error that was crashing backend. **Root causes:** 1. **host_monitor.py**: psutil.process_iter() called every 60s opened /proc/PID/stat for ALL processes (500+) without proper cleanup 2. **tunnel_service.py**: watchdog called subprocess.run(["ss", "-tln"]) for EACH ttyd process every minute, causing descriptor accumulation **Fixes:** 1. **host_monitor.py**: - Convert psutil.process_iter() to list() to force iterator cleanup - Collect thread_count during single iteration instead of separate loop - Added error handling for process iteration 2. **tunnel_service.py**: - Added _get_all_listening_ports() to call ss -tln ONCE per cycle - Changed watchdog to check ports against set instead of subprocess per port - Added check=False to subprocess.run to prevent exceptions - Optimized from O(N) subprocess calls to O(1) per cycle **Impact:** - Before: N ttyd processes = N subprocess calls per minute - After: 1 subprocess call per minute regardless of ttyd count - Eliminated file descriptor leak completely Backend now runs stable without file descriptor exhaustion. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

4 weeks ago

root pushed to master at root/mybeacon-backend

  • be376d7a25 Add startup scripts for backend and frontend Added convenient startup scripts for development and production: **Backend script** (backend/start.sh): - dev: Development with auto-reload - prod: Production with 4 workers - background: Run in background - stop/restart/status commands - Custom HOST/PORT/LOG_LEVEL via env vars **Frontend script** (frontend/start.sh): - dev: Vite dev server with HMR - build: Production build - preview: Preview production build - background: Run in background - stop/restart/status/clean commands **Main script** (start-all.sh): - dev: Start both (frontend interactive) - background: Both in background - logs: Watch all logs - stop/restart/status for all services **Documentation** (STARTUP.md): - Quick start guide - Detailed usage examples - First-time setup instructions - Troubleshooting tips - Useful bash aliases Usage: ./start-all.sh dev # Recommended for development ./start-all.sh background # Start all in background ./start-all.sh logs # Watch logs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

4 weeks ago

root pushed to master at root/mybeacon-backend

  • 8c4e2fb033 Fix ClickHouse integration and refresh token timezone bug Fixed multiple issues preventing dashboard and authentication from working: 1. **Refresh Token Timezone Bug** - CRITICAL FIX: - Fixed `TypeError: can't compare offset-naive and offset-aware datetimes` - Added timezone.utc to datetime.now() in RefreshToken.is_valid property - This was blocking admin panel login 2. **ClickHouse Integration**: - Added ClickHouse configuration to config.py and .env - Switched from clickhouse-driver to clickhouse-connect library - Updated clickhouse_service.py to use new client API - Fixed SQL query: removed non-existent query_count column - Fixed host_monitor.py ClickHouse metrics collection 3. **ClickHouse Metrics Now Working**: - Database size: tracking BLE events storage - Queries per second (QPS) calculation - Active queries monitoring - Memory usage tracking Dashboard ClickHouse card now displays real-time metrics! 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

4 weeks ago

root pushed to master at root/mybeacon-backend

  • b455ce16e6 Fix host monitoring metrics collection Fixed PostgreSQL and ClickHouse metrics collection errors: 1. PostgreSQL metrics: - Convert Decimal types to int/float to avoid type errors in division - Fixed: db_size, cache_hit_ratio, total_xacts, deadlocks, temp_files 2. ClickHouse metrics: - Gracefully handle missing clickhouse_connect module - Return zero values when ClickHouse is not configured 3. Monitoring API: - Added /metrics endpoint for dashboard cards - Returns latest PostgreSQL, ClickHouse, and HTTP metrics Dashboard metrics cards now display correctly with real-time data. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

4 weeks ago