bartbutenaers / node-red-contrib-multipart-stream-decoder

Node-Red node for decoding multipart streams over http
Apache License 2.0
9 stars 2 forks source link

Does not work with hikvision http://x.x.x.x/ISAPI/Event/notification/alertStream #6

Open epyshor opened 5 years ago

epyshor commented 5 years ago

hi,

I am trying to get stream from hikvision, but without success. all it says is "requesting"

philipsoeberg commented 5 years ago

I have been using multipart-decoder (v0.0.3) for a year now processing alertStream from my Hikvision cams. I got 5, two DS-2CD2432F-IW and three DS-2CD2142FWD-IWS I'm setting URL: http:///ISAPI/Event/notification/alertStream Use Basic Auth: yes, +username +password output: an utf-8 string delay: 0 block-size: 1 max-size: 1000000 I have a trigger node rigged to restart the multipart-decode component if hikvision or network fail.

This works like a charm. I feed this to my AI for people detect processing. Works great.

/Philip

On Thu, 28 Feb 2019 at 16:54, epyshor notifications@github.com wrote:

hi,

I am trying to get stream from hikvision, but without success. all it says is "requesting"

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bartbutenaers/node-red-contrib-multipart-stream-decoder/issues/6, or mute the thread https://github.com/notifications/unsubscribe-auth/ATEvG78yqu-zQQ_pk--rt_T0I7pgY02Oks5vR_vNgaJpZM4bXI0L .

--

Philip Søebergphilip@soeberg.net

bartbutenaers commented 5 years ago

@epyshor, Difficult to determine what is going wrong in your case. Was Philip's explanation of any help to you?

Hey Philip (@philipsoeberg), Thanks for your feedback !!! I'm very interested in your AI people detection. Don't know if you have seen it, but there is a related discussion ongoing in the Node-RED forum. Do you have interesting information perhaps that you could share? Bart

epyshor commented 5 years ago

Thanks for quick reply. I have same setup as Philip. but it does not work. I try with version 0.0.4.

It is working with :

https://www.iotwithus.com/getting-events-from-hikvision-camera/

https://github.com/eusfelix/hikvision-to-mqtt/

bartbutenaers commented 5 years ago

@epyshor : This multipart-stream-decoder node is very close related to IBM's http-request node. And since Hitachi has been reworking that http-request node lately (to use another library underneath), I'm also working on a 1.0.0 version (to use the same library under the cover). And yesterday Nick has merged my pull-request to add Digest and Bearer authentication to the http-request node, so I need to implement both authentication modes also in my 1.0.0 version. Reason is that I received already a series of requests from people whose camera only supported Digest authentication ...

So if you give me a couple of days, I will try to create a beta version which you can test. Hopefully that works better in your case ...

bartbutenaers commented 5 years ago

Just to be complete: is this problem only for alert streams. I mean are you able to get an mjpeg stream of images from that same camera?

k3it commented 5 years ago

I'm also having trouble with this function and Hikvision doorbell camera The error is

msg : string[72] "A multipart stream should start with content-type containing 'multipart'"

I get the following payload back

payload: "<EventNotificationAlert version="1.0" xmlns="urn:psialliance-org"><ipAddress>192.168.x.x</ipAddress><portNo>80</portNo><protocol>HTTP</protocol><macAddress>18:68:cb:f7:d3:ba</macAddress><dateTime>2019-08-20T23:07:01-05:00</dateTime><activePostCount>1</activePostCount><eventType>other</eventType><eventDescription>Heartbeat</eventDescription><eventState>inactive</eventState><Extensions version="1.0" xmlns="urn:psialliance-org"><serialNumber>HNDB302-W0120180319WR202749083CLU</serialNumber></Extensions></EventNotificationAlert>"

responseUrl: "http://admin:xxxxxx@192.168.x.x//ISAPI/Event/notification/alertStream"

the doorbell appears to be responding to request (heartbeat message) but apparently not as a multipart stream. Does the HTTP client need to specify in options that it's ready to accept multipart stream from the server?

I noticed that many people with this latest hikvision OEM doorbell are having problems with the alert stream in many different applications which work just fine with other hikvision cameras. I will try hikvision to mqtt next that @epyshor mentioned.

update: https://github.com/eusfelix/hikvision-to-mqtt/ does pick up the alert stream responses

image

the HTTP header in the response does not seem to indicate multipart message? only application/xml:

image

az4l88 commented 3 years ago

Hello my friends I need your help to setup this node. What I want to achieve is to use the IP camera into tensorflow if people dedicate send me a message or something. But I don't understand the how to setup the flow. I already installed the decoder and got my IP camera HTTP URL. But what else should I do. Please let me if there is a clear explanation for the setup. Thanks.

bartbutenaers commented 3 years ago

Hi Nasser, Not sure what your question is:

Bart