- Add WebSocket state variables (wsEnabled, wsConnected)
- Add initWebSocket() function with connection and event handling
- Add handleWebSocketScanUpdate() for processing WS scan events
- Modify startLiveTracking() to use WS mode with HTTP fallback
- Update index.html to load socket.io and websocket.js scripts
- Show [WS] indicator in status when using WebSocket mode
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Load peer scanner positions from /api/peers
- Use peer's CURRENT position instead of stored position
- Ensures device positions update when peer scanner moves
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added peer scanner markers to MapLibre 3D view
- Peer scanners shown with cyan icon and absolute position
- Styled with distinct color and shadow
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When devices are synced from a peer, they now retain their original
source scanner reference. This ensures:
- Device positions are calculated relative to the scanner that
detected them, not the local scanner
- Moving the local scanner won't affect synced devices' positions
- Popup shows "Source: <scanner_id>" for remotely-synced devices
Database changes:
- Added source_scanner_id, source_scanner_lat, source_scanner_lon
columns to devices table
- get_devices_since() includes source scanner info in sync data
- bulk_update_devices() accepts and stores source scanner position
- Added get_all_device_sources() method
API changes:
- /api/sync/devices GET includes scanner_lat and scanner_lon
- /api/sync/devices POST accepts source_scanner_lat/lon
- /api/device/floors includes sources dict
Frontend changes:
- loadDevicePositions() loads source scanner info
- getDevicePosition() uses source scanner position for synced devices
- Popup shows source scanner info for remotely-synced devices
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Scanner positions shown as magenta stars (this scanner)
- Peer scanners shown as cyan stars
- Clear visual distinction from WiFi (orange circles) and BT (blue circles)
- Radar view also shows scanner as star shape
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Home Assistant Integration:
- New homeassistant.py module with webhook support
- Webhooks for scan results, new devices, and device departures
- Absence detection with configurable timeout
- Documentation in docs/HOME_ASSISTANT.md
CLI Improvements:
- Replace 'web' command with start/stop/restart/status
- Background daemon mode with PID file management
- Foreground mode for debugging (--foreground)
Web UI Enhancements:
- Improved device list styling and layout
- Better floor assignment UI
- Enhanced map visualization
Documentation:
- Add CHANGELOG.md
- Add docs/API.md with full endpoint reference
- Add docs/CHEATSHEET.md for quick reference
- Update project documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Popups now stay open during live BT tracking updates
- Track open popup device ID and restore after marker refresh
- Update TASKS.md, TODO.md, PROJECT.md, ROADMAP.md
- Mark position smoothing, floor persistence as complete
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Store floor assignments in SQLite database for persistence
- Floor now saves correctly for live-tracked BT devices
- Add statistical movement detection (5-sample average + stddev)
- Require 1.5m + 2σ deviation to mark device as moving
- Reduces false positives from RSSI noise/fluctuations
- Add /api/device/floors endpoint for bulk floor retrieval
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
WiFi & Bluetooth signal mapping tool for Raspberry Pi with:
- WiFi scanning via iw command
- Bluetooth Classic/BLE device discovery
- RSSI-based distance estimation
- OUI manufacturer lookup
- Web dashboard with multiple views:
- Radar view (polar plot)
- 2D Map (Leaflet/OpenStreetMap)
- 3D Map (MapLibre GL JS with building extrusion)
- Floor-based device positioning
- Live BT tracking mode (auto-starts on page load)
- SQLite database for historical device tracking:
- RSSI time-series history
- Device statistics (avg/min/max)
- Movement detection and velocity estimation
- Activity patterns (hourly/daily)
- New device alerts
- Automatic data retention/cleanup
- REST API for all functionality
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>