How to Integrate SONOFF Camera into Home Assistant
How to Integrate SONOFF Camera into Home Assistant, This guide walks you through integrating the SONOFF Camera into Home Assistant using the ONVIF protocol. With this setup, you'll be able to:
🔎 How to Integrate SONOFF Camera into Home Assistant? 1.Introduction This guide walks you through integrating the SONOFF Camera into Home Assistant using the ONVIF protocol. With this setup, you'll be able to: View real-time video in Home Assistant Receive motion and human detection events Set up automation (e.g., trigger recording when motion is detected) Before you start, make sure your device firmware and app version meet the requirements for ONVIF support. SONOFF CAM-B1P camera with firmware ≥ v1.0.2 SONOFF CAM-PT2 camera with firmware ≥ v1.0.5 SONOFF CAM-S2 camera with firmware ≥ v1.1.5 eWeLink App (version ≥ v5.18.0) installed on your phone *This tutorial takes the SONOFF CAM-PT2 camera as an example. 2.What You'll Need To complete this integration, make sure you have the following:Hardware & Software
A device running Home Assistant (e.g., Raspberr Both the camera and Home Assistant in the .Account Info & Access
Your SONOFF Camera has been added ONVIF/RTSP function enabled via: Device Settings → More Settings → .Record the Following Info:
IP address of the camera ONVIF port Username and Password (modifiable) .
.
3.Pair with Home Assistant
Step 1: Install ONVIF Integration
1.Go to the Home Assistant main dashboard.
2.Navigate to: Settings → Devices & Services → Add Integration
3.Search for ONVIF and select it
.
4.Click Submit
.
Step 2: Add the Camera
1.When CAM-PT2 is detected, select it and click Submit
.
2.Enter the ONVIF Username & Password
3.Click Skip and Finish
.
You will now see your camera in the Home Assistant dashboard under the Overview tab.
.
.
.
4.What You Can Do
4.1Real-Time Streaming
Watch live video feed directly in Home Assistant Toggle audio on/off
4.2Motion & Human Detection Status
Motion/Human Detection as Automation Triggers
4.3PTZ Control
Create a New Dashboard
.
Edit the Dashboard
.
.
.
Create a New section
.
.
.
In the "By Entity" panel, check the boxes for your camera’s motion/person detection sensors and the MainStream stream entity. Then, click “Add to Dashboard” to include them in your layout.
.
.
.
In the newly created section, click the edit icon (⋮) in the top right corner, and choose “Edit in YAML” from the menu.
.
.
.
Identify the text to the left of “_mainstream.”This text represents your camera's name. For example, if your camera string is "cam_pt2_test_mainstream", then the camera name is "cam_pt2_test".
.
.
type: grid
square: false columns: 1
cards:
-type: entities entities:
-binary_sensor.<camera_name>_cell_motion_detection
-binary_sensor.<camera_name>_motion_alarm
-binary_sensor.<camera_name>_person_detection
-type: picture-glance entities:
-entity: camera.<camera_name>_mainstream tap_action:
action: call-service service: onvif.ptz
service_data:
entity_id: camera.<camera_name>_mainstream pan: LEFT
speed: 1
distance: 0.3
move_mode: ContinuousMove name: Pan Left
show_state: false
icon: mdi:arrow-left show_icon: true
-entity: camera.<camera_name>_mainstream tap_action:
action: call-service
-entity: camera.<camera_name>_mainstream tap_action:
action: call-service service: onvif.ptz
service_data:
entity_id: camera.<camera_name>_mainstream tilt: DOWN
speed: 1
distance: 0.3
move_mode: ContinuousMove name: Tilt Down
icon: mdi:arrow-down
-entity: camera.<camera_name>_mainstream tap_action:
action: call-service service: onvif.ptz
service_data:
entity_id: camera.<camera_name>_mainstream pan: RIGHT
speed: 1
distance: 0.3
move_mode: ContinuousMove name: Pan Right
icon: mdi:arrow-right show_icon: true
-type: entities entities:
-binary_sensor.cam_pt2_test_cell_motion_detection
-binary_sensor.cam_pt2_test_motion_alarm
-binary_sensor.cam_pt2_test_person_detection
-type: picture-glance entities:
-entity: camera.cam_pt2_test_mainstream tap_action:
action: call-service service: onvif.ptz
service_data:
entity_id: camera.cam_pt2_test_mainstream pan: LEFT
speed: 1
distance: 0.3
move_mode: ContinuousMove name: Pan Left
show_state: false
icon: mdi:arrow-left show_icon: true
-entity: camera.cam_pt2_test_mainstream tap_action:
action: call-service service: onvif.ptz
service_data:
entity_id: camera.cam_pt2_test_mainstream tilt: UP
speed: 1
distance: 0.3
move_mode: ContinuousMove name: Tilt Up
icon: mdi:arrow-up
-entity: camera.cam_pt2_test_mainstream tap_action:
action: call-service service: onvif.ptz
service_data:
entity_id: camera.cam_pt2_test_mainstream tilt: DOWN
speed: 1
distance: 0.3
-entity: camera.cam_pt2_test_mainstream tap_action:
action: call-service service: onvif.ptz
service_data:
entity_id: camera.cam_pt2_test_mainstream pan: RIGHT
speed: 1
distance: 0.3
move_mode: ContinuousMove name: Pan Right
icon: mdi:arrow-right show_icon: true
.
.
At this point, you can see the live feed from the camera as well as the PTZ control buttons. You can use these buttons to rotate the camera up, down, left, and right.
4.4Automations
.
Select “Motion started detecting”
Choose an action:
Camera → Record, set file path like:
/media/{{ now().strftime('%Y%m%d-%H%M%S') }}.mp4
.
.
Configure duration and lookback
Click Save
.
You can then find recordings under Media → My media.
.
.
.
5.Feature Overview
| . Feature | . ONVIF | . RTSP |
| . Device Discovery | . √ | . × |
| . Live View | . √ | . √ |
| . . PTZ Control | . √ Manual configuration via script is required. | . . × |
| . . Event Notification | . √ Triggers Automation (Motion, Human) | . . × |
| . Feature | . ONVIF | . RTSP |
| . Device Discovery | . √ | . × |
| . Live View | . √ | . √ |
| . . Event Notification | . √ Triggers Automation (Motion, Human) | . . × |
Apple Home + SONOFF Devices Setup Guide
In this guide, you will find instructions for adding SONOFF devices to Apple Home using different integration methods. SONOFF offers both Matter-certified devices, which can be added to Apple Home directly, and non-Matter devices(including legacy WiFi and Zigbee Devices), which can be integrated through Matter Bridge solutions. This page explains how each type of device can be connected to Apple Home and helps you choose the appropriate setup based on your device type.💡Add SONOFF Matter Devices to Apple Home
.Introduction
. Apple Home offers a sleek, intuitive smart home experience—and now with Matter protocol support, adding devices like the SONOFF MINIR4M Wi-Fi Smart Switch is easier than ever. SONOFF's Matter over Wi-Fi devices integrate locally with Apple Home, without relying on cloud servers or additional hubs.
In this guide, we'll walk you through how to pair the SONOFF MINIR4M with Apple Home, enabling remote control, Siri voice commands, and automation through your Apple Home app.
Preparation
. Before you begin, make sure you meet the following requirements:• Matter-certified device with a QR code or setup code (e.g., SONOFF MINIR4M)
• A stable 2.4GHz Wi-Fi network
• An iPhone or iPad running iOS 16.3 or later
• An Apple Home hub has been added to your Apple Home app, such as: HomePod / HomePod mini, Apple TV (Check more compatible hubs here)
Setup Guide
Step 1: Power on Your SONOFF Matter Device
.1.Install and wire the MINIR4M following the included user manual.
2.Power it on — the device enters the pairing mode by default when powered on for the first time, and the LED indicator flashes two short and one long. If not, press and hold the button for 5–10 seconds to reset and enter pairing mode.
Step 2: Add the Device in the Apple Home App
.1.Open the Home app on your iPhone or iPad
2.Tap the "+" → "Add or Scan Accessory"
3.Scan the Matter QR code on the device or the Quick Guide
4.Wait for the device to be connected and follow the on-screen prompts:
• Assign the device to a room
• Rename the switch if needed
• Choose the button action (e.g., Light or Outlet configuration)
SONOFF Matter Devices List
. All SONOFF Matter devices listed below are compatible with Apple Home:| Category | Product Name |
| DIY Smart Switch | Smart Roller Shutter Switch | MINI-RBS |
| Wi-Fi Smart Switch (Dry Contact Relay) | MINI-D | |
| MINI Extreme Wi-Fi Smart Switch | MINIR4M | |
| Smart Wall Switch | SwitchMan Smart Wall Switch | M5 Matter |
💡Add SONOFF Non-Matter Devices to Apple Home
.Introduction
. Not all SONOFF devices are Matter-certified. However, you can still integrate non-Matter SONOFF Zigbee and Wi-Fi devices into Apple Home using Matter Bridge solutions.
Two Ways to Integrate Non-Matter Devices
Option 1: Software-Based Matter Bridge with eWeLink CUBE
. eWeLink CUBE is a free self-hosted local software that bridges eWeLink Wi-Fi and multi-brand Zigbee devices into the Matter network for Apple Home, SmartThings, Google Home, Alexa, and Home Assistant. With eWeLink CUBE, you can:1.Integrate SONOFF Zigbee devices using compatible Zigbee Dongles
2.Bridge non-Matter SONOFF Wi-Fi devices to Apple Home
3.Enable local automation and cross-platform control via Matter
Option 2: Plug-and-Play Matter-Certified Hardware
. Some SONOFF hardware products like ZBBridge-U, iHost and NSPanel Pro provide built-in Matter Bridge functionality, allowing non-Matter devices to be shared with Apple Home through a dedicated hub. These solutions offer a straightforward, plug-and-play experience and are suitable for users who prefer hardware-based integration.Troubleshooting
. Can't scan QR code? Find the QR code in the product Quick Guide. Use the numeric setup code (you can find it in the eWeLink App - Device Settings). Ensure your iPhone is running iOS 16.3 or later. Device not showing up in Home app? Confirm the device is in pairing mode (LED blinking) Make sure your device is connected to 2.4GHz Wi-Fi Restart the device and Home app, then try again. Apple Home says "Accessory Not Certified"? Make sure the device is officially labeled "Matter" and the firmware is up to date. FAQ
. Q: Can I use SONOFF Matter devices with Apple Home without a HomePod or Apple TV? A: No. To control Matter devices and enable automations in Apple Home, you need a Matter controller such as HomePod (mini or newer) or Apple TV 4K (2nd gen or newer). Q: Is SONOFF MINIR4M compatible with iOS Shortcuts and Scenes? A: Yes. Once added to Apple Home, you can use MINIR4M in any Shortcut, Scene, or automation routine. Q: Can I use the MINIR4M with other platforms too? A: Yes, if you enable multi-admin sharing, you can add the same device to platforms like Google Home, Home Assistant, or other Matter ecosystems. Q: Can I control the device remotely outside my home? A: Yes, but only if you have a Home Hub (HomePod or Apple TV) configured in your Apple Home. Without a hub, access" class="text-sky-600 dark:text-sky-400 font-medium hover:underline" title="Guides for remote access">remote access is not available. .Home Assistant + SONOFF Matter Device Setup Guide
Introduction
. SONOFF Matter-enabled devices allow you to build a seamless, local, and cross-platform smart home experience. While many Matter devices require Thread support, SONOFF offers Wi-Fi-based Matter devices that can connect directly to your network and be integrated with Home Assistant using the Matter integration—no Thread Border Router required.
This guide walks you through connecting SONOFF's Matter over Wi-Fi devices to Home Assistant using its built-in Matter protocol support.
—— Learn More about Matter
Preparation
. Before you begin, make sure you have the following ready:• Home Assistant OS (Make sure you have the latest version of Home Assistant installed).
• In Home Assistant, have the Matter integration installed. (Go to Settings > Devices & Services > Add Integration, and search for "Matter".)
• Home Assistant Companion App on your smartphone.
• Matter-certified device with a QR code or setup code.
• A stable 2.4GHz Wi-Fi network.
Setup Guide
Step 1: Power on Your SONOFF Matter Device
.1.Install and wire SONOFF M5 Matter
2.Power it on — the device enters the pairing mode by default when powered on for the first time, and the LED indicator flashes two short and one long.
Step 2: Add the Device in the Home Assistant App
.1.Open the Home Assistant app on your phone.
2.Go to Settings > Devices & Services.
3.Click Add Integration button, search Matter, then select Add Matter device.
4.Press and hold the M5 Matter button (usually 5–10 seconds) until the LED blinks rapidly to enter the pairing mode.
5.Scan the QR code of M5 Matter or select More options… to manually enter the Commission code.
6.Click Add to "Home Assistant" button.
SONOFF Matter Device List
. All SONOFF Matter devices listed below can be directly added to Home Assistant:| Category | Product Name |
| DIY Smart Switch | Smart Roller Shutter Switch | MINI-RBS |
| Wi-Fi Smart Switch (Dry Contact Relay) | MINI-D | |
| MINI Extreme Wi-Fi Smart Switch | MINIR4M | |
| Smart Wall Switch | SwitchMan Smart Wall Switch | M5 Matter |
Troubleshooting
. Device not found during pairing? Make sure the device is in pairing mode (LED blinking rapidly). Check that your Matter device is on the same 2.4GHz Wi-Fi network as Home Assistant. Reboot your router and Home Assistant if necessary. Matter Server not working? Ensure the Matter add-on is started in Home Assistant. Restart Home Assistant Core and try again. QR code missing or damaged? Find the QR code in the product Quick Guide. Use the numeric setup code (you can find it in the App - Device Settings). Device added but not responding? Check IP address and Wi-Fi strength. Restart the device or re-pair.FAQ
. Q: Do I need a Thread Border Router to use SONOFF Matter devices with Home Assistant? A: No. SONOFF Matter devices like MINIR4M and M5 Matter connect via Wi-Fi, so no Thread is required. Q: Is cloud required for Matter integration? A: No. Once paired with Home Assistant, Matter operates locally without any cloud dependency. Q: Can I control these devices with both Home Assistant and another platform? A: Yes, Matter supports multi-admin. After adding to Home Assistant, you can also share the device with Apple Home, Google Home, etc. (as long as the device supports it). Q: Can I add the same SONOFF Matter device to multiple controllers? A: Yes. Multi-admin pairing allows a single Matter device to be shared with multiple platforms like Home Assistant, Alexa, or Google Home. Q: Can I update the firmware of SONOFF Matter devices via Home Assistant? A: No, you should update it in the eWeLink App. . .
Topics:
#connect sonoff camera to home assistant
#home assistant camera automation
#home assistant camera configuration guide
#home assistant camera dashboard
#home assistant camera integration
#home assistant camera management
#home assistant security automation
#home assistant security camera setup
#home assistant smart camera guide
#home assistant smart security system
#home assistant sonoff camera tutorial
#home assistant surveillance camera
#home assistant video monitoring
#home assistant video surveillance
#how to integrate sonoff camera into home assistant
#sonoff camera add to home assistant
#sonoff camera advanced configuration.
#sonoff camera automation home assistant
#sonoff camera compatibility with home assistant
#sonoff camera configuration
#sonoff camera dashboard setup
#sonoff camera entity setup
#sonoff camera firmware setup
#sonoff camera home assistant addon
#sonoff camera home assistant setup
#sonoff camera home automation
#sonoff camera installation guide
#sonoff camera integration guide
#sonoff camera integration tutorial
#sonoff camera integration walkthrough
#sonoff camera live stream home assistant
#sonoff camera local streaming
#sonoff camera monitoring system
#sonoff camera motion detection
#sonoff camera mqtt integration
#sonoff camera network configuration
#sonoff camera onvif integration
#sonoff camera recording setup
#sonoff camera remote access
#sonoff camera rtsp setup
#sonoff camera rtsp stream
#sonoff camera setup for beginners
#sonoff camera setup step by step
#sonoff camera smart home integration
#sonoff camera smart surveillance
#sonoff camera streaming setup
#sonoff camera troubleshooting
#sonoff camera video feed
#sonoff camera yaml configuration
#sonoff smart camera setup
Did this security guide help you?
Rate this article to help fellow engineers find the best guides.
Written by
Alex Vance
Senior Security Systems Architect & IoT Consultant with over 15 years in digital surveillance design.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Leave a Comment