Skip to content
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

Add/extract firmware version #842

Merged
merged 1 commit into from
Jan 4, 2024
Merged
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
3 changes: 3 additions & 0 deletions blinkpy/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def __init__(self, sync):
self.network_id = None
self.thumbnail = None
self.serial = None
self.version = None
self.motion_enabled = None
self.battery_level = None
self.clip = None
Expand All @@ -52,6 +53,7 @@ def attributes(self):
"name": self.name,
"camera_id": self.camera_id,
"serial": self.serial,
"version": self.version,
"temperature": self.temperature,
"temperature_c": self.temperature_c,
"temperature_calibrated": self.temperature_calibrated,
Expand Down Expand Up @@ -232,6 +234,7 @@ def extract_config_info(self, config):
self.camera_id = str(config.get("id", "unknown"))
self.network_id = str(config.get("network_id", "unknown"))
self.serial = config.get("serial")
self.version = config.get("fw_version")
self.motion_enabled = config.get("enabled", "unknown")
self.battery_state = config.get("battery_state") or config.get("battery")
self.temperature = config.get("temperature")
Expand Down
3 changes: 3 additions & 0 deletions blinkpy/sync_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def __init__(self, blink, network_name, network_id, camera_list):
self.region_id = blink.auth.region_id
self.name = network_name
self.serial = None
self.version = None
self.status = "offline"
self.sync_id = None
self.host = None
Expand Down Expand Up @@ -72,6 +73,7 @@ def attributes(self):
"id": self.sync_id,
"network_id": self.network_id,
"serial": self.serial,
"version": self.version,
"status": self.status,
"region_id": self.region_id,
"local_storage": self.local_storage,
Expand Down Expand Up @@ -153,6 +155,7 @@ async def sync_initialize(self):
"Could not retrieve sync module information with response: %s", response
)
return False
self.version = self.summary.get("fw_version")
return response

async def _init_local_storage(self, sync_id):
Expand Down
Loading