Commit Graph

10 Commits

Author SHA1 Message Date
User
579cea57dc fix: filter scanner BT MACs in database recording
- Skip recording BT observations for addresses matching peer bt_mac
- Prevents scanners from being stored as regular devices
- Filters at database level, not just frontend display

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:07:11 +01:00
User
4fef21c06f feat: filter scanner Bluetooth devices from display
- Add bt_mac field to scanner config for identifying scanner BT adapters
- Store bt_mac in peers table for peer scanners
- Filter out devices matching scanner BT MACs from all views
- Prevents scanners from appearing as devices in device lists/maps

Config: scanner.bt_mac = "XX:XX:XX:XX:XX:XX"
API: /api/peers/register accepts bt_mac field

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:00:42 +01:00
User
24de6c7f06 feat: add multi-scanner trilateration and signal heat map
- Add database methods for multi-scanner RSSI queries
- Add weighted trilateration function supporting 2+ scanners
- Add /api/positions/trilaterated endpoint
- Add /api/heatmap/signal endpoint for heat map data
- Update frontend to show trilaterated positions with gold markers
- Add heat map toggle button for signal coverage visualization

Trilateration uses RSSI from multiple scanners to calculate device
positions with confidence scores. Devices seen by 2+ scanners within
60 seconds get trilaterated positions shown with gold border markers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 10:33:57 +01:00
User
8e25bf8871 feat: preserve source scanner for synced devices
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>
2026-02-01 04:23:42 +01:00
User
827830b043 fix: create missing devices during peer sync
- bulk_update_devices now creates devices if they don't exist locally
  but have useful metadata (floor, label, or favorite status)
- Sync trigger endpoint now reports both pulled and pushed device counts
- Enables full bidirectional sync of device metadata between peers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 04:15:36 +01:00
User
46b7b01e98 fix: exclude position offsets from peer sync
Position offsets (custom_lat_offset, custom_lon_offset) are relative
to each scanner's location, so syncing them between scanners would
place devices incorrectly. Only sync: floor, label, favorite, notes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 03:52:59 +01:00
User
7eb76498b0 fix: don't update updated_at on device observations
The updated_at timestamp should only change when user metadata
changes (floor, label, position, notes), not on every scan
observation. This was breaking peer sync because observation
timestamps were overwriting metadata timestamps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 03:43:34 +01:00
User
fa5178a5be feat: add peer sync for multi-scanner deployments
Enable scanner instances to discover each other and synchronize
device metadata (floors, positions, labels, favorites) automatically.

New features:
- Peer registration API with mutual auto-registration
- Background sync thread with configurable interval
- Timestamp-based conflict resolution (newest wins)
- Config options: peers, sync_interval_seconds, accept_registrations

API endpoints:
- GET/POST /api/peers - list peers, register new peer
- DELETE /api/peers/<id> - remove peer
- GET/POST /api/sync/devices - device sync for peers
- POST /api/sync/trigger - manual sync trigger

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 03:19:04 +01:00
User
dda8455813 Fix floor persistence and improve movement detection
- 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>
2026-02-01 00:34:49 +01:00
User
52df6421be Initial commit: RF Mapper v0.3.0-dev
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>
2026-02-01 00:08:21 +01:00