No, but if the only solution is using a 4Mpixel camera at 640x480 I’m returning it.
I find that 2nd stream is perfect for HA for me, I used theprimary stream only got recording via QVR on my NAS…
but since the last release there is a new Stream function in HA that works perfectly with Hik cameras
Camera streams for everyone
With this release we’re getting serious about cameras. @hunterjm has worked months on this and it’s finally ready for the first reveal. With the stream component, we will be able to forward streams from cameras in your house and repackage it into formats that your display devices understand. Previously, streaming cameras was limited to 2 frames per second and only in the frontend. For the first version we focused on the HLS format, which is supported by modern browsers and Chromecast. Each camera integration will need to be individually updated, for the first version we have only added support for the generic camera integration.
So what is possible now? You can start streaming your frontdoor feed on your TV when the doorbell rings or you can install a camera in the nursery and turn your Google Home Hub into a babymonitor.
To get started, add stream:
to your configuration.yaml, configure the generic cameraand start using the new camera.play_stream
service.
Thanks, how do I configure the generic camera to the new stream component?
put
stream:
into you config then create a camera to use it
- platform: generic
still_image_url: "http://xxxx:[email protected]:xxx/ISAPI/Streaming/channels/2/picture"
stream_source: "rtsp://xxxx:[email protected]:xxx"
authentication: digest
name: Front Garden stream
edit and i have been testing using the stream when the door bell is pressed
- alias: Doorbell_test
initial_state: 'on'
trigger:
platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0001a668c0
click_type: single
action:
- service: camera.play_stream
data:
entity_id: camera.front_garden_stream
media_player: media_player.43pus7303_12
Close. No preview image for the camera but I do get a live stream eventually. It’s delayed by about 12 seconds (probably a limitation of the pi).
- platform: generic
still_image_url: "http://myuser:[email protected]:80/ISAPI/Streaming/channels/2/picture"
stream_source: "rtsp://myuser:[email protected]:554"
authentication: digest
name: Rumpus Room
http://myuser:[email protected]:80/ISAPI/Streaming/channels/2/picture does show up in my browser, just not HA.
If I could get that to work I’d use the generic still image camera config. It works well for my Vivotek 5MP cameras (1 second updates full res).
I reckon you’re right. I saw a message when I was playing with URLs earlier about cgi not enabled. Stand by…
Hmm. Nope. Still no preview after enabling CGI and ONVIF.
I’ll try the onvif camera now though.
I also have the security settings set as digest/basic on both, cannot get a screen shot of that now
Bingo!
That was the problem. Thank you!
Final config:
- platform: generic
name: Rumpus
username: !secret camera_user2
password: !secret camera_password
authentication: digest
still_image_url: http://10.1.1.22:80/ISAPI/Streaming/channels/101/picture
Holly Mackrell this actually worked!
I’ve been looking for this for AGES!
THANK YOU!
Check also digest (see if there are other settings and change them on the camera settings).
Edit you found it. Yes I had that problem too some months ago, and solved that way
I was able to view my cameras with my DS-7216HQHI-K2 using the method by pepeEl; but after about one hour the stream stops and only resumes after I restart the NVR.
I’ve tried changing the password, restarting home assistant and the only thing that “works” so far is to restart the NVR untill another hour of continous streaming the transmision falls again.
I have this in my configuration.yaml and a simple picture glance
- platform: generic
still_image_url: http://*myusername*:*mypassword*@192.168.15.100/ISAPI/Streaming/channels/102/picture
name: Cochera Afuera
username: myusername
password: !secret camera_password
authentication: digest
I had this same sort of problem after I added some newer hikvision cameras. The newer cameras (firmware version?) wouldn’t support “Basic” authentication and required “digest”. This was pretty confusion when I cloned the configuration I had for 3 other Hikvision cameras and it wasn’t working…
Hi guys…so I’ve just updated to 91.2 and thought i’d give the stream component a go.
I have a Hikvision NVR model DS-7604NI-K1 / 4P(B) running firmware V3.4.100 build 180310 and a camera model DS-2CD2345FWD-I running firmware V5.5.80 build 180911.
I’ve enabled basic/digest on both the NVR and the camera and also enabled Onvif and the Hik CGI auth on the camera itself.
I’ve added the below to my config yaml…
ffmpeg:
stream:
camera:
- platform: generic
name: Drive
username: admin
password: password
authentication: digest
still_image_url: http://192.168.0.196:80/ISAPI/Streaming/channels/101/picture
stream_source: rtsp://admin:[email protected]:554/Streaming/Channels/101
The still image works fine…seems to update every second or so, but when I try to load the stream, it just “tries to load” constantly but never produces an image.
Looking in the logs i get a “PPS id out of range: 0” message, with the ID number changing.
Also, when i try the RTSP url in VLC, whilst it doesn’t complain about authentication, but it also doesn’t load the stream.
Does anyone have any ideas?
I’ve seen somewhere that the “verification code” might be causing an issue and i might have to disable the camera encryption?
Those of you who have this working, can you confirm if you’re using a verification code within the Hik system and apps etc. and whether this works with HA or not please?
Thanks for any help in advance.
If using VLC on Windows, make sure your firewall has port 554 enabled…
Here is a a how to video, showing VLC accessing NVR:
I have the same problem. Were you able to resolve?
that`s because you are using rtsp://username:password@host when you already have them configured higher up …
delete the user:pass after rtsp
Mine works, all camera are activated with verification code done. Will check if my code differ from yours.
I use camera IP directly not the NVR
Yea!! Works for me too. The “authentication: digest” line is crucial.