# Smart Air Conditioner using Internet of Things Khaloud Bati AL-Sa'idi ? & Dr. Vladimir Dyo ? Abstract-The local remote control is the traditional mechanism in which the end user controls the air conditioner. In the absence of this mechanism, the user loses the control. This thesis aimed to design and implement a smart air conditioner using Internet of Things (IoT) technology. Recent literatures were reviewed to select the most optimal platform to design and implement the project. The design of the project was then developed based on the selected platform. The project was then implemented and tested successfully. In order to validate the project, a questionnaire was carried out by potential users who tested the product on their SANYO air conditioner. All potential users were able to control their air conditioner remotely over the internet from anywhere. The smart air conditioner has absolutely no inference against real remote control. The product is cost effective, energy efficient and achieves the required automation functionality. # I. Introducton s it is known, the usual and traditional mechanism in which the end user controls the air conditioner is through local remote control. However, what if the local remote control is lost, broken, out of batteries or no longer available due to whatever faulty? On the other hand, what if the air conditioner is forgotten on due to human nature and no one is available to turn it off? How about controlling the temperature degree of your air conditioner while you are actually away? How about having a smart air conditioner that would be able to turn off by itself when people are not present and save energy? Reaching this point, Automation feature seems the best logical solution to handle and control the air conditioner remotely. Nowadays, Internet of Things (IoT); an emerging technology has risen in the digital realm. The original idea of Internet of Things was proposed at the end of 1990's. IoT is much more related to the wireless sensors networks, mobile communications networks and Internet. IoT can be defined as a network that connects every existing physical object in the world to a unique address in order to provide quick and smart services. In contrast to traditional Internet which interconnects intelligent physical objects only, IoT interconnects both intelligent and non intelligent physical objects due to the availability of object sensing layer (Ma, 2011). Hence, with Internet of Things, you may control everything using internet service. More specifically, through Internet of Things technology, you will be able to remotely control your air conditioner which will be connected to the internet from anywhere. Internet of Things technology uses cost effective, powerful and small size device that is considered to be a small size single board computer called Raspberry Pi. Raspberry Pi was developed by Raspberry Pi Foundation. There are four different types of Raspberry Pi such as: Original Raspberry Pi, Raspberry Pi, Raspberry Pi 2 and Raspberry Pi 3. The four different types come with both Model A and Model B flavors. Different platforms can be used as an Operating System for the Raspberry Pi such as: RISC OS, Arch Linux, Pidora, Raspbian and Microsoft Windows 10 IoT core (Harrington, 2015). The aim of this project is to design and implement a smart air conditioner using Internet of Things technology using Raspberry Pi 3 Model B device. The aim of this project is accomplished through fulfilling pre-defined objectives. Starting with reviewing related home automation system literatures. Moving to selecting the most suitable platform (Raspbian: the most popular platform used with Raspberry Pi or Windows 10 IoT core: the new platform developed by Microsoft) to design and implement the smart air conditioner. Testing, validating and exploring the gained features of the product are the final step towards accomplishing the project aim. The features of the designed smart air conditioner were decided through testing the implemented product by potential users. The smart air conditioner has absolutely no inference against real remote control. The product is cost effective, energy efficient and achieves automation functionality indeed. Each implemented project must involve intellectual challenges. Apparently, there are implemented air conditioner projects using Internet of Things raspberry Pi with different web and mobile enabled applications. However, in this project the web application is developed using PHP web language and MySQL database engine which are not used by any of the developed projects. Internet of Things means any physical object is connected to the internet. In this system, a smart air conditioner which can be controlled remotely through a web application is to be implemented. However, in order to control the air conditioner remotely, it must be connected to the internet in the first place. Obviously, the air conditioner does not have any internet connection port. Hence, it will be connected to the raspberry pi 3 that has the required internet connection A port. The connection between the air conditioner and the raspberry pi 3 is through the Infra-Red (IR) transmitter which is a Lite Emitting Diode (LED) emitting Infra-Red lights (connected to the raspberry pi 3) and Infra-Red (IR) receiver. Then, the internet connection port in raspberry pi 3 will be connected to Wi-Fi hot spot in order to get internet service. On the other hand, any physical device such as: a desktop, a laptop, a PAD and a smart phone which has a web browser in order to use the implemented web application is connected to the internet from anywhere to control the air conditioner remotely. Furthermore, the implemented air conditioner would be able to turn off by itself when people are not present. The following figure illustrates the above mentioned project specifications. # Literature Review Home automation systems have been a successful revolution in the technology world. Extensive researches were conducted on home automation systems. Indeed, home automation systems still receive an inordinate attention from academic organizations and institutions. Different technologies have been employed to build home automation systems, Al-Ali & Al-Rousan (2004) built a java-based home automation system where all home automated appliances were connected physically to an embedded board with integration to a Personal Computer acts as a web server which provided a remote access to the built system. Java-based home automation system provides a secure solution due to the built-in security feature handed over by java technology. However, the system is not cost effective due to the need of high quality specifications of the Personal Computer as well as expensive installed wired environment. Furthermore, since the system depends mainly on wired communication, installation's intrusiveness is increased. Sriskanthan et al. (2002) developed a Bluetooth based home automation system where each home physical appliance is connected to a local Bluetooth sub controller through wired connections. Each appliance communicates with the local Bluetooth sub controller connected to and then all local Bluetooth sub controllers communicate with a primary controller through wireless connection. In contrast to Java-based home automation system, Bluetooth based home automation system architecture reduces intrusiveness of wired installation due to the use of wireless technology. Nevertheless, some intrusiveness is still there due to the wired communication between home appliances and Bluetooth sub controllers. Moreover, this system connects one Bluetooth sub controller to many home physical appliances due to the cost of Bluetooth technology where it is appropriate to have a dedicated Bluetooth sub controller for each appliance. Never forget to mention that the use of one Bluetooth sub controller shared between many home appliances actually causes access delay. Zhu et al. (2010) proposed a Voice Control System for Zig Bee-based Home Automation system. Automatic speech recognition module is used to translate voice commands and send them to the actuator of the designed system via ZigBee network. Each automated home appliance is connected to a dedicated ZigBee module in order to operate and control it remotely. Similar to Java-based home automation system, developing a Voice Control System for ZigBee based Home Automation system is not cost effective due to the expense of ZigBee module; hence the system is becoming uneconomical as the number of physical home appliances to be automated is enlarged. Furthermore, the speech recognition system must have a module which unfortunately causes errors due to the noise. imperfections and limitations such as the cost, access delay, wired installation intrusiveness and power consumption. In this project, I selected different and innovative but existing technology which is Internet of Things (IoT). The reason behind using this technology in this project can be justified from my following findings on IoT technology. Internet of Things is considered to be the revolutionary technology in the future of the internet (Gubbi et al., 2013). Ma (2011) declared that the original idea of Internet of Things was proposed at the end of 1990's through MIT Auto-ID Labs. IoT is much more related to the wireless sensors networks, mobile communications networks and Internet. IoT can be defined as a network that connects every existing physical object in the world to a unique address in order to provide quick and smart Services (Ma, 2011). IoT is a complicated technology and it consists of four layers; application service layer, information integration layer, data exchange layer and object sensing layer. Application service layer offers satisfied services to different users. Information integration layer integrates unclear information into usable knowledge, recombines and cleans unclear information attained from networks. Data transmission transparency is handled by data exchange layer. Sensing objects and obtaining data are handled by the forth layer which is object sensing layer. Never forget to mention that sensing feature is not supported by traditional Internet and accordingly it only interconnects intelligent physical objects. On the other hand, IoT interconnects both intelligent and non-intelligent physical objects due to the availability of object sensing layer (Ma, 2011). Table 1 summarizes limitations of different existing home automation technologies and IoT addressed solutions. 2015) used Siri enabled mobile devices for remotely control home appliances, which are air conditioner unit, television, window blinds and lights using raspberry pi with Raspbian Operating System. In this system, the home appliances are connected to the raspberry pi through a relay and a motor driver. Both raspberry pi and Siri enabled mobile device are connected to the same local network (Celebre et al., 2015). Rieger (2016) used raspberry pi, IR Diode, IR receiver and stepper motor to build a web interface to remotely control blind opener and air conditioner. The user accessed the web interface which transmits issued commands to a controller script. This system used raspberry pi with Raspbian Operating System. Ivancreations.com (2016) built a mobile application and used Google voice recognition to remotely control Daikin air conditioner unit using raspberry pi and LED. In this system, the air conditioner unit is connected to the raspberry pi through Infra-Red transmitter LED. Both raspberry pi and the application based mobile are connected to the same local network through home Wi-Fi router (Ivancreations.com, 2016). The system is implemented using raspberry pi with Raspbian Operating System. Vasanwala (2015) developed Home Automation using Raspberry Pi2 and Windows 10 IoT system. Lights, fans and wall sockets are connected to an Arduino -Internet of Things microcontroller device -. Each room must have its own Arduino connected to home appliances in that room, one Passive Infra-Red module, one temperature sensor that senses human presence and one LDR which detects light intensity. All Arduino microcontrollers are then connected to the Raspberry Pi through I2C Bus. Basically, Arduino controls all home appliances and reads data from sensors and periodically sends those collected data to Raspberry Pi. Raspberry Pi sends data collected from Arduino microcontrollers to a wire frame application. You may control connected home appliances using wire frame application as well. Low-cost Home Automation with Voice Control system is built by Gillett (2015). The system used Node.js server to control different existing hardware in a room such as: lights, door and LED Strip using Raspberry Pi. A web application is built based on voice control in order to control room's hardware remotely. When the user clicks on microphone button in the application, Raspberry Pi starts recording voice audio. The recorded audio is then sent to a natural language API called Wit.ai in order to analyze it and extracts the meanings. The extracted meanings are then sent back to Raspberry Pi in order to perform the action. The system is built using Raspberry Pi with Microsoft Windows 10 IoT core Operating System Platform. Ganesan (2015) built WARAN -Home Automation system. WARAN is a modular system stands for Windows IoT, Azure, Raspberry Pi, Arduino, NRF24L01+ wireless solution. WARAN consists of one Hub acts as a control server and many modules such as: temperature sensor module and humidity sensor module which are connected to an Arduino. The basic functionality of the system is that the added modules read data and sends them to the Arduino through NRF24L01+. Arduino is then sends collected data from the sensors to the control server in Raspberry Pi through I2C Bus. Collected data from sensors such as: warnings and alerts in any module is also posted in a Windows phone application. Through reviewing the above existing recent studies and conducted researches on controlling home appliances remotely, it is obvious that air conditioner appliance is successfully controlled remotely via Raspbian Platform using Linux Infrared Remote Control (LIRC). LIRC is an open source library that allows a user to record, decode and send Infra-Red signals of many standard remote controls (Bartelmus, 2016). On the other hand, there isn't any published system that controlled air conditioner remotely using Microsoft Windows 10 IoT core Platform. No one till now could implement any home appliance operates using Infra-Red signals using Windows 10 IoT core because it does not have any Infra-Red library. There were researches which attempted to automate home air conditioners using Win LIRC but they all failed. Win LIRC is Windows equivalent of LIRC which enables users receive and transmit Infra-Red signal of standard remote controls (Baily et al., n.d.). 10 IoT core is compatible with different open source languages and works efficiently with Visual Studio platform as well (Teixeira, 2015). Window 10 IoT core brings all powerful feature of Windows into your devices such as online storage, 410c (Teixeira , 2015;. Windows 10 IoT core intended to have a low barrier to access; hence making it easy to build professional devices. Windows designed for an easy use with different software packages (Harrington, 2015). Windows 10 IoT core is an innovative version of Windows 10 and is targeting the small and embedded devices with or without display screens Raspberry Pi 2, Raspberry Pi3, Minnow Board MAX and Dragon Board recommended to start with Raspbian since it is called Raspbian. Raspbian inherits almost all Debian features including above 35,000 free software packages. Beginners with Raspberry Pi are strongly The system architecture includes the infrastructure and network design of the system. The web application will be designed using PHP web language and Raspbian will be the business logic for the design. The system architecture of the system is shown in Figure 3. My SQL server is used as web server to store data for web console and database server will be hosted in LAMP in Raspberry Pi 3. VPN will be used between the LAMP and the Internet for security issue. PHP will be used as the front End and SQL database as the backend of the web application. The user can access the web application by writing the address in the web browser. On the other hand, the air conditioner is connected to the Wi-Fi at the same time. As mentioned earlier, air conditioner does not have an internet connection port. Hence, it will be connected to the raspberry pi 3 that has the required internet connection port. The connection between the air conditioner and the raspberry pi 3 is through the Infra-Red (IR) transmitter which is a Lite Emitting Diode (LED) emitting Infra-Red lights (connected to the raspberry pi 3) and IR receiver. Always remember that the circuit needs resistors in order to control current flow and maintain the raspberry pi from damage. Figure 4 illustrates circuit design used in the project. IR LED is responsible of emitting infra-red signals and IR receiver is responsible of receiving infrared signals and modulating them. Basically this circuit design is going to be used to read SANYO air conditioner remote control and interpret its codes. The Wire Frame Design for the system is shown in Figure2. When the user who has a right access logs in the website, he will be able to see Control AC tab. The Control AC tab includes controlling AC power and the temperature of the air conditioner. serious limitation with Windows 10 IoT core platform in reference to the lack of Infra-Red library. As a result, the most optimal platform to implement the smart air conditioner using Internet of Things is going to be Raspbian platform since it supports LIRC library. Before implementing the project, an overall design is built. # III. # System Desighn Through reviewing different recent literatures demonstrated in CHAPTER 2, apparently there is a The following software packages are needed to implement the smart air conditioner: ./build gpio -vgpio readall sudo service apache2 restart sudoleafpad/etc/lirc/hardware.conf 6. Change hardware. conf file exactly as the following file ?######################################################## # /etc/######################################################## 7. Type the following commands to stop and start lircd service so that the above made changes take effect successfully: sudo /etc/init.d/lirc stop sudo /etc/init.d/lirc start Then you will be prompt to enter a name for each button you press. Kindly, note that you cannot enter any random names for your recorded keys. LIRC has its own buttons' names. In order to check these valid names, type the following command: irrecord --list-namespace irsend SEND_ONCE ir1.conf KEY_POWER2 7. In order to send the recorded signal for increasing the volume of the temperature, type the following command: irsend SEND_ONCE ir1.conf KEY_UP MySQL database engine is used to create the database. PHP web language is used as connection agent between the web page and the database. ? Note 2: All files related to the web application development will be found the following path: /var/www/html USE ac_control; SELECT * FROM login 12. Type the following command to quit MySQL server: sudo chmod 777 header.php Weaved is a free software to be installed in Raspberry Pi and enables the user to connect to this Raspberry Pi and access its hosted web pages over internet from anywhere. In fact, Weaved provides Internet of Things (IOT) Kit to be used in Raspberry Pi. Weaved offers many services such as: SSH on port 22, Web (HTTP) on port 80, VNC on port 5901 and custom TCP connection (Sangesari, 2015). q) Setting Up Weaved Software in Raspberry Pi 3: ./weaved-nixinstaller_1.2.13.bin sudo crontab -e 1. 3. Add the following lines and exit the editor: @reboot sudo /usr/bin/Weavedweb80.sh start & 4. Press ctrl + x to exit the editor and press Y when it prompts you to save changes using CTRL + X 5. Reboot your Raspberry Pi 3 in order to take effect of made changes using the command: sudo reboot V. Integration and Testing a) Integration Now implementing and configuring each circuit was done successfully. The second stage of implementation is integration. Integration means combining all individual circuits in one solderless bread board in order to create one complete circuit. The integrated circuit is illustrated in Figure11. # b) Results After implementing the smart air conditioner project successfully, the following figures illustrate the results of the project tested and carried out by a smart phone which does not belong to the same network the Raspberry Pi 3 is connected to. It means, the smart phone is somewhere away from the Raspberry Pi 3 network and they are connected over the internet using Weaved service. I am interested on home automation services. 2. The system helped me to control my air conditioner unit remotely from anywhere using any device with a web browser. # Statistics The system helped me to control my air conditioner unit remotely from anywhere using any device with a web browser. a. Calculated from grouped data. The system helped me to control my air conditioner unit remotely from anywhere using any device with a web browser. I feel much more comfortable to use this system than the local remote control. 5. I recommend using this system as a product in technology market. a. Calculated from grouped data. I recommend using this system as a product in technology market. Through reviewing the above obtained statistics, the implemented smart air conditioner product is obviously gaining trust of the potential users and accordingly the gained features from the implemented product are: The smart air conditioner has absolutely no inference against real remote control. The product is cost effective, energy efficient and achieves automation functionality indeed. # b) Summary The local remote control is the traditional mechanism in which the end user controls the air conditioner. In the absence of this mechanism, the user loses the control. However, there is another mechanism in which the user may remotely control the air conditioner through Internet of Things (IoT) technology. A smart air conditioner using IoT was designed and implemented using Raspberry Pi 3 Model B device. Validity of the project was achieved through testing the implemented product by 14 potential users who own SANYO air conditioner. All potential users were able to control their air conditioner remotely over the internet from anywhere. The smart air conditioner has absolutely no inference against real remote control. The product is cost effective, energy efficient and achieves the required automation functionality. # c) Future Work In future, I would like to expand this project to contain almost all controllable home appliances. A smart home automation system will absolutely help people control their home appliances remotely over the internet from anywhere. # Acknolodgments I would like to seize the opportunity to openly give my special thanks to the following people who granted me their support and assistance during my Master's degree course. Dr. Vladimir Dyo for his precious supervision, assistance and comments during the course; Dr.Haider AL-Khateeb for his continuous directions and workshops over the course. My extreme thanks to people who took time completing my questionnaire. I would also like to offer my gratefulness to my family for their full encouragement and support to complete my Master's degree. Finally, my utmost thanks to my best friend for her continuous assistance over the past two years. 1![Figure 1: Smart Air Conditioner Using Internet of Things System Specifications](image-2.png "Figure 1 :") 2![Figure 2: Web Application Wire Frame for Smart Air Conditioner Controller b) Architecture DiagramThe system architecture includes the infrastructure and network design of the system. The web application will be designed using PHP web language and Raspbian will be the business logic for the design. The system architecture of the system is shown in Figure3. My SQL server is used as web server to store data for web console and database server will](image-3.png "Figure 2 :") 3![Figure 3: Architecture Diagram for Smart Air Conditioner Controller c) Circuit DesignAs mentioned earlier, air conditioner does not have an internet connection port. Hence, it will be connected to the raspberry pi 3 that has the required internet connection port. The connection between the air conditioner and the raspberry pi 3 is through the Infra-Red (IR) transmitter which is a Lite Emitting Diode (LED) emitting Infra-Red lights (connected to the raspberry pi 3) and IR receiver. Always remember that the circuit](image-4.png "Figure 3 :") ![Smart Air Conditioner using Internet of Things 5 Year 2020 © 2020 Global Journals a) Web Application Wire Frame](image-5.png "") 4![Figure 4: Smart Air Conditioner Circuit Design IV. Implementation a) Hardware In order to implement the smart air conditioner, the following hardware is required: ? Raspberry Pi 3 Model B.](image-6.png "Figure 4 :") 5![Figure 5: Raspberry Pi 3 Model B ? PIR (Passive Infra-Red) Motion Sensor](image-7.png "Figure 5 :") 6![Figure 6: Passive Infra-Red Sensor ? SD Card (Minimum 8 GB).](image-8.png "Figure 6 :") 7![Figure 7: SD Card ? SD Card Reader. ? IR Receiver.](image-9.png "Figure 7 :") 8![Figure 8: IR Receiver](image-10.png "Figure 8 :") 9![Figure 9: IR Transmitter](image-11.png "Figure 9 :") 10![Figure 10: 10k ohm Resistor](image-12.png "Figure 10 :") 12![Figure 12: HDMI to VGA Cable ? Solder less Bread Board](image-13.png "Figure 12 :") 13![Figure 13: Solder less Bread Board](image-14.png "Figure 13 :") 14![Figure 14: Jumper Cables](image-15.png "Figure 14 :") 15![Figure 15: Win32 Disk 4. Eject your SD card from the SD card reader and mount your SD card into your Raspberry Pi 3.](image-16.png "Figure 15 :") 16![Figure 16: SD CARD on Raspberry Pi 3 Model 5. Connect your Raspberry Pi 3 to your monitor using HDMI to VGA cable. 6. Connect your USB keyboard and mouse. 7. Connect the power cable of the Raspberry Pi 3. 8. Power on your Raspberry Pi 3.](image-17.png "Figure 16 :") 17![Figure 17: Screenshot of startup Raspbian Operating System](image-18.png "Figure 17 :") 19![Figure 19: Screenshot of Testing Wiring Pi in terminal e) LIRC (Linux Infrared Remote Control) Installation and Configuration In order to be able to record your air conditioner remote control Infra-Red codes, you have to install and configure LIRC in your Raspberry Pi 3. ? Definition LIRC: is an open source library that allows a user to record, decode and send Infra-Red signals of manynot all-remote controls (Bartelmus, 2016). The followings steps describe installation and configuration LIRC in your Raspberry Pi 3: 1. Open command terminal in your raspberry Pi 3. 2. Type the following command to install LIRC library: sudo apt-get install lirc](image-19.png "Figure 19 :") ![g) Implementation and Testing i. LIRC Setup in Raspberry Pi 3: Prior implementing the project, you must setup LIRC in your Raspberry Pi 3. The following steps describe implementation of IR Receiver circuit: 1. Open command terminal in your raspberry Pi 3. 2. Type the following command to check GPIO output and input pins in Raspberry Pi 3 and select the appropriate for you:gpio readall](image-20.png "") 20![Figure 20: Screenshot of gpio readable command on Rasbpian Operating 3. Type the following command to edit modules file: sudo leafpad /etc/modules 4. Add the following two lines into modules file: lirc_dev lirc_rpi gpio_in_pin=17 gpio_out_pin=27](image-21.png "Figure 20 :") ![i) IR Transmitter i. Wiring up IR Transmitter 1. Place IR Transmitter in your solder less bread board. 2. Place NP2222 transistor in series with the IR Transmitter (short pin of the IR Transmitter). ? Note: The main function of the NP2222 transistor is amplifying or/and switching electronic signals and electrical power. In other words, any applied current or voltage to one pair of the transistor may be changed before reaching the other pair of the transistor as needed. 3. Place 10k ohm resistor in series with the NP2222 transistor, one pin in series with the base and one pin in series with the collector. ? Note: The main function of the 10k ohm resistor is to control the current flows across the IR Transmitter and keep it safe from burning. 4. The long pin of the IR Transmitter is connected to GPIO 5v pin (DC Power) in your Raspberry Pi 3 in order to power on your IR Transmitter. 5. The first pin of 10k ohm resistor that is connected in series with NP2222 transistor is connected to GPIO pin 17 as per the configuration we made earlier in LIRC. 6. The second pin of 10k ohm resistor is connected to GPIO ground pin in your raspberry Pi 3. ii. Testing the IR Transmitter Circuit 1. Power on your Raspberry Pi 3. 2. Open the terminal in your Raspberry Pi 3 and type the following command to stop lircd service: sudo /etc/init.d/lirc stop](image-22.png "") 21![Figure 21: Screenshot of lircd command on terminal window Create a new configuration file for your air conditioner remote control called ir1.conf using the following command:](image-23.png "Figure 21 :") 22![Figure 22: Screenshot of creating new configuration file on Raspbian](image-24.png "Figure 22 :") 23![Figure 23: Screenshots of irrecod instructions You have to follow the instruction and record codes to turn on, turn off, increase the volume of the temperature and decrease the volume of the temperature for the air conditioner.Then you will be prompt to enter a name for each button you press. Kindly, note that you cannot](image-25.png "Figure 23 :") 24![Figure 24: Screenshots of valid names assigned to recorded buttons in LIRC In this test I picked up the following keys ? KEY_POWER to turn on the air conditioner. ? KEY_POWER2 to turn off the air conditioner.](image-26.png "Figure 24 :") 25![Figure 25: Screenshot of assigning names to recoded buttons 3. Copy the new created ir1.conf file into the original lircd.conf file created by LIRC using the command: sudo cp ir1.conf /etc/lirc/lircd.conf 4. Type the following command to start lircd service: sudo /etc/init.d/lirc start](image-27.png "Figure 25 :") 26![Figure 26: Screenshot of switching sir conditioner in command window 6. In order to send the recorded signal for turning off the air conditioner that is saved in lircd.conf, type the following command:](image-28.png "Figure 26 :") 272829![Figure 27: Screenshot of establishing MySQL server connection 3. Type the following command to show the databases you have in your server SHOW DATABASES](image-29.png "Figure 27 :Figure 28 :Figure 29 :") 303![Figure 30: Screenshot of different quires to ac_control database in MySQL l) Login Web Page ? Note: In order to make my web application secure, I have created a login web page. 1. Open the terminal in your Raspberry Pi 3. 2. Type the following command to access /var/www/html directory: cd /var/www/html 3. Type the following command to create login.php file: sudo touch login.php 4. Type the following command to give full permission to login.php file while editing: sudo chmod 777 login.php 5. Go to /var/www/html directory and double click on login.php you have created in step 3. 6. Add the following PHP code and save the file: See APPENDIX B: IMPLEMENTATION SOURCE CODE, Section II: login.php Source Code m) Connection between Login Web Page and ac_control Database ? Note1: In order to connect between login web page and ac_control database, I have created a PHP file called submit.](image-30.png "Figure 30 : 3 .") 53![Go to /var/www/html directory and double click on header.php you have created in step 3. 6. Add the following PHP code and save the file: See APPENDIX B: IMPLEMENTATION SOURCE CODE, Section V: header.php Source Code o) Testing Web Application First: Testing Web Application when the Raspberry Pi 3 and Web Browser Device belong to the same network: 1. Power on your Raspberry Pi 3. 2. Connect your Raspberry Pi 3 to Wi-Fi through wireless dongle. Open the terminal in Raspberry Pi 3 and type the following command to start lircd service: sudo /etc/init.d/lirc start 4. Type the following command to start your PIR Sensor: sudo python /home/pi/pir.py 5. Open the browser in your Raspberry Pi 3 and type the following: http://the IP address of your Raspberry Pi 3/login.php In order to check the IP address of the Raspberry Pi, type the following command: ifconfig In my project, the IP address of my Raspberry Pi 3 is: 192.168.43.181, so it will be something like: http://192.168.43.181/login.php 6. Insert the username: master and the password: master-ac@321 and click Submit button. You should be directed to iotAC.php page. Now click ON to turn on the air conditioner, OFF to turn off the air conditioner, + to increase temperature volume and -to decrease temperature volume. If all buttons operate as it is supposed, then your application is developed successfully.](image-31.png "5 . 3 .") 313217333435![Figure 31: Login Page of air conditioner website](image-32.png "Figure 31 :Figure 32 : 1 : 7 .Figure 33 :Figure 34 :Figure 35 :") 367![Figure 36: Screenshot of dhcpcd.conf 5. Press ctrl + x to exit the editor and press Y when itprompts you to save changes using CTRL + X 6. Reboot your Raspberry Pi 3 in order to take effect of made changes using the command: sudo reboot7. Check the IP address of the Raspberry Pi by type the following command: Ifconfig p) Accessing Developed Web Application from Anywhere Over the Internet ? Note 1: The developed web application is implanted and tested successfully as it discussed above. However, any user can control the air conditioner remotely within the local network only. In order to be able to control the air conditioner from the internet outside your local network, you need a public IP address for your Raspberry Pi 3. In this project, I used Weaved services.](image-33.png "Figure 36 : 7 .") 37![Figure 37: Screenshot of downloading weaved installer using wget utility 6. Type the following command to make the installer executable:chmod +x weaved-nixinstaller_1.2.13.bin 7. Type the following command to launch the executable installer:](image-34.png "Figure 37 :") 8![Select the service you want from the listed services. In my project I select: Web (HTTP) on default port 80 ? Note 1: You will be asked in you want to continue with the default assigned port which is 80. If you decide to keep it the same as default, type y. If you decide to change the port, type n and follow the instructions. In my project, I chose to keep the default port 80.](image-35.png "8 .") 389![Figure 38: Select the required weaved service](image-36.png "Figure 38 : 9 .") 3940![Figure 39: Login details for waved web services ? Note 2: You will be asked to enter an alias for your device, type the name you admire. In my project, I typed: iotac](image-37.png "Figure 39 :Figure 40 :") 4142![Figure 41: Screenshot of weaved web installation 12. Sign into your Weaved service in the following link: https://developer.weaved.com/portal/login.php?error=NoSession](image-38.png "Figure 41 :Figure 42 :") 43![Figure 43: Weaved service page 14. Click on the alias for your services listed under Name column in order to connect your service. Then your service settings will be displayed.](image-39.png "Figure 43 :") 4445![Figure 44: IP address to connect to service 15. When your service is connected it will display apache server web page says It works! It means your service is up now. Take the address after http:// and paste it in your web browser with the](image-40.png "Figure 44 :Figure 45 :") 46![Figure 46: Smart Air Conditioner Using Internet of Things Integrated Circuit Testing: Same testing techniques used in Section 4.3 Implementation and Testing can be applied in the integrated circuit. If same results are obtained, then your integration is done properly. Results are discussed and illustrated in details in 4.5 Results Section.](image-41.png "Figure 46 :") 47![Figure 47: login.php Web Page](image-42.png "Figure 47 :©") ![](image-43.png "") ![](image-44.png "") ![](image-45.png "") ![](image-46.png "") ![](image-47.png "") ![](image-48.png "") ![](image-49.png "") 1Existing recent studies and conductedIn this thesis, I will discuss two differentresearches on controlling home appliances remotelyplatforms which are Raspbian, the most popularmainly focuses on the use of IoT devices such asOperating System used for Raspberry Pi and MicrosoftRaspberry Pi developed by Raspberry Pi Foundation.Windows 10 IoT core, the new raised Operating SystemRaspberry Pi is cost effective, powerful and small sizedeveloped by Microsoft.device that is considered to be a small size single boardRaspbian is an open source Linux basedcomputer. Raspberry Pi may operate using differentOperating System. It is a modified platform from Debianplatforms; RISC OS, Arch Linux, Pidora, Raspbian andMicrosoft Windows 10 IoT core (Harrington, 2015). ? Definition Apache: is one of the most popular web server applications. It is installed in Raspberry Pi 3 to serve developed web pages by the user (raspberrypi.org, 2016). Follow the following steps in order to install and configure Apache server: 1. Open command terminal in your raspberry Pi 3. 2. Type the following command to install Apache2 package: sudo apt-get install apache2 -y3. Second: PHP Setup: ? Definition PHP: 2. Type the following PHP code inside test.php and save the file: 3. Open a web browser in your Raspberry Pi 3 and type: http://localhost/test.php Third: MySQL Setup ? Definition MySQL: is one of the most popular database engines (raspberrypi.org, 2016). Follow the following steps in order to install and configure MySQL: 1. Open command terminal in your raspberry Pi 3. 2. Type the following command to install MySQL server and PHP-MYSQL packages: sudo apt-get install mysql-server php5-mysql -y 3.3sudo apt-get install php5 libapache2-mod-php5 -y 3. Test PHP using steps listed below: 1. Create test.php file using the following command in terminal:sudo leafpad test.php ii. Creating the Web Page1. Open the terminal in your Raspberry Pi 3.2. Type the following command to access/var/www/html directory:cd /var/www/html3. Type the following command to create iotAC.phpfile:sudo touch iotAC.php4. Type the following command to give full permissionto iotAC.php file while editing:sudo chmod 777 iotAC.php5. Go to /var/www/html directory and double click oniotAC.php you have created in step 3.6. Add the following PHP code and save the file:See APPENDIX B: IMPLEMENTATION SOURCE CODE,Section II: iotAC.php Source Codeiii. Building up the Database1. Open the terminal in your Raspberry Pi 3.2. Type the following command to access MySQLserver:mysql -u root -p 10. Type the following command to add masterusername with master-ac@321 password into logintable inside ac_control database:CREATE TABLE `login` (`usernameVARCHAR (255), `password`VARCHAR(255))INSERT INTO login values (`master`,`master-ac@321`)11. Type the following command to check if the username and password you have added in step 8 exist in login table: 16. I opened my web browser and typed the following inthe address bar:http:// pjgwefdz.p6.weaved.com/login.php? Note 3:? Note 4: StatisticsI feel much more comfortable to use this system than the local remote controlFrequency PercentValid PercentCumulative PercentDisagree214.314.314.3ValidNeutral17.17.121.4Agree750.050.071.4Year 2020Strongly Agree Total a. Calculated from grouped data.4 1428.6 100.028.6 100.0100.028Valid14NMissing0Mean4.5714Median4.5714 a( ) EMaximum5.00FrequencyPercentValid PercentCumulative PercentAgree642.942.942.9ValidStrongly Agree Total8 14Valid57.1 100.057.1 100.0 14100.0Missing0Mean4.5714Median4.5714 aMaximum5.00Frequency PercentValid PercentCumulative PercentValidAgree Strongly Agree Total6 8 1442.9 57.1 100.042.9 57.1 100.042.9 100.0© 2020 Global Journals3.The system is easy to use.Statisticsa. Calculated from grouped data.The system is easy to use. Smart Air Conditioner using Internet of ThingsNValid14Missing0Mean4.2857Median4.3077 aMaximum5.00Year 2020 34 Volume XX Issue III Version I Global Journal of Computer Science and Technology ( )Frequency 1 8 5 14 I am looking forward to your cooperation to conduct the questionnaire. Percent Valid Percent Neutral 7.1 7.1 Agree 57.1 57.1 Valid Strongly Agree 35.7 35.7 Total 100.0 100.0 Gender: o Male o Female ____________________________________________________________________________ Cumulative Percent 7.1 64.3 100.0 1. I am interested on home automation services. o Strongly Disagree o Disagree o Neutral o Agree o Strongly Agree 2. o Strongly Disagree o Neutral o Agree o Strongly Agree 3. The system is easy to use. o Strongly Disagree o Disagree o Neutral o Agree o Strongly Agree 4. I feel much more comfortable to use this system than the local remote control. o Strongly Disagree o Disagree o Neutral o Agree o Strongly Agree 5. I recommend using this system as a product in technology market. o Strongly Disagree o Disagree o DisagreeAge: ???o Neutralo Agreeo Strongly AgreeThank you for your valuable time? © 2020 Global Journals Year 2020 ( ) Year 2020 © 2020 Global Journals Year 2020 ( ) E © 2020 Global Journals Appendix a: User Satisfaction Questionnaire User Satisfaction Questionnaire Dear SANYO split air conditioner users; Smart Air Conditioner Using Internet of Things Product helps you to remotely control your air conditioner through a web application from any windows physical device such as a desktop, a laptop, a PAD and a smart phone you possess. The implemented smart air conditioner would be able to turn off by itself when people are not present and save energy. Results of the survey will be treated with full confidentiality and it will be stored in a secure place. Likewise, the obtained results will be used to monitoring your satisfaction as a customer and to identifying improvements to the product. * Adafruit NPN Bipolar Transistors (PN2222) -10 pack September 2016 no date. sa=i&rct=j&q=&esrc= s&source=images&cd=&cad=rja&uact=8&ved-=0 ahUKEwiph7GQwJ7PAhXIfhoKHSscDAwQjRwIBw& url=https%3A%2F%2Fwww.adafruit.com%2Fproduc t%2F756&bvm=bv.133387755,d.d2s&psig=AFQjCN F2Tqfao5I260UJsswEZwpaekoMNQ&ust=14741479 981711608 * Java-based home automation system ARAl-Ali MAl-Rousan IEEE Transactions on Consumer Electronics 50 2 2004 * wholesale ir receiver sensor Aliexpress 2010. September 2016 sa=i&rct=j&q=&esrc=s&source=images&cd =&cad=rja&uact=8&ved=0ahUKEwiCtKPjtZ7PAh WCxxQKHfJ_CqcQjRwIBw&url=http%3A%2F%2Fw ww.aliexpress.com%2Fw%2Fwholesale-ir-receiverse nsor.html&bvm=bv.133387755,bs.2,d.d2s&psig=A FQjCNFQSU4yWI7bHpwiD2b6bP1YC1v_gg&u=147 1474477202999505 * Windows 10 IoT core support for raspberry pi 3 BAnders 2016 12 * Windows 10 IoT on Raspberry Pi with Visual Studio and C# Universal Apps AzureAustin 2015. November 2015. May 2016 29 17 * SBaily JParis IN DCurtis Winlirc May 2016 * Setting up LIRC on the RaspberryPialexba ABain 2013. September 2016 * LIRC -Linux infrared remote control CBartelmus 2016. September 2016 * Buyapi HDMI TO VGA ADAPTER 2016 * Akaqjrwibw&url=https%3a%2f%2fwww Buyapi September 2016 c a%2Fproduct%2Fhdmi-to-vgaadapter%2F&bvm=b bv.133387755,bs.2,d.d2s&psig=AFQjCNHRqQT7G nYkvXB9xqoIoZpKvQGKDg&ust=14744800350529 21 * The Internet of Things: connecting the world. Personal and Ubiquitous Computing JCarretero JDGarcía 2014 18 * Home automation using raspberry Pi through Siri enabled mobile devices AM DCelebre AZ DDubouzet IB AMedina AN MSurposa RCGustilo Humanoid. Nanotechnology, Information Technology, Communication and Control, Environment and Management (HNICEM), 2015 International Conference on IEEE 2015. December * PIR motion sensor module CES 2016 * Availabl * QjRwIBw&url=http%3A%2F%2Fwww.ceseshop.com %2Fdir%2Findex.php%3Froute%3Dproduct%2Fprod uct%26product_id%3D691&bvm=bv.133387755,d.d 2s&psig=AFQjCNEGvpCnTSxFrIwqDnZekI7WmMFH XQ&ust=1474476830366270 Accessed 6 * Solder less Breadboards ?sa=i&rct=j&q=&esrc=s&source=images&cd= &cad=rja&uact=8&ved=0ahUKEwiToDDwJ7PAhU GExoKHftUDhoQjRwIBw&url=https%3A%2F%2Fww w.circuitspecialists.com%2Fsolderlessbreadboards &bvm=bv.133387755,d.d2s&psig=AFQjCNFhZvVC -7Ez-p2-sTwv9bYI0FB3_g&ust=1474480075353879 2016. 2016 Accessed 6 September * Raspberry pi 3 model B $30 Gadgetar 2016 * com %2Fraspberry-pi-3-modelb%2F&psig=AFQjCNH0c 28fbs0_m01DowQzmdbYZW95Q&ust=1474476903 101223&cad=rjt Qjrwibw&url=http%3a%2f%2fwww Gadgetar 6 September 2016 * WARAN -Home Automation AGanesan 2015. May 2016 * Internet of Things (IoT): A vision, architectural elements, and future directions JGubbi RBuyya SMarusic MPalaniswami Future Generation Computer Systems 29 7 2013 * Learning Raspbian WHarrington 2015 Packt Publishing Ltd * Control Air Conditioner with RaspberryPI and a LED Ivancreations Com 2016. May 2016 * Smart objects as building blocks for the internet of things HKopetz USSpringer GKortuem FKawsar DFitton VSundramoorthy Real-time systems IEEE 2011. 2010 14 Internet of things * Internet of things: Objectives and scientific challenges HDMa Journal of Computer science and Technology 26 6 2011 * Building Internet of Things using C# Meetup 2015. May 2016 * How to give your Raspberry Pi a Static IP Address -UPDATE Modmypi 2016. September 2016 how-to-give-your-rs pberry-pi-a-static-ip-address-update * Low-cost Home Automation with Voice Control MGillett 2015. May 2016 * Microsoft 2016. 2016 Accessed 14 May * Learn about windows 10 IoT core Microsoft 2016. 2016 Access ed 12 April * Microsoft Projects Microsoft 2015. April 2016 12 * The Internet of your things Microsoft 2016. 10 April 2016 * Internet of things: Vision, applications and research challenges DMiorandi SSicari FDe Pellegrini IChlamtac 2012. 2006. May 2016 10 22 net-tutorials The complete C# Tutorial * Overview of Visual Studio Microsoft 2016. 2015. April 2016 15 * Build a LAMP Web Server with Word Press 2016. September 2016 * Raspberry Pi Blind & AC Controller CRieger 2016. May 2016 24 * Available at: https:/ /www.google.com/url?sa=i&rct=j&q=&esrc=s&so urce=images&cd=&cad=rja&uact=8&ved=0ahU KEwirocbHtZ7PAhVBnBQKHXNIB5QQjRwIBw&url= https%3A%2F%2Fwww.amazon.com%2FSandisk-MicroSDHC-Memory-Card-Adapter%2Fdp%2FB00 38. Vasanwala, A.S. 2015. Home Automation using Raspberry Pi 2 and Windows 10 IoT Sandisk 8GB Sandisk MicroSDHC Memory Card with SD Adapter May 2016 25 * PJVis 10k / 10k ohm Resistor Colour Code * HvwYc-WVntd_DyEVBHB8z7TNG7w&ust=1474479 311654384&cad=rjt 6 September 2016 * Wiringpi 2016. September 2016 * Access your Raspberry Pi over the Internet RSangesari 2015. 9 September 2016 * Solarbotics ?sa=i&rct=j&q=&esrc=s&source =images&cd=&cad=rja&uact=8&ved=0ahUKEwi XvsjhwJ7PAhXHExoKHeLkDGwQjRwIBw&url=https %3A%2F%2Fsolarbotics.com%2Fproduct%2F45072 %2F&bvm=bv.133387755,d.d2s&psig=AFQjCNEm 2gdG6H2KoqoqGovHCVtqsQFcA&ust=147448014 4244078 September 2016 45072 40 pin Female-to-Female Jumper Cable * Bluetooth based home automation system NSriskanthan FTan AKarande Microprocessors and Microsystems 26 6 2002 * Hello, Windows 10 IoT Core SteveTeixeira 2015. April 2016 12 * IoTbased intelligent perception and access of manufacturing resource toward cloud manufacturing. Industrial Informatics FTao YZuo LDa Xu LZhang IEEE Transactions on 10 2 2014 * Techshopbd 2012 IR Transmitter -White [image * FWortmann KFlüchter 2015 Internet of Things * Internet of things FXia LTYang LWang AVinel International Journal of Communication Systems 25 9 1101 2012 * Developing a voice control system for zigbee-based home automation networks JZhu XGao YYang HLi ZAi XCui 2nd IEEE International Conference on Network Infrastructure and Digital Content IEEE 2010. September. 2010