After the successful landing, the terminal turns into control interface from login interface, as shown in Fig. 2. At this moment, the user can click the button or the light bulb icon to send the preset commands. Then, the sendTextMessage() is called to send control commands for appliances as follow.