henry-spanka / node-red-contrib-hikvision

Hikvision API for Node Red
MIT License
10 stars 1 forks source link

image url - second stream, more configurable? #9

Open ozett opened 4 years ago

ozett commented 4 years ago

as i scrolled through your code, looking for a polling timeout-parameter, i found a hardcoded image-url . https://github.com/henry-spanka/node-red-contrib-hikvision/blob/master/hikvision.js#L143

i dont use the image-node, but i use a differnent url to access my second-stream in latest firmware:

http://192.168.1.115/Streaming/channels/102/httppreview

may you want to check on this/and or make it configurable in the node?

henry-spanka commented 4 years ago

So you basically want a low resolution snapshot, right? What's the difference between httppreview and Picture (...channels/102/Picture)?

ozett commented 4 years ago

difference url may be caused by firmware,

or by basic-auth or digest-auth.. dont know exactly, there are lots of different information about snapshot-urls in the web. also the onvif-way could be an alterantive..but also not clearer to get the urls for snapshots..

henry-spanka commented 4 years ago

Meaning currently the image node does not work for you?

ozett commented 4 years ago

did not test it, because it startet with http-node grabbing the image. worked for me, i stayed with it up to now.

if the hikvision-alarm nodes run stable, i will give it a try. but my node-red must run stable over month...thats the goal... the hikvision-node is the first one, wich infected stability after 2 years running node-red... hope we nail that down... 🎉

ozett commented 4 years ago

some explantion of different urls for different firmware

https://www.biesalski.info/wordpress/hikvision-kamera-stream-abrufen/

henry-spanka commented 4 years ago

Yes that's for streams. But we're only taking an image with max resolution. I could add an option to allow taking an image at low resolution if you need that.

ozett commented 4 years ago

why not, if you dont mind?

henry-spanka commented 4 years ago

Has been implemented. You can now change the streaming url by passing the parameter "snapshotPath" to the node.

ozett commented 4 years ago

👍

ozett commented 4 years ago

something was also done to the underlying lib here:

https://github.com/trave/node-hikvision-api/commit/a4fc1f68af019c49249cc6247d9eb8f4a526209c

maybe worth to collect improvements from the forks. i counted about 5 little things, that others improved...