-
-
Notifications
You must be signed in to change notification settings - Fork 223
Update smartcamera to support single get/set/do requests #1187
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
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
e9f9eb9
Enable plain get requests
sdb9696 2e2c134
Update dump_devinfo to handle single smartcamera requests
sdb9696 72618bf
Update post review
sdb9696 482ebcc
Merge remote-tracking branch 'upstream/master' into janitor/smartcame…
sdb9696 539b727
Merge remote-tracking branch 'upstream/master' into janitor/smartcame…
sdb9696 f5f7723
Add dataclass for single request
sdb9696 f255cdc
Add snake name function
sdb9696 4312dfc
Disable single calls for hubs
sdb9696 d91aab0
Fix disable single calls for hubs
sdb9696 6d5ee55
Merge remote-tracking branch 'upstream/master' into janitor/smartcame…
sdb9696 ee47180
Remove single test calls for hubs
sdb9696 d3884be
Replace raise error on single multiple
sdb9696 74522d0
Fix broken child request
sdb9696 27847c5
Fix force multi
sdb9696 ade8e38
Disable single requests
sdb9696 8e5aae1
Keep single for multipleRequest
sdb9696 48dc81f
Only send multiRequest, get, set and do as single
sdb9696 d82f79b
Add comment to raise on error
sdb9696 bdffd74
Add clock status and timezone queries
sdb9696 4921b5c
Fix test
sdb9696 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
"""Module for smart camera requests.""" | ||
|
||
from __future__ import annotations | ||
|
||
SMARTCAMERA_REQUESTS: list[dict] = [ | ||
{"getAlertTypeList": {"msg_alarm": {"name": "alert_type"}}}, | ||
{"getNightVisionCapability": {"image_capability": {"name": ["supplement_lamp"]}}}, | ||
{"getDeviceInfo": {"device_info": {"name": ["basic_info"]}}}, | ||
{"getDetectionConfig": {"motion_detection": {"name": ["motion_det"]}}}, | ||
{"getPersonDetectionConfig": {"people_detection": {"name": ["detection"]}}}, | ||
{"getVehicleDetectionConfig": {"vehicle_detection": {"name": ["detection"]}}}, | ||
{"getBCDConfig": {"sound_detection": {"name": ["bcd"]}}}, | ||
{"getPetDetectionConfig": {"pet_detection": {"name": ["detection"]}}}, | ||
{"getBarkDetectionConfig": {"bark_detection": {"name": ["detection"]}}}, | ||
{"getMeowDetectionConfig": {"meow_detection": {"name": ["detection"]}}}, | ||
{"getGlassDetectionConfig": {"glass_detection": {"name": ["detection"]}}}, | ||
{"getTamperDetectionConfig": {"tamper_detection": {"name": "tamper_det"}}}, | ||
{"getLensMaskConfig": {"lens_mask": {"name": ["lens_mask_info"]}}}, | ||
{"getLdc": {"image": {"name": ["switch", "common"]}}}, | ||
{"getLastAlarmInfo": {"system": {"name": ["last_alarm_info"]}}}, | ||
{"getLedStatus": {"led": {"name": ["config"]}}}, | ||
{"getTargetTrackConfig": {"target_track": {"name": ["target_track_info"]}}}, | ||
{"getPresetConfig": {"preset": {"name": ["preset"]}}}, | ||
{"getFirmwareUpdateStatus": {"cloud_config": {"name": "upgrade_status"}}}, | ||
{"getMediaEncrypt": {"cet": {"name": ["media_encrypt"]}}}, | ||
{"getConnectionType": {"network": {"get_connection_type": []}}}, | ||
{ | ||
"getAlertConfig": { | ||
"msg_alarm": { | ||
"name": ["chn1_msg_alarm_info", "capability"], | ||
"table": ["usr_def_audio"], | ||
} | ||
} | ||
}, | ||
{"getAlertPlan": {"msg_alarm_plan": {"name": "chn1_msg_alarm_plan"}}}, | ||
{"getSirenTypeList": {"siren": {}}}, | ||
{"getSirenConfig": {"siren": {}}}, | ||
{"getLightTypeList": {"msg_alarm": {}}}, | ||
{"getSirenStatus": {"siren": {}}}, | ||
{"getLightFrequencyInfo": {"image": {"name": "common"}}}, | ||
{"getRotationStatus": {"image": {"name": ["switch"]}}}, | ||
{"getNightVisionModeConfig": {"image": {"name": "switch"}}}, | ||
{"getWhitelampStatus": {"image": {"get_wtl_status": ["null"]}}}, | ||
{"getWhitelampConfig": {"image": {"name": "switch"}}}, | ||
{"getMsgPushConfig": {"msg_push": {"name": ["chn1_msg_push_info"]}}}, | ||
{"getSdCardStatus": {"harddisk_manage": {"table": ["hd_info"]}}}, | ||
{"getCircularRecordingConfig": {"harddisk_manage": {"name": "harddisk"}}}, | ||
{"getRecordPlan": {"record_plan": {"name": ["chn1_channel"]}}}, | ||
{"getAudioConfig": {"audio_config": {"name": ["speaker", "microphone"]}}}, | ||
{"getFirmwareAutoUpgradeConfig": {"auto_upgrade": {"name": ["common"]}}}, | ||
{"getVideoQualities": {"video": {"name": ["main"]}}}, | ||
{"getVideoCapability": {"video_capability": {"name": "main"}}}, | ||
{"getTimezone": {"system": {"name": "basic"}}}, | ||
{"getClockStatus": {"system": {"name": "clock_status"}}}, | ||
# single request only methods | ||
{"get": {"function": {"name": ["module_spec"]}}}, | ||
{"get": {"cet": {"name": ["vhttpd"]}}}, | ||
{"get": {"motor": {"name": ["capability"]}}}, | ||
{"get": {"audio_capability": {"name": ["device_speaker", "device_microphone"]}}}, | ||
{"get": {"audio_config": {"name": ["speaker", "microphone"]}}}, | ||
] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.