Hikvision setup

I will say, I found motion alerts just way to finickey (even on the camera). I mostly use line crossing alerts, or a combination of line crossing and motion (via automation). Line crossing seems very accurate. I still get false positives, but much less often. One automation I do, is I only trigger on motion, if there was a line crossing, I then out the line crossing a bit away from the motion area. That works pretty well for me.

1 Like

How are you using line crossing and motion in your automations?

Is it possible to see the data stream from the Hikvision camera to Hass, in order to troubleshoot this ?

Hi
I add to my home assistant config this:

Then i add to lovelace card:

type: picture-glance
title: Camera 01
entities: []
camera_image: camera.camera_01

But i still not see image video from camera. STill see gray image:

What i done wrong… ?

When open in web browser this link (login and pass) http://192.168.xx.xx/ISAPI/Streaming/channels/1/picture
i see image from camera ok.

EDIT
I found a bug. Change value in secret to other and works.

Also add binary sensor like this:

  • platform: hikvision
    host: 192.168.xx.xx
    port: 80
    username: !secret user_hikvision
    password: !secret pass_hikvision

This works but in Home assistant still show as detect motion. But camera no detect motion:

Why ? After restart HA show OFF and when before camera i run motion again still ON… and not change to OFF.
I use camera Hikvision DS-2CD2063G0-I with latest firmware 5.5.82

I can not get my Hikvision DS-2CD2355FWD-I camera to show up in HA.

This URL works in a web browser:

http://10.1.1.22/ISAPI/Streaming/channels/101/picture

But the generic camera config using this URL it never shows anything:

- platform: generic
  name: Downstairs
  username: !secret camera_user2
  password: !secret camera_password
  still_image_url: http://10.1.1.22/ISAPI/Streaming/channels/101/picture

I also tried:

- platform: generic
  name: Rumpus Room GENERIC
  still_image_url: http://USER:[email protected]/ISAPI/Streaming/channels/101/picture"

I’ve tried with and without user & password as the web browser does not require authentication (bad!).

I also tried an rstp stream:

- platform: ffmpeg
  name: Downstairs
  input: rtsp://USER:PASSWORD%[email protected]/Streaming/Channels/101

I can open this stream in VLC fine but HA does not show anything (yes I did set up the ffmpeg component).

Any ideas?

have you changed your 2nd stream to MJPEG??

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
1 Like

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).

1 Like

I think you might be missing some setting on the camera? I have this set

1 Like

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

1 Like

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
5 Likes

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

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…