Swann DVR CCTV systems and HA

Apologies if this is in the wrong section, i wasnt sure if it counted as hardware, or configuration, but figured that configuration was closest, anyway, here goes…

4 days ago i setup HA for the first time ever, and have been reading ever since. I already have a few smart speakers, sockets, bulbs, door sensors, temp sensors, routines all setup, so this seems like the next natural step

one thing i just couldnt seem to find though, was how to implement my cctv cameras into it. ive read every thread that mentions swann on this forum, and many others, and all seem to either speak of NVR and IP based cameras, or simply have no replies

So, i figured that id have to work it out myself. Time to open a beer (or 3)

Anyway, after a bit of messing about, its actually quite simple. First off, you need to build a link to the stream from each of your cameras, this is done in the following way

rtsp://[DVR username]:[DVR password]@[DVR IP Address]:554/[camera channel]/[0{for HD} or 1{for SD}]

So, for example, the links to a 4 camera system, assuming that your DVR IP address is 192.168.0.5, and the login details are username - admin, and password - password, would be as follows

rtsp://admin:[email protected]:554/ch01/0
rtsp://admin:[email protected]:554/ch02/0
rtsp://admin:[email protected]:554/ch03/0
rtsp://admin:[email protected]:554/ch04/0

this will connect to the HD stream. To connect to the SD stream, change the last /0 for /1

To add these to your HA, enter the following into your configuration.yaml file

camera:
  - platform: ffmpeg
    name: CCTV cam 01
    input: rtsp://admin:[email protected]:554/ch01/0

camera 2:
  - platform: ffmpeg
    name: CCTV cam 02
    input: rtsp://admin:[email protected]:554/ch02/0

camera 3:
  - platform: ffmpeg
    name: CCTV cam 03
    input: rtsp://admin:[email protected]:554/ch03/0

camera 4:
  - platform: ffmpeg
    name: CCTV cam 04
    input: rtsp://admin:[email protected]:554/ch04/0

restart HA (click the check config button first to ensure no mistakes)

to add them to your dashboard, click the ‘edit dashboard’ button, then the + button
select the ‘Picture entity’ card
Click ‘Entity’ and find your new CCTV cameras in the list, and select one
delete the text in ‘image path’
turn off the ‘show name’ and ‘show state’ buttons
save

repeat for the other 3 cameras

hope this helps someone out there :slight_smile:

dd

20 Likes

Thanks for the concise guide!

This may be a dumb question, but is this still running even when not looking at it? ie will my network traffic be transferring data 24hrs a day between the DVR and HA when I am not logged on?

from what i can see ( im a total noob to HA, i only installed it on friday, and it took me 2 days to work out how to install HACS {dont ask, it was a / instead of an \ , but hey ho lol}), it looks like the initial ‘view’ on the dashboard, is a still image, called at the time of the page refreshing, if i watch the time on the image, it doesnt change, but, as soon as i click on the image, it then opens a new window, and starts streaming the video

This may be totally wrong, but, the screenshot i took for the original post, my HA window is still on the exact same time on each of the camera views

I am totally new to HA and trying to learn. I tried a couple times to add your suggested code to my configuration.yaml file. The first time didn’t work, but a fresh install and now it works very well. I assume that means I did something wrong.

Thank you for your contribution.

Do you know if the same setup would work to add Swann IP cameras as well?

Brilliant! Stumbled over this last night, and got it up and working in 10 mins! THANKS!

1 Like

Excellent, thank you.

I had this working, but (coincidentally?) when I setup my nest doorbell I lost the ability to have a thumbnail for the Swann. Can we force the address lookup for the thumbnail?

EDIT: fixed with the camera_view: live option in the picture entity card config.

Hi, Thanks for this guide, I got the camera up and running in the HA however all I get is below sometimes it loads but even then its like a still image rather then a video, it seems to refresh every 10 sec or so. Is there something wrong with the setup?

on the card u will need to put some thing like this:

            camera_image: camera.garage_camera
            title: Garage
            camera_view: live
1 Like

Hi this really helped thank you but my cameras are behind by 10 seconds or so, did u find any fix for this?

Removing the stream: integration from HA will fix the lag. (it’s enabled if you use the default_config: integration)

sorry for the dumb question where is that im really new to HA, this is my cameras setup in conf.yaml

camera:
  - platform: ffmpeg
    name: CCTV cam 01
    input: rtsp://user:[email protected]:554/ch01/1

camera 2:
  - platform: ffmpeg
    name: CCTV cam 02
    input: rtsp://user:[email protected]:554/ch02/1

the actual picture entity on my home screen is

type: picture-entity
entity: camera.cctv_cam_01
name: Camera 1
camera_view: live
show_state: false
show_name: false
1 Like

default_config: will be in your configuration.yaml file. The only way to remove the stream: component is to remove the default config integration and manually add back all the individual integrations which are within it, other than stream:

I dont see stream amongst any of these


so do i just remove default config and add everything on that list? but im just wondering how this works cause i dont see stream anywhere

Sorry, my bad. I could have sworn that stream was in the default config. Obviously not. Do you have stream: in your config somewhere then? If so, try removing it as I know that causes video lag.

No I don’t have it in my config, thanks for the help so far. Still cant resolve it.

Hi, is this still working? ive just given it a try and all I get is a white screen, if I click on that I get a black screen… if I enter the url into VLC i can see the camera feed (once Ive entered my username and password)

Ive no idea what I am doing wrong…

in my config.yaml I have

camera:
  - platform: ffmpeg
    name: CCTV cam 01
    input: rtsp://username:[email protected]:554/ch01/0

on the card in the UI I have

type: picture-entity
entity: camera.cctv_cam_01
camera_view: live
show_state: false
show_name: true

I’ve also checked my Config.yaml file and I have no mention of stream: anywhere.

any help would be greatly appretiated,

Thank you

Heres the code from my card UI

type: picture-entity
entity: camera.cctv_side
show_name: false
show_state: false
1 Like

Hi @Rdoull - did you get this working? I’ve got exactly the same behaviour.

Hi, I found that it works via the android app just not in Google chrome on Windows. I’ve no idea why but I only really use it for notifications to my phone so I stopped looking into it.

Thanks. I’ve just noticed similar - works on iOS. Will try other browsers.