Announcement

Collapse
No announcement yet.

Integrate Grandstream gds3710 video doorbell

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

    #46
    That works without errors and gives the challengecode and idcode as one long string. Here is the device and log Click image for larger version

Name:	friday.JPG
Views:	111
Size:	64.1 KB
ID:	1391426Click image for larger version

Name:	friday1.JPG
Views:	88
Size:	8.6 KB
ID:	1391427

    Comment


      #47
      I was reading the Grandstream instructions again and I found this

      Server ➔ Client
      <?xml version="1.0"encoding="UTF-8" ?>
      <Configuration>
      <ResCode>0</ResCode>
      <RetMsg></RetMsg>
      <ChallengeCode>5c0e1f55b54be2d0c56004ba349fb726</ChallengeCode>
      <IDCode>UM1NWDJYC19LOEYQRWNA</IDCode>

      and I remembered that the profile we wrote was returning -8 in the device so i went back to making a post and played with the numbers until I was able to isolate the two codes and finally got two devices with just the challengecode and the idcode
      Click image for larger version  Name:	yahoo.JPG Views:	0 Size:	15.0 KB ID:	1391452Click image for larger version  Name:	yahoo1.JPG Views:	0 Size:	67.9 KB ID:	1391453Click image for larger version  Name:	yahoo2.JPG Views:	0 Size:	75.1 KB ID:	1391454

      So now i just need to figure out the next step 2 and see if the door will open

      Client ➔ Server
      [http|https]://<servername>/goform/apicmd?cmd=1&user=admin&authcode=<authcodes
      tring>&idcode=<idcodestring>&type=opt_type

      We had the post correct all along. It was just that our numbers were so far off that we were always missing the correct data we needed and the log
      did not show that there was more in the input than was displayed.

      Comment


        #48
        Here is the event payload "authcode ="+ val1229:2191#:laser +"IDCode ="+val1230+"type"=1
        Here is the log Click image for larger version

Name:	unlock.JPG
Views:	144
Size:	155.6 KB
ID:	1391466

        Click image for larger version

Name:	unlock.JPG
Views:	83
Size:	155.6 KB
ID:	1391468Click image for larger version

Name:	unlock2.JPG
Views:	85
Size:	34.5 KB
ID:	1391467
        Here are the instructions Client ➔ Server
        [http|https]://<servername>/goform/apicmd?cmd=1&user=admin&authcode=<authcodes
        tring>&idcode=<idcodestring>&type=opt_type
        NOTE:
        The rule for authcodestring listed below:
        authcodestring = md5(ChallengeCode:remote_pin​assword);
        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
        <?xml version="1.0"encoding="UTF-8" ?>
        <Configuration>
        <ResCode>0</ResCode>
        <RetMsg>Authentication OK</RetMsg>
        </Configuration>
        If authentication Failed, the return message like this:
        HTTP/1.0 200 OK Content-Type: text/xml;charset=UTF-8
        <?xml version="1.0"encoding="UTF-8" ?>
        <Configuration>
        <ResCode>1</ResCode>
        <RetMsg>Authentication error</RetMsg>
        </Configuration>
        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
        <?xml version="1.0"encoding="UTF-8" ?>
        <Configuration>
        <ResCode>1</ResCode>
        <RetMsg>HTTP API open door function is disable</RetMsg>
        </Configuration>
        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
        <?xml version="1.0"encoding="UTF-8" ?>
        <Configuration>
        <ResCode>1</ResCode>
        <RetMsg>Authentication error. Remote PIN is null</RetMsg>
        </Configuration>
        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://<servername>/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.


        I run two events within 30 seconds. The first event splits the string and the second event sends the unlock payload but so far is does not work

        Comment


          #49
          Click image for larger version

Name:	open.JPG
Views:	90
Size:	131.8 KB
ID:	1391547

          I dont have errors but the door is not opening. Where did I go wrong

          Comment


            #50
            rdc

            Don't put everything in one big matzo ball.

            1. Do the split first. Check your HS3 devices created by Big5 and make sure that the split went O.K.
            Proceed with the next step only after you are confident that your HS3 devices #1229 and #1230 contain the correct keys.
            You had problems achieving that yesterday. Did you resolve the problems?

            2. If point 1. above is resolved than proceed to step 2.

            Put your expression that you've designed ( BTW Congratulations !!! on that) in Big5 sandbox to see the result.
            I'm concerned about two things
            a) eliminate all unnecessary spaces. Every character counts and spaces are characters as well.
            b) what is this val1229+2191 it has to be in brackets ( ) and also you have to be aware that it will do mathematical addition adding the number 2191 to the value of HS3 device #1229. Is this what you want? Looks suspicious to me but I'm not Grandstream specialist anyhow.

            3. Copy the result from the sandbox and add it to the URL from the Big5 profile replacing ${input} with it. Use the resulting URL in a browser. Does the door open. If yes, than Big5 will open it for you, if not than you have to go back to Grandstream Documentation and see what you are doing wrong.

            Comment


              #51
              I sent in the devices after the split. They are shown above. That 2191 number is the remote code to open the door.
              Here are the grandstream instructions again show above. I cant run the split and make a new url in under 30 seconds which the instructions say is needed to put in browser.
              I am trying various lines in the big5 event action box Here is the latest one ${"authcode ="+ val1229+2191+"#"+"laser"+"IDCode ="+val1230+"opt_type="+1}
              But it does not work.

              The instructions grandstream needs are listed above also. Can you help me improve the action box to make the door unlock

              Comment


                #52
                Pls. do 1. 2. and 3. as advised above and report results for each line.

                Comment


                  #53
                  The items you asked for I already sent to this forum but here they are agaiin

                  Here are the devices created by splitting the string Click image for larger version

Name:	again.JPG
Views:	95
Size:	13.6 KB
ID:	1391587

                  Here is the log to show the whole string and entries Click image for larger version

Name:	again2.JPG
Views:	83
Size:	74.1 KB
ID:	1391588


                  Here is the third item ${"authcode ="+val1229+2191+"#"+"laser"+"IDCode="+val1230+"opt_type=" +1} The remote open code is 2191 and the password is laser. The requirements are in the grandstream instructions listed above. But this one does not open the door

                  Comment


                    #54
                    b) what is this val1229+2191 it has to be in brackets ( ) and also you have to be aware that it will do mathematical addition adding the number 2191 to the value of HS3 device #1229. Is this what you want? Looks suspicious to me but I'm not Grandstream specialist anyhow.

                    Comment


                      #55
                      More likely it should be like that

                      ${"authcode ="+val1229+":2191"+"#"+"laser"+"IDCode="+val1230+"opt_typ e =" +1}

                      Comment


                        #56
                        rdc

                        It seems that you do not follow the documentation closely. Especially this part

                        authcodestring = md5(ChallengeCode:remote_pin​assword);

                        unfortunately it seems that this forum introduced a smiley face so that I can't help either. For example md5 is missing . Give me the whole line without the smiley face and I'll try to help. You are very close but not there exactly.

                        Comment


                          #57
                          Click image for larger version

Name:	newer.JPG
Views:	86
Size:	147.3 KB
ID:	1391596 Here is the log
                          from that expression you gave me but it did not open the door






                          see grand.txt [ATTACH]n1391597[/ATTACH]

                          Comment


                            #58
                            cmd=1&user=admin&authcode=<authcodestring>&idcode=<idcodestr ing>&type=opt_type

                            authcodestring = md5(ChallengeCode:remote_pinassword)


                            Based on the above your expression should look like this


                            ${"authcode="+"md5("+val1229+":2191:laser)"+"idcode="+val123 0+"type=1"}

                            BEWARE of curly quotes when copy and paste from this forum

                            Comment


                              #59
                              I did run it in Big5 sandbox and it produced this result (my test devices had 609 value both of them. You should see your keys where you see 609 in my example


                              authcode=md5(609:2191:laser)idcode=609type=1

                              Comment


                                #60
                                the remote pin is 2191#

                                Comment

                                Working...
                                X