Hawk Camera Support#1272
Conversation
- Add BlinkCameraHawk class with arm, record, snap_picture, get_liveview - Add BlinkHawk sync-less module (mirrors BlinkOwl/BlinkLotus pattern) - Add setup_hawks() to Blink for homescreen discovery - Integrate hawk cameras into setup_camera_list() - Extend request_get_config and request_update_config for hawk/sedona types - Fix setup_owls() and setup_lotus() to use actual camera IDs instead of network_id - Add tests
…n extract_config_info
There was a problem hiding this comment.
Pull request overview
Adds first-class support for the Blink Arc (hawk) camera type by extending discovery, sync-module handling, camera modeling, and config endpoints, while also correcting camera ID selection for existing sync-less devices.
Changes:
- Introduces
BlinkHawk(sync-less module) andBlinkCameraHawkwith hawk-specific endpoints (arm/config/clip/thumbnail/liveview). - Extends discovery and camera-list building to include hawks, and updates sync-module camera instantiation to recognize the new type.
- Fixes
setup_owls()/setup_lotus()to use the actual cameraid(notnetwork_id) and updates/adds tests accordingly.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_sync_module.py | Updates homescreen fixtures to include hawks for unique-info lookups. |
| tests/test_sync_functions.py | Adds hawk coverage to mixed-camera sync tests and verifies BlinkCameraHawk instantiation. |
| tests/test_hawk_as_sync.py | Adds a dedicated test ensuring a hawk can behave as a sync-less module and creates a BlinkCameraHawk. |
| tests/test_blinkpy.py | Adjusts expected camera IDs after fixing owl/lotus camera ID selection. |
| tests/test_api.py | Adds tests for request_get_config / request_update_config with product_type="hawk". |
| blinkpy/sync_module.py | Adds hawk type mapping, hawk camera type selection, and introduces BlinkHawk. |
| blinkpy/camera.py | Adds BlinkCameraHawk implementing hawk-specific API endpoints. |
| blinkpy/blinkpy.py | Adds setup_hawks() and integrates hawks into setup_camera_list(), and fixes owl/lotus camera IDs. |
| blinkpy/api.py | Adds hawk URL handling to config get/update APIs and updates docstrings. |
Comments suppressed due to low confidence (1)
blinkpy/sync_module.py:229
get_unique_info()aborts the whole search on the first missing homescreen key (KeyError). After adding the newhawkstype key, homescreen payloads that omithawkscan cause lookups for other device types (e.g., doorbells) to incorrectly returnNoneunless callers/tests inject"hawks": [].
self.cameras[name] = camera_type(self)
self._names_table[to_alphanumeric(name)] = name
await self.cameras[name].update(
camera_info, force_cache=True, force=True
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Get camera info first to check product_type | ||
| camera_info = await self.get_camera_info( | ||
| camera_config["id"], unique_info=unique_info | ||
| ) | ||
|
|
There was a problem hiding this comment.
Addressed in commit 0a063cb — update_cameras() now uses a local resolved_camera_type per iteration instead of mutating the camera_type parameter, preventing class leakage between loop iterations.
|
Just going to respond here- thanks for the PRs. There's a decent amount of time I need to spend reviewing them and I'm not sure when I'll be able to get around to it. So I'm going to skip these for the next minor release of blinkpy and will target these for a major release post-review. If more than a week or two passes without me reviewing anything, just ping me. I get busy and forget things easily |
Description:
Adds support for the Blink Arc camera (
hawkproduct type). Includes homescreen discovery, aBlinkHawksync module class, and aBlinkCameraHawkcamera class with hawk-specific API endpoints. Also fixes a bug insetup_owls()andsetup_lotus()wherenetwork_idwas being used as the camera ID instead of the actual camera ID.Checklist:
toxrun successfully PR cannot be meged unless tests pass