Skip to content

Commit

Permalink
Don't ignore cams without p2p_id #276 #677
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlt8 committed Jan 22, 2023
1 parent 7b4a111 commit 68047ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/wyze_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def get_filtered_cams(self, fresh_data: bool = False) -> None:
os.remove(self.token_path + "cameras.pickle")
cams: List[WyzeCamera] = self.get_wyze_data("cameras", fresh_data=True)
for cam in cams:
if not cam.enr:
if not cam.enr or not cam.p2p_id:
log.warning(f"💔 {cam.nickname} is not supported [NO ENR]")
cams.remove(cam)
total = len(cams)
Expand Down
7 changes: 0 additions & 7 deletions app/wyzecam/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,8 @@ def get_camera_list(auth_info: WyzeCredential) -> List[WyzeCamera]:
"thumbnails_url"
)

if not p2p_id:
continue
if not p2p_type:
continue
if not ip:
continue
# Ignore missing ENR for gwell cameras
# if not enr:
# continue
if not mac:
continue
if not product_model:
Expand Down
4 changes: 2 additions & 2 deletions app/wyzecam/api_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ class WyzeCamera(BaseModel):
"""

p2p_id: str
p2p_type: int
p2p_id: Optional[str]
p2p_type: Optional[int]
ip: str
enr: Optional[str]
mac: str
Expand Down

0 comments on commit 68047ea

Please sign in to comment.