Integrating Hanwha Vision (Wisenet) Cameras with Home Assistant
Connecting your Hanwha Vision (formerly known as Hanwha Techwin, Wisenet, or Samsung) cameras into Home Assistant can elevate your smart home security. You can create powerful automations based on motion detection, view live feeds in your dashboards, and centralise your device controls. The key to this integration is the ONVIF protocol, a universal standard for IP cameras.
This guide will walk you through the essential steps to get your Hanwha cameras connected and troubleshoot common problems like connection failures and missing video streams.
Pre-requisite: Enable ONVIF on Your Hanwha Camera
Before you even open Home Assistant, you must configure your camera to allow ONVIF connections.
- Log in to your Camera's Web Interface: Find your camera's IP address and enter it into a web browser. Log in using your admin credentials.
- Navigate to ONVIF Settings: The exact location can vary slightly depending on firmware, but it is typically found under Network > ONVIF.
- Enable ONVIF: There will be a master checkbox to enable the ONVIF protocol. Make sure this is ticked.
- Create an ONVIF User: This is a critical step. For security, you must create a specific user for ONVIF connections. Do not use the main 'admin' account.
- Click the 'Add' button in the user section.
- Create a new username (e.g., 'homeassistant').
- Create a strong, unique password.
- Set the user level to 'Operator' or 'User'. This gives Home Assistant rights to view video and see events, but not change critical camera settings.
- Save your changes. The camera may need to reboot.
Adding Your Camera to Home Assistant
Once ONVIF is enabled on the camera, the process in Home Assistant is straightforward.
- Navigate to Settings > Devices & Services.
- Home Assistant may have already discovered the camera on your network. If so, you can click 'Configure' on the discovered device.
- If not, click 'Add Integration' and search for 'ONVIF'.
- The system will prompt for connection details. If the camera was not auto-discovered, you will need to enter the IP address.
- It will then ask for the ONVIF username and password you created in the previous step. Enter them carefully.
- If successful, the integration will be added, and you will see your camera device with its associated entities.
Troubleshooting Common Integration Problems
'Failed to Connect' or 'Authentication Failed'
If Home Assistant fails to connect, go back and double-check these points:
- ONVIF Enabled: Are you certain you enabled the main ONVIF toggle on the camera?
- Correct Credentials: Did you enter the specific ONVIF user's credentials, not the admin credentials? Check for typos.
- Network Issues: Is the camera on the same local network as your Home Assistant instance? If you use VLANs, ensure there is a firewall rule allowing communication on port 80 and the ONVIF port (often 554 or 8000).
Video Stream is Black or Not Loading
This is a common issue that usually relates to the stream profile configuration.
- Select the Correct Profile: In Home Assistant, go to the ONVIF integration's configuration options. You should see a dropdown to select the video profile. Hanwha cameras often have multiple profiles (e.g., for high-res, low-res). Try switching to a different profile.
- Check Camera-Side Configuration: Log back into the camera's web UI. Go to Video & Audio settings. Ensure that the profiles are enabled and configured with a compatible video codec, such as H.264. Home Assistant can sometimes have issues with H.265 streams depending on your hardware and setup.
- RTSP URL: As a last resort, you can use the generic 'Generic Camera' integration in Home Assistant and manually enter the camera's RTSP stream URL, but the ONVIF method is strongly preferred as it also provides sensor data.
Motion Detection Sensor Not Working
The ONVIF integration should create a binary_sensor for motion detection. If it's not working:
- Enable Motion Detection on Camera: In the camera's web UI, go to the Event settings. You must set up and enable a Motion Detection zone. If motion detection is turned off on the camera itself, it has no events to send to Home Assistant.
- Check ONVIF Subscriptions: Ensure that the ONVIF user has the rights to access event information. The 'Operator' role should be sufficient.
By following these steps, you can successfully integrate your high-quality Hanwha Vision cameras with Home Assistant and build a more robust and automated security system.