Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions simplipy/device/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class DeviceTypes(Enum):
LOCK = 16
OUTDOOR_CAMERA = 17
MOTION_V2 = 20
SCOUT_CAMERA = 21

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nit: let's keep these members alphabetized.

OUTDOOR_ALARM_SECURITY_BELL_BOX = 22
LOCK_KEYPAD = 253
UNKNOWN = 99
Expand Down
2 changes: 2 additions & 0 deletions simplipy/device/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class CameraTypes(Enum):
CAMERA = 0
DOORBELL = 1
OUTDOOR_CAMERA = 2
SCOUT_CAMERA = 3
UNKNOWN = 99


Expand All @@ -31,6 +32,7 @@ class CameraTypes(Enum):
"SS002": CameraTypes.DOORBELL,
"SS003": CameraTypes.CAMERA,
"SSOBCM4": CameraTypes.OUTDOOR_CAMERA,
"scout": CameraTypes.SCOUT_CAMERA,
}


Expand Down
2 changes: 2 additions & 0 deletions tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
TEST_LOCK_ID = "987"
TEST_LOCK_ID_2 = "654"
TEST_LOCK_ID_3 = "321"
TEST_SCOUT_CAMERA_ID = "0000000000000000000000000000abcd"
TEST_SCOUT_SERIAL = "0000abcd"
TEST_REFRESH_TOKEN = "qrstu98765" # noqa: S105
TEST_SUBSCRIPTION_ID = 12345
TEST_SYSTEM_ID = 12345
Expand Down
327 changes: 327 additions & 0 deletions tests/fixtures/scout_camera.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,327 @@
{
"uuid": "0000000000000000000000000000abcd",
"uid": 12345,
"sid": 12345,
"cameraSettings": {
"activityZones": {
"zones": []
},
"spotlight": {
"enableColorNightMode": false
},
"videoFlip": {
"enable": false,
"verticalFlip": false,
"horizontalFlip": false
},
"alarmState": {
"recordOnAlarm": false,
"recordOnCount": false,
"spotlightFlashOnAlarm": false,
"sirenOnAlarm": false
},
"motion": {
"enable": {
"off": false,
"home": false,
"away": true
},
"granularObjectDetectionTypes": []
},
"notifications": {
"motion": {
"off": false,
"home": false,
"away": true
}
},
"videoTimestamp": {
"enabled": false
},
"cameraName": "Scout",
"pictureQuality": "1536p",
"nightVision": "auto",
"statusLight": "on",
"micSensitivity": 55,
"micEnable": true,
"speakerVolume": 50,
"motionSensitivity": 50,
"shutterHome": "closedAlarmOnly",
"shutterAway": "open",
"shutterOff": "closedAlarmOnly",
"wifiSsid": "REDACTED",
"canStream": false,
"canRecord": false,
"pirEnable": true,
"vaEnable": false,
"notificationsEnable": true,
"enableDoorbellNotification": true,
"doorbellChimeVolume": "off",
"doorbellChimeType": "Mechanical",
"privacyEnable": false,
"hdr": false,
"vaZoningEnable": false,
"vaZoningRows": 0,
"vaZoningCols": 0,
"vaZoningMask": [],
"maxDigitalZoom": 10,
"supportedResolutions": ["640p", "960p", "1536p"],
"admin": {
"tinyYolo": {
"numFramesToAnalyze": 5,
"confidenceThreshold": 0.9,
"positiveFramesThreshold": 0.5
},
"powerControl": {
"disabled": false
},
"wakeModeOperation": {
"custom": {
"upperRFThresholdRX": 0,
"lowerRFThresholdRX": 0,
"upperRFThresholdTX": 0,
"lowerRFThresholdTX": 0
},
"mode": "AUTO"
},
"messageDispatch": {
"motionEvent": "APERTURE"
},
"IRLED": 0,
"pirSens": 0,
"statusLEDState": 1,
"lux": "lowLux",
"motionDetectionEnabled": false,
"motionThresholdZero": 0,
"motionThresholdOne": 10000,
"levelChangeDelayZero": 30,
"levelChangeDelayOne": 10,
"audioDetectionEnabled": false,
"audioChannelNum": 2,
"audioSampleRate": 16000,
"audioChunkBytes": 2048,
"audioSampleFormat": 3,
"audioSensitivity": 50,
"audioThreshold": 50,
"audioDirection": 0,
"bitRate": 2000000,
"longPress": "REDACTED",
"kframe": 1,
"gopLength": 40,
"idr": 1,
"fps": 20,
"firmwareVersion": "1.53.3.44371",
"netConfigVersion": "",
"camAgentVersion": "",
"lastLogin": 1794329461,
"lastLogout": 1794329467,
"pirSampleRateMs": 800,
"pirHysteresisHigh": 2,
"pirHysteresisLow": 10,
"pirFilterCoefficient": 1,
"pirSensitivityThreshold": 40,
"pirBlindTime": 2,
"pirPulseCount": 1,
"pirWindowTime": 2,
"pirSignalSource": 0,
"pirHpfCutoff": 0,
"pirPulseDetectionMode": 0,
"pirOperationMode": 2,
"pirLevel": "medium",
"logEnabled": true,
"logLevel": 3,
"logQDepth": 20,
"firmwareGroup": "public",
"otaProvider": "malbec",
"irOpenThreshold": 750,
"irCloseThreshold": 1000,
"irOpenDelay": 3,
"irCloseDelay": 3,
"irThreshold1x": 600,
"irThreshold2x": 450,
"irThreshold3x": 300,
"statsPeriod": 3600000,
"sarlaccDebugLogTypes": 0,
"odProcessingFps": 8,
"odObjectMinWidthPercent": 6,
"odObjectMinHeightPercent": 24,
"odEnableObjectDetection": true,
"odClassificationMask": 2,
"odClassificationConfidenceThreshold": 0.95,
"odEnableOverlay": false,
"odAnalyticsLib": 2,
"odSensitivity": 85,
"odEventObjectMask": 15,
"odLuxThreshold": 445,
"odLuxHysteresisHigh": 4,
"odLuxHysteresisLow": 4,
"odLuxSamplingFrequency": 30,
"odFGExtractorMode": 2,
"odVideoScaleFactor": 1,
"odSceneType": 1,
"odCameraView": 3,
"odCameraFOV": 2,
"odBackgroundLearnStationary": true,
"odBackgroundLearnStationarySpeed": 15,
"odClassifierQualityProfile": 1,
"odEnableVideoAnalyticsWhileStreaming": false,
"wlanMac": "00:00:00:00:00:00",
"region": "us-west-2",
"webRTCProvider": "kvs",
"recordingProvider": "kvs",
"enableWifiAnalyticsLib": false,
"alwaysUploadBitmap": 0,
"outdoorMonitoringEnabled": false,
"account": "000000000000",
"ivLicense": "",
"battery": [
[1794080675, 92],
[1794080841, 99],
[1794080866, 92],
[1794080960, 100],
[1794081153, 100],
[1794081441, 100],
[1794081868, 100],
[1794329327, 100]
],
"rssi": [
[1794080675, -57],
[1794080841, -49],
[1794080866, -52],
[1794080960, -53],
[1794081017, -51],
[1794081101, -45],
[1794081153, -46],
[1794081441, -41],
[1794081868, -55],
[1794329327, -53]
],
"vmUse": 0,
"resSet": 0,
"uptime": 0,
"wifiDisconnects": 0,
"wifiDriverReloads": 0
},
"motionNotificationsOnlyWhileUnmonitored": false,
"aiEventSummaryEnabled": false,
"pirLevel": "medium",
"odLevel": "medium"
},
"cameraStatus": {
"firmwareVersion": "1.53.3.44371",
"netConfigVersion": "",
"camAgentVersion": "",
"otaUpgradeStatus": "",
"lastConnected": 1794329460,
"lastLogin": 1794329461,
"lastLogout": 1794329467,
"wlanMac": "00:00:00:00:00:00",
"fwDownloadVersion": "",
"fwDownloadPercentage": 0,
"recovered": false,
"recoveredFromVersion": "",
"setupTimestamp": 1794080647,
"monitoredPerformanceModeActive": false,
"unmetPerformanceModeCriteria": ["POWER"],
"_id": "000000000000000000000000",
"initErrors": [],
"monitoredPerformanceModeLastChanged": 1794080647973,
"speedTestTokenCreated": 1794080648,
"batteryPercentage": 100
},
"staleSettingsTypes": [],
"upgradeWhitelisted": false,
"model": "scout",
"__v": 0,
"supportedFeatures": {
"providers": {
"allSupportedProviders": {
"webrtc": ["kvs", "mist"],
"recording": ["kvs", "mist"],
"live": []
},
"webrtc": "kvs",
"recording": "kvs",
"live": "none"
},
"receiptCapabilities": {
"wake": [],
"record": []
},
"activityZones": {
"maxVertices": 0,
"maxZones": 0,
"zoneTypes": []
},
"pir": true,
"videoAnalytics": true,
"privacyShutter": true,
"microphone": "REDACTED",
"fullDuplexAudio": true,
"wired": false,
"battery": true,
"aspectRatio": "1:1",
"networkSpeedTest": true,
"speaker": true,
"spotlight": false,
"spotlightManualControl": false,
"colorNightMode": false,
"videoFlip": false,
"doorbell": false,
"videoAnalyticsZones": true,
"pairedToBasestation": true,
"modeChangeEventsOverWifi": true,
"siren": true,
"sirenManualControl": false,
"sirenManualControlV2": false,
"forceStatusLightsOn": false,
"supportsEventUuid": true,
"deviceManagedRecordings": true,
"doorbellChimeSupported": false,
"supportedChimeTypes": [],
"digitalChimeDuration": false,
"doorbellButtonSound": false,
"canTriggerBSAlarm": true,
"cameraEventsWithSystemState": true,
"granularObjectDetectionTypes": [],
"videoEncoding": "h264",
"audioEncodings": ["aac"],
"resolutions": ["640p", "960p", "1536p"],
"monitoredLiveStream": true,
"outdoorMonitoring": false,
"videoTimestamp": true,
"_id": "000000000000000000000000",
"aiEventSummary": false
},
"hubId": "00000000",
"serial": "0000abcd",
"subscription": {
"enabled": false,
"freeTrialActive": false,
"freeTrialUsed": false,
"freeTrialEnds": 0,
"freeTrialExpires": 0,
"planSku": "",
"price": 0,
"expires": 0,
"storageDays": 0,
"trialUsed": false,
"trialActive": false,
"trialExpires": 0
},
"currentState": {
"idle": false,
"liveStreaming": false,
"recording": false,
"otaDownloading": false,
"otaFlashing": false,
"batteryCharging": false,
"ts": 1794329467,
"online": false,
"connected": false,
"wifiAwakeEnabled": false,
"webrtcProvider": "KVS",
"recordingProvider": "KVS"
},
"status": "offline"
}
22 changes: 22 additions & 0 deletions tests/fixtures/scout_sensor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"flags": {
"offline": false,
"lowBattery": false,
"swingerShutdown": false
},
"serial": "0000abcd",
"type": 21,
"name": "REDACTED",
"setting": {
"off": 0,
"home": 0,
"home2": 0,
"away": 1,
"away2": 0,
"instantTrigger": false
},
"status": {},
"timestamp": 1794080623,
"deviceGroupID": 0,
"firmwareVersion": "0.0.0"
}
Loading
Loading