Need help with Hik Camera in HA

I have a Hikvision NVR with several cams.
in HA, I simply added them using this:

  - platform: ffmpeg
    name: Salon & salle à diner
    input: rtsp://admin:*****@192.168.1.149:554/Streaming/Channels/102
  - platform: ffmpeg
    name: Chambre Thomas
    input: rtsp://admin:*****@192.168.1.149:554/Streaming/Channels/302
  - platform: ffmpeg
    name: Salle de jeux
    input: rtsp://admin:*****@192.168.1.149:554/Streaming/Channels/202
  - platform: ffmpeg
    name: Ext entrée maison
    input: rtsp://admin:*****@192.168.1.149:554/Streaming/Channels/402
  - platform: ffmpeg
    name: Ext arrière maison
    input: rtsp://admin:*****@192.168.1.149:554/Streaming/Channels/502  

It works fine in HA except the ones setup in H265+

But if I click on it to see the live feed, it works…

It looks like it cannot get the good image from the RTSP URL from the H265+ stream but no issue streaming it…
I feel this could be corrected is a FFMPEG argument but I have no knowledge or clue how to do that…

Any help would be appreciated…

Hi,

I have had a similair experience, however, I was not sure if this was related to H265 or the latest Hik firmware. To bypass this problem, I reverted to setting up a shell command, with the following in the shell:
wget -O /tmp/fXXXXX.jpg ‘http://YYYYY:[email protected]/ISAPI/Streaming/channels/801/picture?videoResolutionWidth=2048&videoResolutionHeight=1536’ and the setting up a local_file based camera to read this snapshot.

Not sure if this will help you at all, but anyway, this is how I solved the problem of not getting my snapshots.

John

I tried getting the image through the link but for some reason, never got it to work. I have a DS7616NI-I2.
Would be perfect to just pull the picture but can’t get it to work (I mean just through IE)

Feels like I tried everything. And yes I enabled ISAPI in the NVR.

My firmware is on 4.1.50. Maybe that’s the issue (4.xx Gen)

Could you share the camera section if you don’t mind to see the entire thing?

Here’s my config for Hikvision NVR Cams that I have in HA. They work flawlessly.

camera:
- platform: generic
still_image_url: http://192.168.1.34:65001/Streaming/channels/1/picture
name: Front Right
username: admin
password: !secret hik_nvr_password

1 Like

Interesting, you’re using the NVR virtual NIC to get the URL. Thanks for that, now I can get the image in Chrome when testing…
But I still get nothing in HA.
2018-05-22%2009_24_32-Home%20Assistant

the section in camera.yaml:

  - platform: generic
    still_image_url: http://192.168.1.149:65006/ISAPI/Streaming/channels/1/picture  
    name: Ext cote maison
    username: admin
    password: ******

I don’t get it… same URL in Chrome shows me the image…

ok ok… I think I got it… I had to specify the authentication to digest…

  - platform: generic
    still_image_url: http://192.168.1.149:65005/ISAPI/Streaming/channels/1/picture  
    name: Ext arrière maison
    username: admin
    password: !secret hikvision
    authentication: digest
  - platform: generic
    still_image_url: http://192.168.1.149:65006/ISAPI/Streaming/channels/1/picture  
    name: Ext cote maison
    username: admin
    password: !secret hikvision
    authentication: digest

Wow, so much faster getting the image vs FFMPEG camera setup… I changed all my cams this way.

Glad it worked.

1 Like

I just tried adding my last night with no success I was trying to use the FFMPG component though.

Quick question, does this show live streams? To be honest, even a once every minute would be fine with me. Thanks

it does refresh the image very often, really great in my experience.
Didn’t find out exactly the default interval though.

Based on that, it tries to refresh when the URL changes… So I guess it refreshes as fast as possible in HA but I might be wrong…

limit_refetch_to_url_change (Optional): True/false value (default: false). Limits re-fetching of the remote image to when the URL changes. Only relevant if using a template to fetch the remote image.

I tested it and in my case, it refreshed approx every 10-15 sec when staying on the page in Web UI showing the cams…

1 Like

Works great, updates every 3-5 seconds, Only issue I have so far is on an android tablet. iOS works great. I’m looking into the tablet

Can someone explain what is the difference between the different authentication modes?