Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Help with http multipart content


Question

Posted

Hello,

I'm trying to build a QA motion sensor as virtual device. I have several IP cameras connected to NVR.

I want to use motion detection capability of the camera (respectivly NVR)

 

According to the Hikvision API I have 2 options:

1. Arming mode

2.Listening mode

 

In Arming mode:

Request: /ISAPI/Event/notification/alertStream

Camera returns multipart content stream. I have to read data from the connection until disconnected

Is it possible to do this wiht HC3 HttpClient?

 

GET /ISAPI/Event/notification/alertStream HTTP/1.1
Authorization: Digest username="admin",
realm="IP Camera(C2183)",
nonce="4e5468694e7a42694e7a4d364f4449354d7a6b354d54513d",
uri="/ISAPI/Event/notification/alertStream",
cnonce="3d183a245b8729121ae4ca3d41b90f18",
nc=00000001,
qop="auth",
response="f2e0728991bb031f83df557a8f185178"
Host: 10.6.165.192
HTTP/1.1 200 OK
MIME-Version: 1.0
Connection: close
Content-Type: multipart/mixed; boundary=<frontier>
--<frontier>
Content-Type: application/xml; charset="UTF-8"
Content-Length: text_length
<EventNotificationAlert/>
--<frontier>

 

Listening mode:

Request: /ISAPI/Event/notification/httphosts /<ID>

Camera sends http post request to specified host.

In this case I have to establish lestening http server, and wait for data to come.

Is it possible to do this with HC3? 

 

3 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted

    Somehow found a way to make it work...

     

    Using TcpSocket to handle Http request in arming mode

    Tested with Hikvision NVR DS-7616NI-K2

    Several child devices for each channel

    Support MD5 digest authorisation

    Please login or register to see this attachment.

    • 0
    Posted
    On 6/5/2024 at 12:50 AM, mlukarev said:

    Somehow found a way to make it work...

     

    Using TcpSocket to handle Http request in arming mode

    Tested with Hikvision NVR DS-7616NI-K2

    Several child devices for each channel

    Support MD5 digest authorisation

    Please login or register to see this attachment.

    Hi I tested this QA but it stucks when it try calculate the the MD5. There is no error in console, it makes the call and goes to "digest_createHeader" but in some point of MD5 it get lost. 
    Anyone got the same problem? I tested with my NVR DS-7608 series 

     

    • 0
    Posted

    Extended HikVision integration for IP cams has just been published at MarketPlace. It is compatibile with many camera models, but works with IP cameras directly, not with NVR.

    Please login or register to see this link.

     

    The QuickApp signals motion/human/vehicle/audio alarms,  control alarm inputs and outputs, privacy mask on/off, overlay text control, temperature alarms and 2-nd channel for thermal cameras, 
    Support for PTZ (preset call from scenes) will be added very soon

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...