Add release-after-use and cycling motion detection modes
- main_release.py (v3.1.0): Release camera after each snapshot for V4L2 compatibility - main_cycling.py (v3.2.0): Single motion thread cycles between cameras (1s interval) - mcp/vision_mcp.py: Support custom snapshot_path for multi-camera servers Fixes Pi 3 dual-camera V4L2 conflicts by not holding cameras open.
This commit is contained in:
@@ -302,7 +302,9 @@ async def vision_snap(cam_id: str) -> Union[MCPImage, str]:
|
||||
if cam_type == 'http':
|
||||
# HTTP API camera
|
||||
async with httpx.AsyncClient(timeout=REQUEST_TIMEOUT, verify=False) as client:
|
||||
snapshot_url = f"{cam['url'].rstrip('/')}/snapshot"
|
||||
# Support custom snapshot path for multi-camera servers
|
||||
snapshot_path = cam.get('snapshot_path', '/snapshot')
|
||||
snapshot_url = f"{cam['url'].rstrip('/')}{snapshot_path}"
|
||||
headers = {"X-API-Key": cam['api_key']}
|
||||
|
||||
logger.info(f"Requesting HTTP snapshot from '{cam_id}' at {snapshot_url}")
|
||||
|
||||
Reference in New Issue
Block a user