Getting CCTV feed into HA

Yeah tried that as well :frowning: What does ‘digest’ do for authentication?

camera:
  - platform: mjpeg
    mjpeg_url: http://<redacted>:<redacted>@192.168.1.80/mjpeg/stream.cgi?chn=0
    username: <redacted>
    password: <redacted>
    name: Garden

Digest Authentication communicates credentials in an encrypted form by applying a hash function to the the username, the password, a server supplied nonce value, the HTTP method, and the requested URI. Whereas Basic Authentication uses unencrypted base64 encoding.

You could try ffmpeg.

Yeah tried ffmpeg, same result. HTTPS and HTTP. It always just says ‘error loading image’. Must be doing something wrong but just can’t spot it.

I’ve been having issues with the video in the popup never working the thumb is fine though

I am wondering if it’s something to do with my Wansview cameras…but they fully support RTSP, ONVIF, MJPEG and everything works through the browser. Odd.

You might try running the wansview cameras through Blue Iris and then using the Blue Iris URLs instead; other users have reported this method works for wansview specifically.

Here’s a post on how to integrate Blue Iris with HA:

Thanks. I actually use SecuritySpy for my CCTV setup which works very well. I am trying to work out if I can pipe in a feed through this instead.

I am thinking this must be something wrong with my HA setup as all other methods work and display a feed fine.

Nah. I had an old TrendNet camera and it took me 5 months to figure out the right URL that would work. Now it’s in and working fine. IP/Wifi/security cameras are so fractional in their approach to presenting video streams it can take awhile and HA’s tools work but it would be a full time task trying to support them all as a plug and play component.

OK I can feed direct from SecuritySpy in my browser using

https://<username>:<password>@<IP>:8000/++video?cameraNum=1&width=640&height=360

But in HA still get the same error. Banging my head against the wall :slight_smile:

Try this:

camera:
  - platform: mjpeg
    mjpeg_url: https://<username>:<password>@<IP>:8000/++video?cameraNum=1&width=640&height=360
    name: [cameraname that shows up in HASS]
    username: [username]
    password: [password]
    authentication: basic
2 Likes

Bingo! You are a star. This worked, although I didn’t need my credentials in the URL.

Thanks :slight_smile:

1 Like

Yay for small victories!!

hi will you help me please, I have a 8 channel CCTV in which 7 of them is working… I can view it on my local network.

when i go to http://192.168.1.90 i see this

once i login i can view it it shows something like this

anyway i can see feed in Home assistant.?

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.