-
-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Improve Apple device detection and add Furbo cloud camera support #269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
15b3c32
dbfe770
9f5941b
091e689
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -176,7 +176,8 @@ private DeviceDetectionResult DetectDeviceTypeCore( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Priority 0.5: Check OUI for vendors that need special handling | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // - Cync/Wyze/GE have camera fingerprints but most devices are actually plugs/bulbs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // - Apple with SmartSensor fingerprint is likely Apple Watch | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| var vendorOverrideResult = CheckVendorDefaultOverride(client?.Oui, client?.Name, client?.Hostname, client?.DevCat); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // - Apple with generic fingerprints (SmartTV, IoTGeneric) should use MAC OUI for specific device type | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| var vendorOverrideResult = CheckVendorDefaultOverride(client?.Oui, client?.Name, client?.Hostname, client?.DevCat, client?.Mac); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (vendorOverrideResult != null) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _logger?.LogDebug("[Detection] '{DisplayName}': Vendor override → {Category} (vendor defaults to plug unless camera indicated)", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -442,7 +443,15 @@ private DeviceDetectionResult DetectFromUniFiOui(string ouiName, string? deviceN | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Media/Entertainment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (name.Contains("roku")) return CreateOuiResult(ClientDeviceCategory.StreamingDevice, ouiName, OuiHighConfidence); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (name.Contains("apple") && name.Contains("tv")) return CreateOuiResult(ClientDeviceCategory.StreamingDevice, ouiName, OuiHighConfidence); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Apple devices: Use device name to disambiguate between Apple TV and HomePod | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (name.Contains("apple")) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (deviceNameLower.Contains("tv") || deviceNameLower.Contains("apple tv")) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return CreateOuiResult(ClientDeviceCategory.StreamingDevice, "Apple TV", OuiHighConfidence); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (deviceNameLower.Contains("homepod") || deviceNameLower.Contains("siri")) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return CreateOuiResult(ClientDeviceCategory.SmartSpeaker, "Apple HomePod", OuiHighConfidence); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+451
to
+453
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return CreateOuiResult(ClientDeviceCategory.StreamingDevice, "Apple TV", OuiHighConfidence); | |
| if (deviceNameLower.Contains("homepod") || deviceNameLower.Contains("siri")) | |
| return CreateOuiResult(ClientDeviceCategory.SmartSpeaker, "Apple HomePod", OuiHighConfidence); | |
| { | |
| return new DeviceDetectionResult | |
| { | |
| Category = ClientDeviceCategory.StreamingDevice, | |
| Source = DetectionSource.MacOui, | |
| ConfidenceScore = OuiHighConfidence, | |
| VendorName = "Apple TV", | |
| RecommendedNetwork = FingerprintDetector.GetRecommendedNetwork(ClientDeviceCategory.StreamingDevice), | |
| Metadata = new Dictionary<string, object> | |
| { | |
| ["detection_method"] = "unifi_oui_name", | |
| ["oui_name"] = ouiName | |
| } | |
| }; | |
| } | |
| if (deviceNameLower.Contains("homepod") || deviceNameLower.Contains("siri")) | |
| { | |
| return new DeviceDetectionResult | |
| { | |
| Category = ClientDeviceCategory.SmartSpeaker, | |
| Source = DetectionSource.MacOui, | |
| ConfidenceScore = OuiHighConfidence, | |
| VendorName = "Apple HomePod", | |
| RecommendedNetwork = FingerprintDetector.GetRecommendedNetwork(ClientDeviceCategory.SmartSpeaker), | |
| Metadata = new Dictionary<string, object> | |
| { | |
| ["detection_method"] = "unifi_oui_name", | |
| ["oui_name"] = ouiName | |
| } | |
| }; | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment formatting: "Apple TV /HomePods" is missing a space after the slash; consider "Apple TV / HomePods" for readability.