Yea!! Works for me too. The “authentication: digest” line is crucial.
Glad it worked
This is what I did to resolve the problem: https://community.home-assistant.io/t/stream-component-confirmed-cameras-and-configurations/106729?u=skillet
Having problems getting the stream working, read all through this thread running through the various options and set the CGI and ONVIF on, made sure digest/basic is set. Sub-stream set to:
The regular snapshot updates ok but if I click to get the stream, I get about 15-60 seconds before the stream stops and hassio appears to have frozen. I then have to resort to hassio cli to restart hassio.
Im running on a NUC with hassio in Proxmox and when I look at the summary screen in proxmox not a lot happens at the point.
Any thought please on this or what I can check going forward
I finally got around to spending some time on this again…
I think my original NVR config had a few settings which prevented this stream component from working…in the end, i changed the below:
-
All camera substreams are now set to use H264 (previously they were H265, as are the primary streams, but I’ve left the primary as 265 as i decided not to use the higher res for this anyway)
-
i disabled “encryption” from the “console” of the nvr, i.e. with a monitor plugged directly into it i went to configuration, network and unchecked “encryption”. Prior to doing this, whilst the above 264 change made the RTSP url work to some extent in VLC (it was a green pixelated image), removing encryption made the stream show properly.
-
i had to use port 554 at the NVR…
The full HA config i am using personally is…
- platform: generic
name: Drive
username: username
password: password
authentication: digest
still_image_url: http://192.168.0.196:80/ISAPI/Streaming/channels/101/picture
stream_source: rtsp://username:[email protected]:554/Streaming/channels/102
I found that the port for the rtsp stream using the NVR as the actual source of the stream requires 554 (as you’d expect), however from what i can tell, if you (like i do) use the built in nvr poe ports, you can potentially also use the NVR routed option by using ports 65001, 65002 and so on, but this didn’t work for me, although i read reports of it working for others, where 554 did not…
Also, where some are saying the credentials above outside of the rtsp URL don’t need to be there, they are required for the still image and the credentials in the rtsp URL are clearly needed for that connection directly.
Hope this helps some of you anyway.
this is the ony thing that works for me after multiple trial and errors. i can view on desktop, and android tablet, with firefox. but i still cannot get it working on Android phone with chrome nor firefox. is there a trick?
ffmpeg:
stream:
camera:
camera:
- platform: mjpeg
still_image_url: http://192.168.1.149/ISAPI/Streaming/channels/101/picture
mjpeg_url: http://192.168.1.149/Streaming/Channels/2/preview
name: living_door
username: admin
password: my_pass
verify_ssl: false
authentication: basic
Are you sure about this? It only works for me with user:pass in the stream url, and looking at the code, it doesn’t look like the user and password combination is being added to the url automatically.
same for me… 401
this in one of mine
- platform: mjpeg
mjpeg_url: http://axxx:[email protected]:8162/Streaming/channels/102/httppreview
name: Front Door
- platform: generic
still_image_url: "http://xx:[email protected]:8162/ISAPI/Streaming/channels/2/picture"
stream_source: "rtsp://xx:[email protected]:554/Streaming/Channels/103"
authentication: digest
name: Front Door stream
Thanks but 401 is not for video streaming but for Hikvision Camera Switch.
hi
i have an ezviz cb6
not problem from straming and i find the correct for picture:
- platform: generic
still_image_url: “http://192.168.188.24/onvif/snapshot”
stream_source: “rtsp://admin:[email protected]/Streaming/Channels/101”
name: Ingresso
authentication: “digest”
but i cant configure hikvision switch and binary sensor…
binary_sensor: - platform: hikvision
host: 192.168.188.24
username: admin
password: camera_psw
switch: - platform: hikvisioncam
host: 192.168.188.24
username: admin
password: camera_psw
error on log:
1:
status_code 405
11:58 components/hikvisioncam/switch.py (ERROR) - il messaggio si è verificato per la prima volta alle 11:52 e compare 14 volte
2:
There was an error connecting to http://192.168.188.24:80/MotionDetection/1/
11:58 components/hikvisioncam/switch.py (ERROR) - il messaggio si è verificato per la prima volta alle 11:52 e compare 13 volte
some help ?
I’m going to try my existing Hikvision NVR, but I wonder if you all think it’s worth it. I could ditch it and go to a Blue Iris, ZoneMinder, etc. solution.
Of course this discussion is only relevant to the extent that Hikvision or the others work with HA. I can live with any of those NVRs for the NVR function, but I’m interested in good integration that works.
Thanks,
Ambi
I have a hik nvr and 5 hik cameras. Everything works perfectly in HA. You don’t even add the nvr into hik there is no need. Just use the camera directly. I have binary sensors and streaming video all working well
Cool, and you’re passing thru via the 65000’s ports or your HA setup is on the same subnet as the cams?
Tnx,
Ambi
Ah I do have a separate poe switch as it was a pain trying to use the nvr internal switch. You can pick them up fairly cheaply. Even cheaper from aliexpress
Do anybody know how to stream channel zero (0).
- platform: generic
still_image_url: http://192.168.1.80:65001/ISAPI/Streaming/channels/1/picture
name: Dvorišče
username: admin
password: ******
authentication: digest
Normal camery streming is working. Also motion sensor is working normaly and NVR status.
But I can not figure out how to show channel zero, in Hik-Connect all is working, only in HA I have problem with that…
Slightly OT how do you do Motion Detection? Since there is no mask, I get too many false positive
I’m using default NVR settings… nothing changed… so - motion is detected normally… some false positive, but not many - depence of where you put camera and which camera you have…
Could you resolve your 401 Problem? I am experiencing the same…
Same problem here, and too me it seems like a HA problem. (running :stable in docker on a nuc)
I’m am no RTSP expert (although a SIP one, which is similar), and HA simply isnt continuing with the digest authentication for some reason
VLC and HA gets the same nice 401, with an www-auth header, and the client should be responding with a
Authorization: Digest username="", realm="IP Camera(D7256)", nonce="91370abeeb112aabe855298378b1b9ed", uri="rtsp://10.9.24.132:554/Streaming/channels/101", response="9234bcea76a3fb9c04e4cf7eb2d42c02"\r\n
But for some reason it doesnt
Anyone else has this working then? With digest-auth?
TQ