Product Guides

Hoe integreer je SONOFF CAM-PT2 in Home Assistant?

How to Integrate SONOFF CAM-PT2 into Home Assistant?

1. Introductie

Deze gids begeleidt je bij het integreren van de SONOFF CAM-PT2 in Home Assistant met behulp van het ONVIF-protocol. Met deze setup kun je:

  • Bekijk realtime video in Home Assistant
  • Ontvang meldingen van beweging en menselijke detectie
  • Automatisering instellen (bijv. opname starten bij detectie van beweging)

Voordat je begint, zorg ervoor dat de firmware van je apparaat en de app-versie voldoen aan de vereisten voor ONVIF-ondersteuning.

2. Wat je nodig hebt

Om deze integratie te voltooien, zorg ervoor dat je het volgende hebt:

Hardware & Software

  • SONOFF CAM-PT2 camera met firmware ≥ v1.0.5
  • eWeLink-app (versie ≥ v5.17.0) geïnstalleerd op je telefoon
  • Een apparaat met Home Assistant (bijv. Raspberry Pi 4+, pc of Docker)
  • Zowel de camera als Home Assistant bevinden zich in hetzelfde lokale netwerk

Accountgegevens & Toegang

  • Je CAM-PT2 toegevoegd aan de eWeLink-app
  • ONVIF/RTSP-functie ingeschakeld via: Apparaatinstellingen → Meer instellingen → ONVIF/RTSP

Noteer de volgende info:

  • IP-adres van de camera
  • ONVIF-poort
  • Gebruikersnaam en Wachtwoord (aanpasbaar)

3. Koppel met Home Assistant

Stap 1: Installeer ONVIF-integratie

  1. Ga naar het hoofd-dashboard van Home Assistant.
  2. Navigeer naar: Instellingen → Apparaten & Diensten → Integratie toevoegen

  1. Zoek naar ONVIF en selecteer deze

  1. Klik Verzenden

Stap 2: Voeg de Camera toe

  1. Wanneer CAM-PT2 wordt gedetecteerd, selecteer deze en klik Verzenden

  1. Voer de ONVIF Gebruikersnaam & Wachtwoord

  1. Klik Overslaan en Voltooien

Je ziet nu je camera in het Home Assistant-dashboard onder de Overzicht tabblad.

4. Wat u kunt doen

4.1 Live streaming

  • Bekijk live videobeelden direct in Home Assistant
  • Schakel audio aan/uit

4.2 Status beweging & mensdetectie

  • Beweging/Mensdetectie als automatiseringstriggers

4.3 Automatiseringen

Maak automatiseringen met cameragebeurtenissen als triggers. Voorbeeld:

Wanneer beweging wordt gedetecteerd:

  • Ga naar Apparaatinfo → + Automatisering toevoegen → Gebruik apparaat als trigger

  • Selecteer “Beweging detectie gestart”

  • Kies een actie:
    Camera → Opnemen, stel het bestandspad in zoals:
    /media/{{ now().strftime('%Y%m%d-%H%M%S') }}.mp4

  • Configureren Duur en terugkijken
  • Klik Opslaan

U kunt vervolgens opnames vinden onder Media → Mijn media.

5. Overzicht van functies

CAM-PT2 ondersteunt ONVIF en RTSP, wat eenvoudige integratie met Home Assistant mogelijk maakt. Om u te helpen de verschillen te leren kennen, wordt hieronder een kort overzicht van de functies gegeven.

Kenmerk

ONVIF

RTSP

Apparaatdetectie

×

Live weergave

PTZ-besturing

Handmatige configuratie via script is vereist.

×

Gebeurtenismelding

Triggers Automatisering (Beweging, Mens)

×

6. Conclusie

Door SONOFF CAM-PT2 te integreren met Home Assistant via ONVIF voor:

  • Apparaatdetectie
  • Lokale videostreaming
  • Slimme automatiseringen op basis van beweging of menselijke detectie

    Volgende lezen

    SONOFF New Website Launched – Smarter, Faster, and Built for You!
    How to Integrate SONOFF CAM-PT2 into Scrypted?

    5 reacties

    MaMia

    MaMia

    Reply to Aurelio: Lamentamos que la CAM-PT2 actualmente no permita configurar el Modo de Privacidad directamente en Home Assistant. Puede consultar la respuesta anterior para obtener instrucciones sobre cómo habilitar el control PTZ mediante scripts. Gracias por su comprensión.

    MaMia

    MaMia

    Reply to Bobo Cher:
    Thank you for reaching out. PTZ control can be achieved by adding cards to the dashboard.

    Go to the dashboard and start with creating a new card. Choose the “Picture Glance” one.

    Next, switch to “Show Code Editor” mode by pressing the button at the bottom left side. You will see the following code:

    camera_view: live
    type: picture-glance
    title: Kitchen
    image: https://demo.home-assistant.io/stub_config/kitchen.png
    entities: []
    camera_image: camera.tapo_mainstream

    Replace the original code with the code we provide:

    camera_view: auto
    type: picture-glance
    title: Kitchen
    image: https://demo.home-assistant.io/stub_config/kitchen.png
    entities:
    – entity: camera.pt2_profile_0
    tap_action:
    action: call-service
    service: onvif.ptz
    service_data:
    entity_id: camera.pt2_profile_0
    pan: LEFT
    speed: 1
    distance: 0.3
    move_mode: ContinuousMove
    name: Pan Left
    icon: mdi:arrow-left
    – entity: camera.pt2_profile_0
    tap_action:
    action: call-service
    service: onvif.ptz
    service_data:
    entity_id: camera.pt2_profile_0
    tilt: UP
    speed: 1
    distance: 0.3
    move_mode: ContinuousMove
    name: Tilt Up
    icon: mdi:arrow-up
    – entity: camera.pt2_profile_0
    tap_action:
    action: call-service
    service: onvif.ptz
    service_data:
    entity_id: camera.pt2_profile_0
    tilt: DOWN
    speed: 1
    distance: 0.3
    move_mode: ContinuousMove
    name: Tilt Down
    icon: mdi:arrow-down
    – entity: camera.pt2_profile_0
    tap_action:
    action: call-service
    service: onvif.ptz
    service_data:
    entity_id: camera.pt2_profile_0
    pan: RIGHT
    speed: 1
    distance: 0.3
    move_mode: ContinuousMove
    name: Pan Right
    icon: mdi:arrow-right
    image_entity: person.jimmy
    camera_image: camera.pt2_profile_0

    That’s all. Now you should see the PTZ camera card on the dashboard along with control buttons.

    Aurelio

    Aurelio

    A mí también me interesa saber cómo entrar en el modo privacidad en home assistant en el mismo supuesto.
    Además de cómo hacer el ptz como script

    Bobo Cher

    Bobo Cher

    Thanks for the Guide. How to make PTZ controls work?

    Eml

    Eml

    Thanks for the great detailed tutorial. Works like a charm.

    I wish I could set the sleep mode ON and OFF based on other events in the house (eg. when the alarm is disabled, put the camera in sleep mode for privacy). Is there a way to automate this in Home Assistant ?

    Laat een reactie achter

    Alle reacties worden gemodereerd voordat ze worden gepubliceerd.

    Deze site wordt beschermd door hCaptcha en het privacybeleid en de servicevoorwaarden van hCaptcha zijn van toepassing.