smartDEN IP-16R-XX User Manual
13 Apr 2021
9. HTTP/XML/JSON access
This operation mode allows custom applications to control the smartDEN IP-16R-
XX without using a Web-browser. The custom application acts as a HTTP client,
sending HTTP GET requests to the smartDEN IP-16R-XX.
Figure 9.1. smartDEN IP-16R-XX working as a HTTP server
To receive the current state of the smartDEN IP-16R-XX, the application requests
the page current_state.xml (current_state.json), for example:
http://192.168.1.100/current_state.xml
http://192.168.1.100/current_state.json
The custom application can also control the smartDEN IP-16R-XX by sending
parameters (name/value pairs) with the HTTP/XML/JSON GET request, for example:
http://192.168.1.100/current_state.xml?Relay=1&Relay2=0&Relay3=1
http://192.168.1.100/current_state.json?Relay=1&Relay2=0&Relay3=1
The XML/JSON login process differs depending on the selected Encrypt
Password option.
9.1. Login (Encrypted Password)
In this mode a two-step login sequence is provided as a protection against
unauthorized access. The first time the custom application requests the page
current_state.xml / current_state.json, a random login key is issued in the reply. Next
the custom application uses this key to encrypt the password. The encrypted
password is sent as a parameter with the next request to the page current_state.xml /
current_state.json.
Bellow is an example of login process:
Step 1:
Request
http://192.168.1.100/current_state.xml
Reply (login required):