pi-webrtc

Home Assistant

這一頁還沒有中文版,以下顯示英文原文。

Show the camera on a Home Assistant dashboard. Home Assistant plays the stream over WHEP with the WebRTC Camera integration.

1. Install Home Assistant

Follow the official installation guide.

2. Install HACS

HACS installs community integrations, such as WebRTC Camera. Follow the official HACS guide.

Installing HACS

3. Install WebRTC Camera

Go to Home Assistant → HACS → Integrations, and search for WebRTC Camera. Install it, then restart Home Assistant.

WebRTC Camera in HACS

4. Add the integration

Go to Settings → Devices & Services → Add Integration, and add WebRTC Camera.

Adding the integration

5. Start pi-webrtc with WHEP

./pi-webrtc --camera=libcamera:0 \
    --uid=home-pi-4b \
    --fps=30 \
    --width=1280 \
    --height=720 \
    --use-whep \
    --whep-port=8080

The stream is now at http://<device-ip>:8080, for example http://192.168.4.35:8080.

6. Add the card to a dashboard

Go to Dashboard → Edit Dashboard → Add Card → WebRTC Camera.

Adding the card

Enter the stream URL, and save:

type: custom:webrtc-camera
url: webrtc:http://192.168.4.35:8080

The camera on a dashboard

在 GitHub 上編輯此頁

本頁內容