Connect go2rtc for door camera live view
Door camera live view on a virtual intercom requires low-latency video in the browser. OpenApp integrates go2rtc for RTSP → WebRTC paths and exposes stream metadata on public intercom sessions via get_public_session_streams.
This guide is for building operators and integrators wiring lobby cameras to Virtual Access intercom flows. Setup: go2rtc integration.
Architecture
Section titled “Architecture”NVR / camera (RTSP) → go2rtc integration (discovered stream entities) → Virtual intercom session (call / video) → GET .../sessions/{id}/streams → WebRTC for visitor UIOne-time setup
Section titled “One-time setup”- Add go2rtc integration with NVR host, credentials, and channel discovery (getting started).
- Link Virtual Access portal + door entity for unlock.
- Start a portal session with
mode": "video"when the deployment supports it — see Virtual intercom flow.
Start a video session
Section titled “Start a video session”export OPENAPP_API_BASE='https://api.openapp.house/api/v1'export PUBLIC_PORTAL_ID='01HPUBLICPORTAL000000000000'export TARGET_ENTITY_ID='01HENTITY000000000000000000'
curl -sS -X POST \ -H "Content-Type: application/json" \ -d '{ "target_entity_id": "'"${TARGET_ENTITY_ID}"'", "mode": "video" }' \ "${OPENAPP_API_BASE}/public/access/portals/${PUBLIC_PORTAL_ID}/sessions"Save session_id from the response.
Fetch WebRTC stream metadata
Section titled “Fetch WebRTC stream metadata”export SESSION_ID='01HSESSION000000000000000000'
curl -sS \ "${OPENAPP_API_BASE}/public/access/sessions/${SESSION_ID}/streams"Response shape: PublicSessionStreamsResponse — use fields for your WebRTC client (PeerJS / go2rtc routing). Full examples: Public Access — streams.
Python (SDK)
Section titled “Python (SDK)”session = await client.public_access.portal_start_session( portal_id, target_entity_id=entity_id, mode="video",)streams = await client.public_access.session_streams(session["session_id"])Agent notes
Section titled “Agent notes”- Stream entities from go2rtc carry
profilemetadata — match the door camera channel in integration config. - Video paths are public session routes; do not confuse with org-scoped entity RBAC.
- Test reachability with
GET .../portals/{id}/reachablebefore go-live.