
SmartDEN
IP-32IN
User Manual
17 Jan 2018
-53-
8.2. JSON access
8.2.1. JSON login (encrypted password)
The encrypted
login sequence is similar to the XML access:
Step 1:
Request
http://192.168.1.100/current_state.json
Reply (login required):
{
"CurrentState": { "LoginKey": "65156" }
}
Step 2:
Request (password is sent as a parameter)
http://192.168.1.100/current_state.json?pw=28237099263eabfd88626124a822c64c
Reply (password is O’K, login accepted):
{
"CurrentState": {
"DigitalInput": [
{"Name": "DIn1", "Value": "1"},
…
}
Password encryption algorithm to be implemented in custom application is
available upon request.
8.2.2. JSON login (non-encrypted password)
The password should be passed as non-encrypted parameter with the request:
http://192.168.1.100/current_state.json?pw=admin
Getting the
“LoginKey”
in the answer means only that the provided password is
wrong or the login session has been expired.
If there is no data traffic between the custom application and the
SmartDEN IP-32IN
for time, specified by
Session Timeout
parameter,
the session "times out" and a new login is required.
8.2.3. Retrieving current state in JSON format
When logged, the custom application can get current measurements requesting
the
current_state.json
page. The reply contains a page in JSON format (Fig. 54).
Summary of Contents for SmartDEN IP-32IN
Page 25: ...SmartDEN IP 32IN User Manual 17 Jan 2018 25 Remote Relay Mode Normal...
Page 49: ...SmartDEN IP 32IN User Manual 17 Jan 2018 49 7 14 Reboot Figure 51 Reboot...
Page 52: ...SmartDEN IP 32IN User Manual 17 Jan 2018 52 Figure 53 XML file with current measurements...
Page 54: ...SmartDEN IP 32IN User Manual 17 Jan 2018 54 Figure 54 JSON file with current measurements...
Page 66: ...SmartDEN IP 32IN User Manual 17 Jan 2018 66 12 Mechanical drawing Figure 59 Device size...