Getting CCTV feed into HA

If you right click on the image windows, can you open the link in a new tab and have it show the live image? If so, that might be the ticket - or at least a start.

when I right click I show this

but when I double click it will show the feed for the 1 channel where I was double clicked

1 Like

DO you get the same type of context menu when you click on the CAM8 screen?

You may have to dig into the source and see what URL it is displaying.

yes i get same menu. how can i check source to get url?

Depending on your browser, you should be able to right click in an area that DOESN’T have a camera feed and select View Page Source from the context menu. But then you’ll have to do some digging and that will require a bit of HTML knowledge.

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.