Recently we introduced a universal WiFi IR repeater, and we have released the configuration guide and control protocol command sets. Now everyone can DIY a set of remote infrared control system of your own.
Here, we will make a simple demonstration on how to control switch and temperature of air conditioner by using smart phone via WiFi.
First, connect power supply of WiFi IR repeater, and then you will hear a tickle from the buzzer, and the red power indicator will be illuminated which means that power is normal.
If the WiFi IR repeater is in initial state, it is under AP mode now (if it has already been set, you can use the reset button to restore factory settings), and we can use the computer to search for wireless network with SSID as R2WiFi (SSID may vary in different batches, for some devices, it is ITEAD IR Remoter).
Double-click to access into R2WiFi network, after successful connection, open WiFi config software, click "Search" button, you can search for a device with IP address as "192.168.2.3".
Choose infra station under WiFi mode, fill in WiFi SSID with the SSID of the wireless network of the router in your house, here we use "TP-Link_86F9B6". As our router has no password, we select “None in” Security mode. If yours has a password, then select the encryption method and fill in the password.
Select "enable" for DHCP (Please make sure that your router has DHCP function opened, generally it is opened as default). Then choose TCP for socket class, server for server type. Then fill in server port with 5432.
Click setup button, UART parameter setting window will be popped up, select the baud rate as 115200, Data bites as 8, Parity as None, Stop Bits as 1 and Flow ctrl as none.
Finally, click the “Apply” button, update the configuration to WiFi IR repeater.
Disconnect the power and then reconnect, after hearing a tickle, you can see the green LED indicator on WIFI module starts flashing indicating that it is connecting to a wireless router. We can log in the wireless router to see if the module is properly connected and which IP address is assigned.
Here, we can find R2WiFi, that is, WiFi IR repeater has been properly connected to a wireless router, and the assigned IP address is 192.168.1.104.
Next, we will use the "WiFi Bluetooth wireless debugging assistant" software to send commands to WiFi IR repeater to control it learn key codes and send codes to control the air conditioner.
First, the phone should be connected to the wireless router and share a same wireless network with IR repeater. Then open the software, select "TCP Client" button to enter. Under client mode, we need to enter the server IP address, which is the address of the infrared repeater, that is, "192.168.1.104", and the port is "5432" which we have already set. Press "Start Connection" button, the cell phone will be connected to the IR repeater and display "Already connected to server".
Because control commands we used are data sent by socket rather than a string, we need to check the "Send HEX" option in cell phone assistant (please download the latest version of the software on google play, as there is BUG in send HEX function in old version of the software which has been corrected in the latest version).
For details about command sets, you can refer to "WiFi infrared repeater command set" document. Here we will only introduce some simple operations:
First, a key of the air conditioner should be learnt. Send a piece of data "05 FA 05 01 00 04", and the returned data "05 FD 05 01 00 04" will be received indicating that a command is received, then you can point the remote control at the infrared receiver, press the switch button of air conditioner, the repeater will return "05 FD 01 00 00 01" which means that learning succeeds and the button code has been stored at the first storage position.
Next, we can send commands to control the WiFi IR repeater send command of learning. First point the repeater head at the air conditioner, send "05 FA 01 01 00 00" by cell phone, then the confirmation command "50 FB 01 01 00 00" sent by repeater will be received, and then you can hear a tickle from the air conditioner indicating that it is turned on and the infrared codes are successfully sent, IR repeater will send data "50 FC 03 00 00 03" again which means that it is sent successfully.
Therefore, as long as other key codes are added to different positions, you can directly control the air conditioner by sending commands of the position. Of course, this is designed for developers, Geeks can develop control devices or cell phone software according to their own needs to achieve the WiFi-to-infrared functions that they need. If you are an end user and want to have a software providing interface to add buttons, then you will have to wait for the new APP released in the future.