Skip to Content

How to Integrate SONOFF CAM-PT2 into Scrypted?

11 July 2025 by
How to Integrate SONOFF CAM-PT2 into Scrypted?
CRM, Wendy

1. Introduction

This guide walks you through the steps to integrate the SONOFF CAM-PT2 into the Scrypted platform via the ONVIF protocol. Once connected, you'll be able to:

  • Stream real-time video
  • Monitor motion detection events
  • Control the pan-tilt (PT) functions
  • Set up automations using motion triggers

⚠️Make sure both your camera and the Scrypted instance are on the same local network for seamless communication.

2. What You'll Need

Hardware & Software Requirements

  • SONOFF CAM-PT2 camera
    • Firmware version ≥ 1.0.5
  • eWeLink App (version ≥ 5.17.0)
  • A device or container with Scrypted installed (e.g., PC, Raspberry Pi, or Docker)
  • Installation guide for Scrypted: https://docs.scrypted.app/installation.html

Setup Steps in eWeLink

  1. Add the CAM-PT2 to the eWeLink app
  2. Go to: Device Settings → More Settings → ONVIF/RTSP
  3. Enable ONVIF/RTSPand take note of:
    • IP address
    • ONVIF Port
    • Username (can be edited)
    • Password (can be edited)

 

3. Pair with Scrypted

Step 1: Install the ONVIF Plugin

  1. Open the Scrypted dashboard
  2. Click INSTALL PLUGIN

  1. Search for @scrypted/onvif, then clickINSTALL

Step 2: Add the Camera

  1. After installation, click REFRESH to initiate automatic ONVIF camera discovery. If the camera is not detected, use ADD ONVIF CAMERA to perform manual device registration.

  1. Enter:
    • ONVIF Username
    • Password
  1. Click ADD

✅Your SONOFF CAM-PT2 is now successfully integrated!

4. Supported Features

4.1. Live Video & Audio

  • View camera feed in real time
  • Enable or disable audio from the stream

4.2. Motion Detection

  • View motion status from the camera
  • Note: Noise detection is not supported

4.3. PTZ Control

  • Control the camera's pan and tilt

4.4. Automation

  1. Go to the Automationstab and clickADD AUTOMATION
  2. Name the automation

  1. Under TRIGGERS, set:
    • Trigger Type: Device Event
    • Device Event: Camera'sMotion Sensor

  1. Under ACTIONS, set:
    • Action Type: e.g., Script → Log a message like:
      "There is an object passing by"

5. Feature Overview

CAM-PT2 supports ONVIF and RTSP, enabling easy integration with Scrypted. To help you get to know the differences, a quick feature overview is provided below.

Feature

ONVIF

RTSP

Device Discovery

×

Live View

PTZ Control

×

Event Notification

Triggers Automation (Motion)

×

6. Conclusion

You've now integrated SONOFF CAM-PT2 with Scrypted using ONVIF. This setup offers:

  • Device Discovery
  • Local video streaming
  • Smart motion-based automations
  • Direct PTZ control for enhanced visibility