Announcement

Collapse
No announcement yet.

Integrate Grandstream gds3710 video doorbell

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Integrate Grandstream gds3710 video doorbell

    4. HTTP API to Open Door HTTP API Open Door Authentication: The authentication is using Challenge/Response encryption mode. After the successful authentication by the administrator, each later on operations will be accepted and successful ONLY when the correct authentication information is included inside the request header. = Values Description cmd= 0: Step 1 1: Step 2 authcodestring= md5(ChallengeString:remote_pinassword); idcodestring= From authentication’ step 1 opt_type= 1: open door 2: close door The authentication process is as following: Step 1: Client ➔ Server GDS37XX HTTP API P a g e | 114 Version 1.0.0.23 [http|https]:///goform/apicmd?cmd=0&user=admin Server ➔ Client 0 5c0e1f55b54be2d0c56004ba349fb726 UM1NWDJYC19LOEYQRWNA Step2: Client ➔ Server [http|https]:///goform/apicmd?cmd=1&user=admin&authcode=&idcode=&type=opt_type NOTE: The rule for authcodestring listed below: authcodestring = md5(ChallengeCode:remote_pinassword); idcodestring = The node value of “IDCode”, such as “UM1NWDJYC19LOEYQRWNA” above example. opt_type = 1: open door, 2: close door ➢ The “ChallengeCode” is the returned string from Server in Step 1. ➢ Remote_pin is “Remote PIN to Open Door” ➢ Password is the login password of the device (GDS37xx). ➢ Authcodestring must be length of 32 in lowercase hex as in MD5 hash. ➢ The RED part is the authentication message returned by the Server after successful authentication. ➢ This part of the message must exist in the message header before all later on operations can run successfully. If authentication OK, the return message like this: GDS37XX HTTP API P a g e | 115 Version 1.0.0.23 HTTP/1.0 200 OK Content-Type: text/xml;charset=UTF-8 0 Authentication OK If authentication Failed, the return message like this: HTTP/1.0 200 OK Content-Type: text/xml;charset=UTF-8 1 Authentication error If the HTTP API to open door disable, then the return message like this: HTTP/1.0 200 OK Content-Type: text/xml;charset=UTF-8 1 HTTP API open door function is disable If the remote open door PIN is null, then the return message like this: HTTP/1.0 200 OK Content-Type: text/xml;charset=UTF-8 1 Authentication error. Remote PIN is null GDS37XX HTTP API P a g e | 116 Version 1.0.0.23 Notes: • The RED part is the authentication information returned by the Server after successful authentication. • This part of the information must exist in the message header before all later on operations can run normally. • The user must be “admin”, others do not have the privilege. • Default Validity of the idcodestring come from step 1 is 30 seconds, it is mean that user must finish the step 2 in 30 seconds, or the idcodestring will timeout and invalid. (This parameter can ONLY be configured via P Value which is P15428) For example, if you want to set it to 150 seconds, you will need to apply this command: http:///goform/config?cmd=set&P15428=150 • The “type=1” means that the HTTP API is for open door. • Authcode string length must be 32 in lowercase hex as in MD5 hash.

    Can you show me how to use this format in Big5 to open the door on a grandstream gds3710
    Attached Files

    #2
    After you send the first url you get a response like this <Configuration>
    <ResCode>0</ResCode>
    <RetMsg/>
    <ChallengeCode>bee8e1f391da5133554e48b45f3486ad</ChallengeCode>
    <IDCode>9UZNR1ONCVDMRZUM8KJU</IDCode>
    </Configuration>

    Then you have to send a second url with the challengecode and the idcode to unlock the door.

    How do I send the first url and the second url using Big5

    Comment


      #3
      rdc

      Yes, in principle it is possible to accomplish this using Big5.

      You would issue a HTTP request and you'll get the "challange code" and the "id code" as values in your HS3 devices that Big5 will create for you automatically.

      After that you'd use the power of Big5 to send out the values of HS3 devices. It happens by creating HS3 event and use Big5 HTTP action.

      In the payload box of Big5 HTTP Action you would use something like that

      ${val123}

      where 123 is the ID of your HS3 device that holds the code that you want to send out

      It depends on the remote site if you'll need 1 or 2 Big5 HTTP Profiles. If the remote site expects HTTP POST for both operations than you can handle it with just one Big5 HTTP profile. If it is a combination of GET and POST than you will need 2. As far as Big5 will be the HTTP client here, you must keep "listening" box unchecked at any of the profiles that you create.

      Hope this helps.

      RIsquare

      Comment


        #4
        Ok so the first event makes a new device in Homeseer I put this in an event http|https]://<servername>/goform/apicmd?cmd=0&user=admin and each time the event is run the device result has one long number that is consistent with the challengecode and the idcode. And then I created a second event to send the ${val123} but where do i put the second url to make the door unlock. It is suppose to be http|https]://<servername>/goform/apicmd?cmd=1&user=admin&authcode=<authcodes
        tring>&idcode=<idcodestring>&type=opt_type where opt_type is the unlock command

        Comment


          #5
          rdc

          Congrats on the good progress so far. From what I see it looks like that you’ll need a Big5 HTTP GET profile. Create one and use the URL of your destination up to and including the ? Plus ${input} at the end.

          The rest of the URL will come from the input field of your HS3 event Big5 HTTP action. It will look like that

          ${“all the text here up to =“ + val123 + “remaining tex to next =“+val234+“last piece of text”}

          Please test the expression in the sandbox. It does work as I tested it.

          BEWARE - this forum introduces curly quote marks " if you copy and paste from it. Big5 does NOT tolerate curly quote marks only straight ones.

          RIsquare

          Comment


            #6
            Is this correct for the get url http://192.168.0.12:2222/goform/apicmd?cmd=1&user=admin&authcode=<authcodes tring>&idcode=<idcodestring>&type=opt_type ? ${input}

            And what exactly goes in the action box. The ref number is 1176

            Comment


              #7
              It doesnt work for me. I tried all the expressions and cant split it up. I just get errors. The first part is suppose to be the challengecode of 32 characters.

              Comment


                #8
                Sure. Give me the input and I'll write the expression for you to split it.

                Comment


                  #9
                  Click image for larger version

Name:	gdbig.JPG
Views:	440
Size:	9.8 KB
ID:	1390869

                  Comment


                    #10
                    Click image for larger version

Name:	challenge.JPG
Views:	424
Size:	16.2 KB
ID:	1390871

                    Comment


                      #11
                      give me a copy that i can work with. also tell me where is the boundary between the two

                      Comment


                        #12
                        Activate Big5 debug mode and copy the actual input that Big5 gets.

                        Comment


                          #13
                          [Big5 Plugin] [Raw message in]: 0853c30e563755b2813c06c49be978dedU9EYNC7PYPBCOJVVZK9R The challengecode is suppose to be the first 32 and the Idcode starts with capitol letters

                          Comment


                            #14
                            Jun-03 4:47:09 PM Big5 [Big5 Plugin] [Raw message in]: 03c7aa80d5d37a92e8a9b00e8c7139e5cDQQ1DCOQRDK7QY7BSDJO
                            Jun-03 4:47:09 PM Big5 [HttpConnection] [HTTP POST http://192.168.0.12:2222//goform/api...d=0&user=admin OUT]: { "status": "ok" }
                            Jun-03 4:47:09 PM Big5 [Big5 Plugin] message =
                            Jun-03 4:47:09 PM Big5 [Big5 Plugin] profile = 425981
                            Jun-03 4:47:09 PM Big5 [Big5 Plugin] type = HTTP
                            Jun-03 4:47:09 PM Big5 [Big5 Plugin] Debugging dictionary with 3 keys
                            Jun-03 4:47:09 PM Event Event Trigger "GDS3710 Send First Post"

                            Comment


                              #15
                              ${ Substring(input, 32) } for the first one
                              ${ Substring(input, 33,20) } for the second one

                              test in the sand box please. Remove the ${..} wrap befor applying inthe HTTP profile Value Expression box

                              Substring(input, 32) && Substring(input, 33,20)

                              Comment

                              Working...
                              X