Skip to content

How to integrate an Onvif camera with Home Assistant

When we start a connected home project, one of the most popular devices that most users implement is a smart camera to monitor an area of their home or garden.

There are many solutions on the market, but we’re going to look at one that I find very interesting, namely a smart camera compatible with Tuya Smart Life and incorporating the Onvif protocol. And thanks to this Onvif protocol, we’ll be able to use this type of camera with the Home Assistant home automation hub.

How to integrate an Onvif camera with Home Assistant
Index

    Why use an Onvif camera with Home Assistant?

    Home Assistant is currently one of the most popular solutions for creating a smart home.

    How to integrate an Onvif camera with Home Assistant

    You have infinite compatibilities with Home Assistant and we’ve already seen in other content how to get started with the Home Assistant Green home automation hub and Zigbee technology to unify our installation with different smart devices that will allow us to control the heating, lights, watering, electric gate, swimming pool and much more.

    How to integrate an Onvif camera with Home Assistant

    Let’s now look at how to integrate the cameras.

    How to integrate an Onvif camera with Home Assistant

    The Onvif protocol, which stands for Open Network Video Interface Forum, is, as its name suggests, a communication protocol open to different brands and manufacturers, enabling an installation to be unified with the various IP cameras on the market.

    How to integrate an Onvif camera with Home Assistant

    In my example, I’ll be using two smart cameras from the Tuya Smart Life ecosystem, an outdoor camera from Immax and an indoor camera from Nous.

    How to integrate an Onvif camera with Home Assistant

    These are very economical smart cameras, and we have access to multiple functions, as we’ll see below.

    How to integrate an Onvif camera with Home Assistant

    And although we can use these cameras with the Smart Life application, if we have a smart home with Home Assistant, it’s interesting to be able to bring everything together in a single interface, and to do that we’re going to take advantage of these cameras’ Onvif communication protocol.

    How to integrate an Onvif camera with Home Assistant

    Very important: not all cameras incorporate this Onvif protocol.

    How to integrate an Onvif camera with Home Assistant

    Before you buy, you need to check that your camera includes Onvif so that you can use it with Home Assistant.

    How to integrate an Onvif camera with Home Assistant

    How to integrate an Onvif camera with Home Assistant

    Let’s now look at how to integrate each Onvif camera with Home Assistant.

    How to integrate an Onvif camera with Home Assistant

    Camera integration with Smart Life

    The first thing to do is download the Smart Life application and log in.

    How to integrate an Onvif camera with Home Assistant

    Let’s add a new feature.

    How to integrate an Onvif camera with Home Assistant

    And look for the type of camera we want to integrate.

    How to integrate an Onvif camera with Home Assistant

    First of all, if we want to add our Immax WIFI camera, we need to plug it into the mains.

    How to integrate an Onvif camera with Home Assistant

    After a few seconds, we’ll be able to scan the QR code for the Smart Life application in front of our camera.

    How to integrate an Onvif camera with Home Assistant

    If you have scanned correctly, your camera should emit an audio message indicating that it has been able to connect, and you will be able to confirm this in your Smart Life application.

    How to integrate an Onvif camera with Home Assistant

    Ready, you’ve got your camera connected to the Smart Life app, so you can see the image in real time and, in the case of the Immax outdoor camera, it has a dual lens, one fixed and one rotating, which you can move from the Smart Life app.

    How to integrate an Onvif camera with Home Assistant

    This camera has two-way audio, a light that you can activate, a siren and other extra features, making it an attractive option given its value for money.

    How to integrate an Onvif camera with Home Assistant

    To use this camera with Home Assistant, go to the settings in the top right-hand corner.

    How to integrate an Onvif camera with Home Assistant

    Go to “Onvif”.

    How to integrate an Onvif camera with Home Assistant

    And we activate this option.

    How to integrate an Onvif camera with Home Assistant

    The process will be similar with every smart camera that incorporates this “Onvif” option, so we’re going to integrate our second camera, in this case an indoor WIFI camera Nous.

    How to integrate an Onvif camera with Home Assistant

    We follow the same steps, i.e. from the Smart Life application, we click on “Add a device”.

    How to integrate an Onvif camera with Home Assistant

    And we’re looking to add our camera.

    How to integrate an Onvif camera with Home Assistant

    We connect this camera to the power supply and wait a few seconds for our camera to start up.

    How to integrate an Onvif camera with Home Assistant

    And scan the QR code.

    How to integrate an Onvif camera with Home Assistant

    Ready, after a few seconds, we have our Tuya Nous camera integrated into our Smart Life app and we have access to various settings such as two-way audio so we can talk to the camera from our phone and listen to what’s going on around our camera.

    How to integrate an Onvif camera with Home Assistant

    This camera can also be rotated and has additional functions.

    How to integrate an Onvif camera with Home Assistant

    Go to your settings to activate the Onvif protocol.

    How to integrate an Onvif camera with Home Assistant

    And when we do, we have to enter a password and, of course, I recommend a secure password.

    How to integrate an Onvif camera with Home Assistant

    Integration of every Onvif camera with Home Assistant

    Now that we have our smart cameras with the Onvif option enabled, we’ll be able to integrate each Onvif camera with Home Assistant.

    How to integrate an Onvif camera with Home Assistant

    But first, let’s access our Internet router’s interface. In my case, I have the French operator Bouygues Telecom and I searched the Internet to find out how to access its interface, so I invite you to do the same.

    How to integrate an Onvif camera with Home Assistant

    In this interface, we will see the configurations of our cameras, such as their IP addresses.

    How to integrate an Onvif camera with Home Assistant

    I recommend that you fix these IP addresses so that they don’t change over time.

    How to integrate an Onvif camera with Home Assistant

    We can also take the opportunity to identify them with a more specific name.

    How to integrate an Onvif camera with Home Assistant

    One detail I’ve already mentioned in other content is that, as you’ve seen, these smart cameras are connected to the 2.4 GHz WIFI network, so you need to have this network activated to be able to use these devices.

    How to integrate an Onvif camera with Home Assistant

    We now move on to the local Home Assistant interface.

    How to integrate an Onvif camera with Home Assistant

    Go to “Settings”, “Devices and services”.

    How to integrate an Onvif camera with Home Assistant

    “Add an integration”.

    How to integrate an Onvif camera with Home Assistant

    And search for “Onvif”. Another quicker way is to add this integration from the official Home Assistant website, by clicking on “Add integration to my Home Assistant”.

    How to integrate an Onvif camera with Home Assistant

    A pop-up window appears to search for Onvif cameras and click on “Send”.

    How to integrate an Onvif camera with Home Assistant

    In our case, we’ll need to fill in the information about our cameras manually.

    How to integrate an Onvif camera with Home Assistant

    We start with the Immax outdoor camera.

    How to integrate an Onvif camera with Home Assistant

    We enter a name and its IP address, which we have found in our router’s interface.

    How to integrate an Onvif camera with Home Assistant

    The manufacturer has told me that the port for this camera is 8899, that the user name is admin and that there is no password.

    I recommend that you contact the manufacturer if you require this information and it is not included in the instruction manual.

    How to integrate an Onvif camera with Home Assistant

    We click on “Send” and a message appears indicating that the camera has been successfully integrated. We can place it in an area of our home and that’s it, we’ve got our camera integrated with Home Assistant.

    How to integrate an Onvif camera with Home Assistant

    Now go back to “Onvif” and click on “Add an entry”.

    How to integrate an Onvif camera with Home Assistant

    We followed the same steps to integrate our second camera, the Nous indoor camera.

    How to integrate an Onvif camera with Home Assistant

    This time it was recognised automatically.

    How to integrate an Onvif camera with Home Assistant

    So we’ve already entered its IP address and port, which in this case is 10,000.

    How to integrate an Onvif camera with Home Assistant

    We can change its default name and we need to fill in the user name, which is admin, and the password that we previously configured in your camera’s Onvif settings from the Smart Life application.

    How to integrate an Onvif camera with Home Assistant

    The camera is now integrated into Home Assistant.

    How to integrate an Onvif camera with Home Assistant

    We can now see the images from our cameras from Home Assistant, even if they are different brands, because they use the Onvif protocol.

    How to integrate an Onvif camera with Home Assistant

    We can open the camera window to see the images in full size and, as you can see with the Immax camera, as it is a dual camera, we have 2 images.

    How to integrate an Onvif camera with Home Assistant

    There’s a 4 to 5 second delay between what’s happening in front of your camera and what you’ll see on your Home Assistant interface.

    The actions of these cameras are very limited in Home Assistant; if you want to use the siren, light, rotate the camera and any other settings, you need to access the Smart Life application, as these settings are not available with Onvif communication.

    How to integrate an Onvif camera with Home Assistant

    But there’s an interesting option called ‘Picture in Picture’, which allows us to have a window floating above other windows so that we can keep an eye on one area of our home and, at the same time, be able to carry out other tasks on our computer.

    How to integrate an Onvif camera with Home Assistant

    We can move this window at any time and continue to browse other pages on our computer.

    How to integrate an Onvif camera with Home Assistant

    And another very interesting detail about this solution is that in the event of an Internet outage, as I’m going to simulate the disconnection of the red Ethernet cable that corresponds to the WAN connection in my router, even if I don’t have Internet access and I don’t have access to my cameras from the Smart Life application, as I have Home Assistant running locally and my cameras via Onvif, I still have control of these cameras locally.

    How to integrate an Onvif camera with Home Assistant

    And of course, as well as connecting your entire installation to Home Assistant so that your smart home can function even if you don’t have an Internet connection, you can also take advantage of the opportunity to carry out different automations where several smart devices interact together.

    How to integrate an Onvif camera with Home Assistant

    Buy your Onvif cameras and Home Assistant Green hub now