That works without errors and gives the challengecode and idcode as one long string. Here is the device and log
Announcement
Collapse
No announcement yet.
Integrate Grandstream gds3710 video doorbell
Collapse
X
-
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
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
-
Here is the event payload "authcode ="+ val1229:2191#:laser +"IDCode ="+val1230+"type"=1
Here is the log
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_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
<?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
-
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
-
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
-
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
Here is the log to show the whole string and entries
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
-
rdc
It seems that you do not follow the documentation closely. Especially this part
authcodestring = md5(ChallengeCode:remote_pinassword);
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
-
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
Comment