feat: Integrate frequency-based device identification system
Integrated comprehensive device attribution system into GigLez:
1. Simple Device Matcher (src/matcher/simple_matcher.py):
- Frequency-based device categorization (315/433/868/915 MHz)
- Protocol-specific identification (Princeton, EV1527, Oregon Scientific, etc.)
- Modulation + frequency matching (OOK/FSK/ASK)
- Confidence scoring (0.4-0.95 range)
- 50+ device types covered
2. API Integration (src/api/main_simple.py):
- Device matching in upload pipeline
- Added device fields: device_name, device_category, match_confidence, match_method, device_description
- Top 5 alternative matches stored per capture
- New endpoint: GET /api/v1/captures/{id} for detail view
3. Frontend Implementation:
- Detail modal with comprehensive device information
- Device identification section with confidence bars
- Alternative matches display
- Signal, location, and metadata sections
- Keyboard (ESC) and click-outside modal closing
4. UI Enhancements (static/css/main.css):
- Modal overlay with backdrop blur
- Animated modal slide-in
- Confidence visualization (green/yellow/red bars)
- Responsive detail grid layout
- Device match cards with categories
5. JavaScript Integration:
- detail-modal.js: Comprehensive detail view renderer
- Updated map.js and search.js to use detail modal
- Removed placeholder functions
6. Utilities:
- scripts/rematch_captures.py: Re-run matcher on existing data
- Successfully re-matched 20 existing captures
Device Categories Supported:
- Consumer RF (remotes, sensors)
- Automotive (key fobs, TPMS)
- Home Automation (garage/gate openers, blinds)
- Sensors (weather stations, temperature)
- Security (door/window sensors, alarms)
- IoT (smart meters, LoRa devices)
- Industrial (SCADA, telemetry, RFID)
Match Methods:
- Protocol matching (highest confidence: 0.7-0.95)
- Frequency matching (0.4-0.7)
- Modulation + frequency matching (0.5-0.7)
Frontend now displays:
- Device name and category on map markers
- Confidence percentage
- Detailed device information modal
- Alternative device matches
- Match method explanation
All existing captures successfully identified with 60-70% confidence.
This commit is contained in:
+2
-7
@@ -58,7 +58,7 @@ function displaySearchResults(captures) {
|
||||
|
||||
function createResultCard(capture) {
|
||||
const freqMHz = (capture.frequency / 1e6).toFixed(2);
|
||||
const date = new Date(capture.captured_at).toLocaleString();
|
||||
const date = new Date(capture.timestamp || Date.now()).toLocaleString();
|
||||
|
||||
const deviceName = capture.device_name || 'Unknown Device';
|
||||
const protocol = capture.protocol || 'RAW';
|
||||
@@ -67,7 +67,7 @@ function createResultCard(capture) {
|
||||
: 'N/A';
|
||||
|
||||
return `
|
||||
<div class="result-card" onclick="viewCaptureDetails('${capture.file_hash}')">
|
||||
<div class="result-card" onclick="viewCaptureDetails(${capture.id})">
|
||||
<div class="result-header">
|
||||
<div class="result-title">${deviceName}</div>
|
||||
<div class="result-frequency">${freqMHz} MHz</div>
|
||||
@@ -89,8 +89,3 @@ function createResultCard(capture) {
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
function viewCaptureDetails(fileHash) {
|
||||
// Show detail modal or navigate to detail page
|
||||
alert(`Viewing details for: ${fileHash}\n\nDetail view coming soon!`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user