gr4z
(gr4z)
February 26, 2017, 10:22am
1
Hi guys
This is driving me nuts. I am trying to get my Wansview CCTV cameras to either feed a live video via ffmpeg or RTSP or still JPGs into HA. Whatever option I use just errors in the HA console ‘error loading image’. I have tried the Generic IP camera and ffmpeg all error out.
I can view the feeds/JPG from my browser fine.
I have tried the following for stills:
camera:
- platform: generic
still_image_url: http://192.168.1.80/mjpeg/snap.cgi
name: Garden
username: <redacted>
password: <redacted>
For video (after installing avconv):
camera:
- platform: ffmpeg
mjpeg_url: http://192.168.1.80/mjpeg/videostream.cgi?chn=0&user=<redacted>&pwd=<redacted>
name: Garden
username: <redacted>
password: <redacted>
Can anyone help as this is driving me nuts as I must be doing something wrong?
Thanks
MarkR
February 26, 2017, 11:56am
2
do you have a mjpeg.jpg feed from it? mine has below and it produced a live feed
camera:
- platform: mjpeg
mjpeg_url: http://192.168.0.200:8150/live/1/mjpeg.jpg
name: Front Door
gr4z
(gr4z)
February 26, 2017, 12:48pm
3
Yep I can use Chrome and go to
http://<user>:<password>@192.168.1.80/mjpeg/snap.cgi
This shows a still from the camera.
Add this to my config and still the same
camera:
- platform: mjpeg
mjpeg_url: http://192.168.1.80/mjpeg/snap.cgi
name: Garden
Also tried this which works fine in a browser and produces a video stream:
camera:
- platform: mjpeg
mjpeg_url: http://192.168.1.80/mjpeg/stream.cgi?chn=0
name: Garden
Still the same. Error loading image.
rpitera
(Robert Pitera)
February 26, 2017, 3:27pm
4
Have you tried adding the username:password@ to your mjpeg_url: jsut like you have it in your browser?
I do the same thing with my foscams and also add the authentication type.
- platform: mjpeg
mjpeg_url: http://192.168.1.13/videostream.cgi?user=READACTED&pwd=REDACTED
authentication: digest
name: rear facing controllable
username: !secret cam_user
password: !secret cam_password
gr4z
(gr4z)
February 27, 2017, 8:31am
5
Yeah tried that as well 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
rpitera
(Robert Pitera)
February 27, 2017, 12:46pm
6
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.
gr4z
(gr4z)
March 1, 2017, 8:24am
7
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.
Stewface
(Stewart)
March 1, 2017, 8:34am
8
I’ve been having issues with the video in the popup never working the thumb is fine though
gr4z
(gr4z)
March 1, 2017, 8:36am
9
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.
rpitera
(Robert Pitera)
March 1, 2017, 3:12pm
10
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:
If you want to add a Blueiris camera to HASS;
Use the MJpeg camera:
camera:
- platform: mjpeg
mjpeg_url: http://[BlueirisserverIP]:[Blueirisserverport]/mjpg/[shortname]
name: [cameraname that shows up in HASS]
username: [username]
password: [password]
authentication: basic
Shortname is the short name of the camera you have set for the camera in blue iris (general properties of the camera, shortname). Remove all [] after adding your details.
gr4z
(gr4z)
March 2, 2017, 1:15pm
11
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.
rpitera
(Robert Pitera)
March 2, 2017, 1:33pm
12
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.
gr4z
(gr4z)
March 2, 2017, 2:53pm
13
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
rpitera
(Robert Pitera)
March 2, 2017, 2:59pm
14
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
gr4z
(gr4z)
March 2, 2017, 3:37pm
15
Bingo! You are a star. This worked, although I didn’t need my credentials in the URL.
Thanks
1 Like
rpitera
(Robert Pitera)
March 2, 2017, 6:28pm
16
Yay for small victories!!
ashfaaaa
(Ashfaaaa)
May 2, 2017, 8:17am
17
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.?
rpitera
(Robert Pitera)
May 2, 2017, 1:15pm
18
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.
ashfaaaa
(Ashfaaaa)
May 2, 2017, 1:34pm
19
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
rpitera
(Robert Pitera)
May 2, 2017, 1:35pm
20
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.