home-assistant-hikconnect icon indicating copy to clipboard operation
home-assistant-hikconnect copied to clipboard

Add live view from Hik-Connect connected cameras

Open tomasbedrich opened this issue 2 years ago • 56 comments

I would love to implement it, but I haven’t reverse-engineered the protocol yet (lacking time).

tomasbedrich avatar Sep 28 '21 18:09 tomasbedrich

@tomasbedrich what about RTSP stream? Or you're only talking about cloud based live stream?

sidlauskaslukas avatar Jan 10 '22 13:01 sidlauskaslukas

I'm only looking for cloud-based camera stream. My goal is to mirror functionality available through Hik-Connect mobile application.

Focusing of local connection, you may be interested in the official integration or this thread.

tomasbedrich avatar Jan 10 '22 13:01 tomasbedrich

How we can use camera in version 1.1.1 ? I see only lock for door.

pepsonEL avatar Jan 19 '22 10:01 pepsonEL

thats not added , where do you see it added? it only is a version numbering change?

pergolafabio avatar Jan 19 '22 10:01 pergolafabio

https://github.com/tomasbedrich/home-assistant-hikconnect/releases/tag/1.1.1

Fix #6

pepsonEL avatar Jan 19 '22 10:01 pepsonEL

Look at code change, nothing there

pergolafabio avatar Jan 19 '22 10:01 pergolafabio

he made a type error, it fixes 16 instead of 6

pergolafabio avatar Jan 19 '22 10:01 pergolafabio

Pardon guys, it's a typo in changelog. Version 1.1.1 fixes #16, not #6. No sensation here.

tomasbedrich avatar Jan 19 '22 10:01 tomasbedrich

:-)

pergolafabio avatar Jan 19 '22 10:01 pergolafabio

It would be great to have camera entites created. I am looking forward to have them added, but anyway thanks for your effort!

scetu avatar Jan 24 '22 15:01 scetu

Is any chance to add live view from camera door station ? Now i have add my camera localy by rtps but in 1 generation video intercom to view by rtsp i also myst add rtsp address to still_image_url and for stream_source. And in this configuration i can not take a snapshoot from camera when somebody was ringing. When rtsp is set for still_image_url take snapshoot is unavailable. Live view by cloud will be good to take a snapshoot. Thanks.

pepsonEL avatar Jan 29 '22 14:01 pepsonEL

I don't think technical possible to capture feed from cloud, I didn't see any trace of it...

Have you tried the ffmpeg camera, as I suggested on forum? Then you don't need to define a still image... The snapshot is taken differently

pergolafabio avatar Jan 29 '22 14:01 pergolafabio

No i dont try. But how put address input to configure it ? camera:

  • platform: ffmpeg input: FFMPEG_SUPPORTED_INPUT

pepsonEL avatar Jan 29 '22 14:01 pepsonEL

Look here for examples

https://community.home-assistant.io/t/ffmpeg-live-stream-not-work/135090

Or search on the forum, examples enough

pergolafabio avatar Jan 29 '22 14:01 pergolafabio

Ok added by ffmpeg and i can live view from it.... but also can not take snapshoot. File is create when run service take a snapshoot but file has 0KB and can not open it.

pepsonEL avatar Jan 29 '22 15:01 pepsonEL

Yeah, seems some discussion going on forum, discuss it there... Someone claimed it worked, wait for his feedback...

pergolafabio avatar Jan 29 '22 15:01 pergolafabio

Can we please keep this issue focused on adding live view to Hik-Connect?

tomasbedrich avatar Jan 29 '22 15:01 tomasbedrich

I followed the instructions at https://www.home-assistant.io/integrations/generic/#secured-access-to-the-camera and was able to get a camera view in the UI. Would be nice to get the config folded into this though, rather than needing manual setup.

palfrey avatar Jan 29 '22 16:01 palfrey

That's not related , that url is local access, while this integration is based on hikconnect cloud

pergolafabio avatar Jan 29 '22 16:01 pergolafabio

I followed the instructions at https://www.home-assistant.io/integrations/generic/#secured-access-to-the-camera and was able to get a camera view in the UI. Would be nice to get the config folded into this though, rather than needing manual setup.

But my cam don't have address to still image

pepsonEL avatar Jan 29 '22 16:01 pepsonEL

Hi! Is it possible to get livestream video from cameras?

scorpioRED avatar Apr 30 '22 10:04 scorpioRED

From cloud, probably not

pergolafabio avatar Apr 30 '22 10:04 pergolafabio

hey @tomasbedrich , i found this..

https://github.com/ACKspace/hikkup

maybe it can be used to intecept the camera traffic? maybe also other stuff, so you dont need polling anymore?

pergolafabio avatar Oct 13 '22 06:10 pergolafabio

Hi @tomasbedrich good job, unlock button and call status work like a charm !

Is there any way finally to display camera like within hikvision app ? My camera is not connected to my LAN unfortunately but i can access the video intercom (indoor station) IP I see many cameras available as a device using your integration, but there is no entities linked Thank you :)

barcus avatar Jul 15 '23 10:07 barcus

@barcus if you can access your indoor station via LAN, use the solution provided by @pergolafabio - this way you can get both unlock and camera steam.

otherwise, we don’t have a video stream available from cloud yet

tomasbedrich avatar Jul 21 '23 07:07 tomasbedrich

Hi @tomasbedrich , thanks for your work on this. I am from a research facility and we plan to use hikvision's solar panel cameras to monitor a remote field site with the 4G backup option. I've registered the devices and have been able to access list them using using your package here. Do you have any further information on how we might be able to implement viewing/downloading image snapshots?

I had a go at guessing API endpoints (or the location of the OpenAPI.json file) and didn't have much luck.

gsainsbury86 avatar Aug 03 '23 06:08 gsainsbury86

It's not possible using hikconnect, it's a unofficial API... It probably only works local by using rtsp streams

They probably work with webrtc and tokens, as we don't have

pergolafabio avatar Aug 03 '23 06:08 pergolafabio

Thanks @pergolafabio .

Sorry for the off-topic follow-up, but another option I considered is spinning up my own version of the Cloud Storage Solution . It seems on the device I can configure a custom server address and access id / key, which sounds like potentially S3 protocol, but I haven't been able to confirm.

gsainsbury86 avatar Aug 03 '23 06:08 gsainsbury86

yeah, i think thats indeed possible, there are API listed for that on the tpp website: https://tpp.hikvision.com/tpp/IntegrationCenter

pergolafabio avatar Aug 03 '23 07:08 pergolafabio

Thanks and good job @tomasbedrich. Do we have any clues about the API endpoints used for streaming the camera feed?

If not, could you please detail how you found the endpoints you've already implemented?

DanBrezeanu avatar Aug 29 '23 20:08 DanBrezeanu