ru home ru

Data exchange protocol

The ESP8266 module provides Wi-fi connection. Http protocol is used for communication between the kernel and devices. It is possible to send a request to the actuation mechanism from Internet browser, for example, Internet Explorer or Firefox. For this purpose it is necessary to make an address bar as shown below:
http://[ip_address]:[port]?[device_name]=[flag]
where:
- ip_address - IP-address of the actuation mechanism. For example, 192.168.100.5;
- port - the Port at which the actuation mechanism works. For example, 8804;
- device_name - the Name of the device. For example, PIND1
- flag - the Value the actuation mechanism will be set in, for example 1, or a question mark (?) for getting status.

Example 1: http://192.168.21.21:8804 the command displays functions which are available on the device.
Example 2: http://192.168.101.5:8804?PIND1=0 the device with IP-address 192.168.101.5:8804 and the name PIND1 will be switched off.
Example 3: http://192.168.11.32:8804?PIND2=1 the device with IP-address 192.168.11.32:8804 and the name PIND2 will be switched on.
Example 4: http://192.168.11.32:8804?PIND2=2 the command will toggle a status to opposite state for the device with IP-address 192.168.11.32:8804 and the Name PIND2.
Example 5: http://192.168.11.32:8804?PIND2=? the command returns the status of the device with IP-address 192.168.11.32:8804 and the Name PIND2.
Example 6: http://192.168.11.71:8804?1WIRE=? the command returns information from the sensor which works under protocol 1WIRE, for example, the temperature sensor DS18B20.
Example 7: http://192.168.21.21:8804?ip=192.168.21.55 the command sets new IP-address value for the device.
Example 8: http://192.168.21.21:8804?redirect_url=http://192.168.21.115:8804 the command sets the IP-address of the slave module to which the signal will be forwarded.
Example 9: http://192.168.21.21:8804?unlock=xxx the command will unlock the module (license protection) where xxx - the code received from the seller.
Example 10: http://192.168.21.21:8804?upgrade=http://192.168.21.201:80/firmware/upgrade/user2.4096.new.4.bin the command carries out upgrade of a firmware (firmware).

You can get the whole command collection having connected to the module without parameters. For example: http://192.168.101.5:8804

Configuration of the Wi-fi ESP8266 module

Connection parameters to Wi-Fi network are set through initialization. It is necessary to switch off an access point of Wi-fi (the home router) to which the module was connected and put a power supply to the module. Within 200 seconds the module will be trying to connect to Wi-Fi access point, and in case of failure, the module will be started as access point itself. The module distributes Wi-Fi network (SSID - "andkom"). By default the module IP-address is 192.168.5.1. We are connected to access point of "andkom" with the password "00000000". Then in the browser we enter line http://192.168.5.1:8804. In reply the web page on which it is possible to enter SSID and the password for connection to your house access point forms. We click "Ok" for saving of settings. The password to the access point "andkom" is "00000000". Then in the browser write down URL http://192.168.5.1:8804. In reply you will get web page where it is possible to enter SSID and the password for connection to your house access point. Input data and click "Ok" for saving the settings. Disconnect power supply from the module. Switch on both house Wi-Fi point (the home router) and the module in the normal mode. The module starts in the client mode (station) with correct SSID and password. You can send ping to see that the module works properly.

According to your desire connection settings to Wi-fi network can be configured on the production.

Experienced users can change settings from an URL (address bar of the browser). For example:
http://192.168.17.2:8804?ssid=new&cmd=change. The command changes the identifier of Wi-Fi network.
http://192.168.17.2:8804?password=secret&cmd=change. The command changes the password for connection to Wi-Fi network.
If password contains a space character it needs to be replaced with the plus character.
http://192.168.17.2:8804?password=my+secret&cmd=change.

Have any questions? Our technical specialist always help to create your smart house.

When you book installation of the smart house you can count on getting the professional expertise you’re looking for.

Questions and orders: andkom_smart_home@mail.ru

home