Getting CCTV feed into HA

hi i change this link http://192.168.1.90/view2.html to http://192.168.1.90/view4.html now link and view changes it shows just one feed and link will be like this http://192.168.1.90/view4.html?cmd=1&chn=3&aud=0&u=xxxx&p=xxxx&rnd=0.42080124078660797

You could try using this as the URL in the generic MJPEG camera component.

tried this but no luck

camera:
  - platform: mjpeg
    mjpeg_url: http://192.168.1.90/view4.html?cmd=1&chn=3&aud=0&u=xxx&p=xxx&rnd=0.42080124078660797
    name: door_camera
camera:
  - platform: mjpeg
    mjpeg_url: http://192.168.1.90/view4.html?cmd=1&chn=3&aud=0&u=xxx&p=xxx&rnd=0.42080124078660797
    name: door_camera
    username: xxxx
    password: xxx

The only other thing I could suggest is that when I am looking for a direct URL to use in HA for either myself or someone here, the first place I go to is iSpy: https://www.ispyconnect.com/sources.aspx as they have a database of direct URLS for cameras. If your cameras are accessible directly, you’ll probably find them in there.

What is the web UI that we’re looking at in your screen shots? Might help me to know that. Maybe someone has already integrated it somewhere.

1 Like

my dvr is called Xmedia and i could not find it in https://www.ispyconnect.com/sources.aspx

i found this link http://yyy:[email protected]:80/cgi-bin/view.cgi?chn=8&u=yyy&p=xxxx works on vlc network protocal but its not working i try in browser…even tried with ha no luck

camera:
  - platform: mjpeg
    mjpeg_url: http://yyy:[email protected]:80/cgi-bin/view.cgi?chn=8&u=yyy&p=xxxx
    name: door_camera
camera:
  - platform: mjpeg
    mjpeg_url: http://yyy:[email protected]:80/cgi-bin/view.cgi?chn=8&u=yyy&p=xxxx
    name: door_camera
    username: yyy
    password: xxxx

If it works on VLC it may be something you can set up with FFMPEG to catch the stream.

Unfortunately, I don’t have a lot of experience with FFMPEG so you’d have to do some research on it in the forums. Others use it regularly though. In short, you install FFMPEG and then route the stream through it, which converts it into something that the HA FFMPEG component then uses to display as a camera.

hi thanks for your help I was able to it through ispy
followed this

I need little more help I have home assistant setup in office and home… in HA office I have set up for CCTV feeding is it possible to get that feed in HA which is at home?

1 Like

Another SecuritySpy user here! Trying to get this set up myself.

Do you know if the mjpeg stream is constantly running in the background, or just when you call it up in HASS… I’m thinking there could be a lot of strain on my network here?

Do you also know of a way to capture a still image from the cameras so you could ping it as a push notification?

Sorry for the late reply. My CCTV feed from SS is just a static picture that is refreshed every 10 seconds or so. All it really does it display the image on my HA web page.

Trying to do the same thing with a Swann 8 cam DVR seem I’ll never buy a Swann setup again grrr
Have had no luck so far going Down the Ispy way see if that might work

Anyone ever figure this out?

Just wondering if you have had any luck accessing your swann dvr through HA? I have been looking at ways to integrate my DVR8-4600 but just can’t find enough information anywhere…

Have you tried rtsp?

Yes, but I was able to get the url using wireshark, do I need to open the port or something? I use swannview link app to view the stream at the moment. Please let me know if you have managed to find any online documentation

Do you just want to display it on the front page of HA? You would have to install ffpmeg (https://www.home-assistant.io/components/ffmpeg/) then put this in your configuration.yaml:

ffmpeg:
ffmpeg_bin: /usr/bin/ffmpeg

camera:

  • name: frontlawn
    platform: ffmpeg
    input: rtsp://192.168.1.196:554/ch04/1 (RTSP URL from Swann)
    extra_arguments: ‘-pred 1 -q:v 2’

In the lovelace interface, you can just have a card with the camera.frontlawn and you should be good.

Thanks, sorry there was a typo with my previous post, I was unable to get the url using wireshark to get this working on vlc and my dvr network setting doesn’t have the rtsp tab either (Build no. 1509080), under port setting all I can see is the Media Port:9000 and HTTP Port: 85, so I’m not sure how do I get the RTSP URL from swann. All I’m looking to do is display the camera on HA so that I don’t have to open the swanview link app which is bit slow.

See if it is here: http://www.ispyconnect.com/man.aspx?n=swann

No, my model is DVR8-4600

camera:

change admin if you have other username and change the number in chn=2& for what channel you want to use , got it working in Hass

I’ve made PoC for getting DVR with RTSP streams directly into HA with best quality. Are you interested?

1 Like