INTERNET OF THINGS: WEB BASED TEMPERATURE DASHBOARD

INTERNET OF THINGS: WEB BASED TEMPERATURE DASHBOARD Electrical and Computer Engineering: Masters Project Report Student Name Date Contents Abstract...
Author: Gerard May
39 downloads 1 Views 2MB Size
INTERNET OF THINGS: WEB BASED TEMPERATURE DASHBOARD Electrical and Computer Engineering: Masters Project Report

Student Name Date

Contents Abstract................................................................................................................................................................................... 3 Introduction ............................................................................................................................................................................ 4 Hardware ................................................................................................................................................................................ 5 Raspberry Pi ........................................................................................................................................................................ 5 DS18B20 Temperature Sensor ........................................................................................................................................... 6 Jumper Wires ...................................................................................................................................................................... 6 Half-Sized Breadboard ....................................................................................................................................................... 6 4.7 KΩ Resistor ................................................................................................................................................................... 7 Motorola Surfboard SBG6580 Wi-Fi Router ...................................................................................................................... 8 External PC .......................................................................................................................................................................... 9 Hardware Conclusion ......................................................................................................................................................... 9 Software ............................................................................................................................................................................... 10 Raspbian Operating System ............................................................................................................................................. 10 Apache .............................................................................................................................................................................. 10 MYSQL............................................................................................................................................................................... 11 Python ............................................................................................................................................................................... 12 PHP .................................................................................................................................................................................... 12 Bash................................................................................................................................................................................... 13 HTML/CSS ......................................................................................................................................................................... 13 JavaScript/jQuery ............................................................................................................................................................. 13 Software Conclusion......................................................................................................................................................... 14 Results................................................................................................................................................................................... 15 Possible Enhancements........................................................................................................................................................ 17 Potential Application of Underlying Paradigm (Internet of Things) ................................................................................... 18 Conclusion ............................................................................................................................................................................ 18 References ............................................................................................................................................................................ 19

1

Figure 1: Image of Raspberry Pi Model B+ ............................................................................................................................ 5 Figure 2: Image of the DS18B20 Temperature Sensor .......................................................................................................... 6 Figure 3: Circuit Diagram Pull-Up Resistor, Voltage Power Supply and 1-Wire Data Pin .................................................... 7 Figure 4: Local Area Network Layout ..................................................................................................................................... 8 Figure 5: Network Layout after Port Forwarding .................................................................................................................. 8 Figure 6: Prototype Generating Using Fritzing Software ...................................................................................................... 9 Figure 7: Implementation of the Prototype That Was Generated Using Fritizing Software ............................................... 9 Figure 8: Raspbian Operating System Screenshot .............................................................................................................. 10 Figure 9: Screenshot of SQL Code Used to Create Temperature Table .............................................................................. 11 Figure 10: Screenshot of the MYSQL Database Table Setup in the Linux Terminal ........................................................... 11 Figure 11: Example of Some AJAX Code Used ..................................................................................................................... 14 Figure 12: Diagram of High Level View of Software Technology Communication ............................................................. 14 Figure 13: Screenshot of the First Section of the Temperature Dashboard ....................................................................... 15 Figure 14: Screenshot of the Second Section of the Temperature Dashboard .................................................................. 15 Figure 15: Screenshot of the Third Section of the Temperature Dashboard ..................................................................... 16

2

Abstract Making informed and timely decisions is a huge challenge for entities such as: company executives, municipalities and everyday individuals. For example, an individual may be experiencing high heating bills and may not know what the cause is. The challenge here is deciding on what needs to be done in order to heat the home efficiently. Armed with the right tools this individual can pinpoint the cause of the problem and take the right action to remedy it. Informed and prompt decisions enable the best actions to be taken in order to obtain value and cut costs. In this project a tool was created that can help with the decision making process in regard to what needs to be done. This tool was a dashboard that presented data. Data was gathered and presented in real time in a way that would make it easier for a user to see trends and observe data so that they can take the appropriate action. Using the paradigm of the Internet of Things, a Raspberry Pi was programmed to output a real time temperature dashboard that is viewable from any location in the world. This dashboard can help an individual monitor the temperature behavior in their home so that they can observe anomalies, check to see if their thermostat is behaving as expected when they are not home or observe whether a certain room isn’t being heated as much as another. This dashboard can also be used to monitor the temperature outside of the home as well. The Raspberry Pi was transformed into a web server and interfaced with other hardware and programmed using a variety of software technologies. This combination of different software techniques and hardware allowed for the automation of the data collection process, connection of devices regardless of location and the presentation of data all in real time. The dashboard is viewable at the address below.

http://address

3

Introduction The Internet of Things (IoT) is a paradigm that has been picking up steam in recent years. IoT is a term coined to explain devices that are all connected on an internet network with the ability to communicate data to one another gathered from sensors. Cloud computing plays a huge role as it allows these device to be controlled remotely and for the sensed data to be analyzed and interpreted from any location. The IoT has begun picking up steam in recent years but the basic idea has been around for a while. For example in the 1980s, the automation of packaging in manufacturing was handled by a network of sensors (pressure, infrared, proximity, etc), cameras and motor drives. This network was connected to a central entity that orchestrated the automation of packaging. This central entity could be something like a Programmable Logic Controller (PLC). However, IoT focuses on the scaling of this idea to now have that network be the Web and to connect the physical world to the Web. Internet of Things has become a reality due to the innovation, reduced sized, reduced cost of hardware and the ability to store large amounts of data (Big Data). Also with the advent the IPv6 internet protocol many more devices can get assigned an IP address due to its support of 128 bit addresses. These advances in technology have created an environment that makes the implementation of the IoT concept feasible. Due to this feasibility, many new ideas are being pursued in order to make society more efficient. For example, smart cars are getting connected to smart grids so that they may communicate sensor data to one another. This will allow stoplights to calculate the most optimal time to be red, green or yellow so that traffic jams don’t occur. A second example is to embed sensor devices into cement on bridges. When these devices detect breaches in stress thresholds an alert can be sent to a central web interface which would inform Civil Engineers so that the proper action can be taken to prevent a total collapse of the bridge. This could potentially save many lives and cut costs for municipalities. A well-known example of an implementation of the IoT paradigm is a product called Nest smart thermostat. This thermostat allows a homeowner to check and control their thermostat from any location through a web interface. The thermostat also has the capability to “learn” (via Artificial Intelligence/Machine Learning) a user’s preference and when nobody is home, is able to lower the temperature. This gives the user the ability to cut costs on energy bills and makes a home more efficient. Google has taken interest in this idea and has bought Nest for over 3 billion dollars. This project revolves around an implementation of a web interface that would be similar to an interface found coupled with a Nest-like smart thermostat. A Raspberry Pi was transformed into a web server with a temperature sensor attached. This in essence, turned the Raspberry Pi into the “cloud” that would serve up web pages to any device wishing to connect. The sensor collects this data and the Raspberry Pi enables a user to be able to access this data from any location. After setting up hardware and developing software the final web interface will output a temperature dashboard where the current temperature, maximum temperature and minimum temperature are displayed in real time. The dashboard will also display an interactive spline chart that shows what the temperatures were as the day progressed. Lastly an interactive bar chart will be displayed that shows the trend of the maximum and minimum temperatures for the last 7 days. This dashboard will help give users insight by showing the trends in temperature behavior, take quick action if unexpected temperatures are being experienced and overall monitor a temperature metric. Just like how a company executive looks at dashboards to make informed decisions, this web based temperature dashboard enables a user to make an informed decision no matter where they are located.

4

Hardware Raspberry Pi The Raspberry Pi is a single-board with a system on chip CPU. There are currently 5 models of the Raspberry Pi. They are as follows:     

Model A Model A+ Model B Model B+ Compute Module

The model that was used for this project was the Model B+. The Model B+ is the latest revision of the Model B. The Raspberry Pi Model B+ contains an ARM Cortex-A7 CPU and 1GB of RAM. With the addition of memory storage in the form of a Micro SD card, this enables the Raspberry Pi to run the Linux operating system. This feature was extremely important for the completion of this project because this allowed the setting up of a web server on the Raspberry Pi. Some other important features of the Raspberry Pi Model B+ are listed below:      

HDMI Port WIFI Adapter Port 40 GPIO pins Ethernet port Display interface VideoCore IV 3D graphics core

Figure 1: Image of Raspberry Pi Model B+

5

DS18B20 Temperature Sensor A digital temperature sensor was used to collect the raw temperature data. The model of sensor that was used was the DS18B20 which had a 1-wire interface which only needed one pin for communication with the Raspberry Pi. In total there were 3 pins. These pins were Ground, Data and Power Supply Voltage. The sensor is capable of detecting temperatures within the range of -67°F and 257°F. The sensor communicates with the Raspberry Pi, constantly updates and outputs the raw temperature data into a file with path /sys/bus/w1/devices/28-*.w1_slave.

GND

Voltage Data

Figure 2: Image of the DS18B20 Temperature Sensor

Jumper Wires Jumper wires were used as mediums to enable communication between the Raspberry Pi and to aid in the implementation of the circuit diagram on the breadboard. Male to female jumper wires were used in order to connect the temperature sensor to the desired individual general purpose input/output pins. Male to male jumper wires were used in order to connect components on the breadboard.

Half-Sized Breadboard A small 2.2 x 3.4 half-sized solderless breadboard was used to implement the circuit diagram. It was needed in order to test out the prototype and allow for a base to help facilitate communication between the temperature sensor and the Raspberry Pi.

6

4.7 KΩ Resistor A 4.7KΩ resistor was used as pull-up resistor placed in between the power voltage supply and the data pins. The voltage power supply is known to be 5V. The Raspberry Pi ideally needs in between 1000mA and 1200mA to adequately power the device and peripherals attached to it. Performing two Ohm’s law calculations can be done in order to help us determine what type of resistor is needed.

𝑉 = 𝑅 𝑂ℎ𝑚′ 𝑠 𝐿𝑎𝑤 𝐼 5𝑉 = 5𝐾Ω Calculation using the lower range of 1000mA 1𝐴 5𝑉 = 4.167𝐾Ω Calculation using the higher range of 1200mA 1.2𝐴

From the two calculations above it can be observed that the resistance needed in order to supply ample enough current lies in the range between 4.167KΩ and 5KΩ. Since 1200mA was the higher range and not many high powered peripheral devices would be connected to the Raspberry Pi, a resistor with resistance value that was less than 5KΩ but still somewhat larger than 4.167KΩ would suffice for the purposes of this project. This is why a 4.7KΩ valued resistor was chosen. A circuit diagram illustrating this scenario was created in TopSpice and is shown below.

Figure 3: Circuit Diagram Pull-Up Resistor, Voltage Power Supply and 1-Wire Data Pin

7

Motorola Surfboard SBG6580 Wi-Fi Router A Wi-Fi router was needed in this project in order for there to be a gateway to the World Wide Web for devices connected on a local area network. The model of router used was the Motorola Surfboard SBG6580 which allowed the Raspberry Pi to wirelessly connect to the local area network. The Raspberry Pi does not come with a built-in capability to connect wirelessly. A Wi-Fi adapter was inserted into one of the available USB ports on the Raspberry Pi to enable this ability. A visualization of the local area network setup can be seen below.

Figure 4: Local Area Network Layout

Devices residing on the local area network are not visible to the World Wide Web. Only devices within the local area network can communicate with one another. The goal of this project was to make a web interface to monitor the temperatures from anywhere. In order to accomplish this goal the Wi-Fi router was again leveraged. Since a domain name was not purchased or shared hosting utilized, the Wi-Fi router’s port forwarding capabilities were used instead. Port forwarding was configured on port 80 and any incoming requests from the Web were routed to the local ip address of the Raspberry Pi. This allowed the Raspberry Pi and only the Raspberry Pi to be visible to any computer anywhere in the world. A visualization of the Raspberry Pi’s visibility to the Web can be seen below.

Figure 5: Network Layout after Port Forwarding

8

External PC An external PC was used to take advantage of SSH capabilities and take control of the Raspberry Pi remotely. This procedure is known headless control. This allowed to program the Raspberry Pi by utilizing text editors like Notepad++ on an external PC. This made for efficient testing of code changes by having separate windows up to see what changes took effect on the web pages.

Hardware Conclusion In summary, this project consisted of many hardware parts that worked in tandem to achieve the desired result of achieving a live temperature dashboard. Raw temperature data was retrieved by using a DS18B20 digital temperature sensor. The Raspberry Pi was hooked up to this sensor by leveraging a breadboard, jumper wires and general purpose input and output pins. A resistor was also used to make sure an ample amount of current was realized. Lastly, a router was used to make the Raspberry Pi visible to the World Wide Web. Fritzing prototyping software was used to create a diagram of what the final circuit would be. This diagram can be found below.

Figure 6: Prototype Generating Using Fritzing Software

Figure 7: Implementation of the Prototype That Was Generated Using Fritizing Software

9

Software Raspbian Operating System Due to the Raspberry Pi having an ARM Cortex-A7 CPU, 1GB of RAM and a micro SD slot, a full-fledged Linux operating system can be installed. The version of Linux that can be installed is called Raspbian. Raspbian is a version of Linux that is optimized for the Raspberry Pi hardware. Through the utilization of Raspbian, the Raspberry Pi can be transformed into a web server. This webserver would then host our website that contains our temperature dashboard to be pushed onto the Web for the whole world to see! A screenshot of the Raspbian operating system can be found below.

Figure 8: Raspbian Operating System Screenshot

Apache Apache is a software package that transforms your computer into a web server. It’s the most widely used web server in the world and is also maintained by a community of developers, thus making the software open source. Apache creates a localhost webserver by default at the directory path /var/www/html/devices/. Any web page files put into that directory will give the ability to see the output by simply putting the local ip address of the device into a web browser. This was very convenient for testing purposes prior to opening up port forwarding.

10

MYSQL MYSQL, like, Apache is open source software. MYSQL is a relational database system that houses any data that would be needed by a web page. The MYSQL software works in conjunction with Apache so that the data in the MYSQL database can make its way onto the World Wide Web. A table in a database was created to house all the data gathered from the temperature sensor. Three data fields were kept track of. These fields were the date the sensor data was collected, the hour after midnight the sensor data was collected and the sensor reading itself. Also, an identification field was created so that each record can be queried uniquely. This was important in pinpointing single records of interest such as the newest temperature reading from the sensor. So in total 4 columns were created in the database. A screenshot of the SQL code responsible for setting up this table can be found below.

Figure 9: Screenshot of SQL Code Used to Create Temperature Table

A screenshot of the database setup within the terminal can be seen below.

Figure 10: Screenshot of the MYSQL Database Table Setup in the Linux Terminal

11

Python Python is a powerful high level programming language that supports multiple paradigms in computer programming such as procedural, imperative and object oriented programming. Python’s use was important in this project because it played the role of reading the raw temperature data, converting it into a format MYSQL can understand and then actually inserting the data into the database. The Python code searches through the file directory tree of the Raspbian system, finds the file that the temperature sensor is outputting to and then parses the file. It looks for the line where the raw temperature reading is output to. The Python code then converts the format of the reading to a float value past three decimal points, rounds the answer and then converts the format to Fahrenheit. The Python code also records the date and the hours after midnight the sensor was read. What’s even more powerful about the Python language is that it can interface with the previously created MYSQL database and actually query it. So after all the data was read and recorded by the Python script, the data was inserted dynamically into the database using MYSQL and Python code in together. The Python code would query the database to check what was in it, and compare that to the current temperature reading and time. If there was a change in value in either temperature or time then the Python code would insert the new values, if not the Python code would then wait until there was a change and the new values inserted into the database. However, there was an edge case to consider when writing the code. This edge case was deciding on how the Python code should behave when midnight arrived. At midnight the data set supplied by SQL would be the empty set because a new day has started and there aren’t any readings yet for that new day. This empty set would break the Python code if not handled correctly. So in order to remedy this problem, more logic was put into the Python script stating that if an empty set occurred, to immediately insert whatever the current reading from the sensor was. This new insertion would then give the rest of the Python code a record to compare any new temperature readings with. This allowed for the dynamic refresh of data for use by the first chart on the temperature dashboard to operate smoothly.

PHP PHP is a backronym and actually stands for Hypertext Preprocessor. It’s a server side (executed on the web server) scripting language that is used for web development. In reference to the project, PHP was used in order to query the desired data for the database, encode that data for transfer, and then serve the data to the client side (i.e. the web browser on the client’s computer). So in other words, the purpose of PHP in this project was to dynamically retrieve data from the database to be displayed on the temperature dashboard. The most important tools that were offered by PHP were the MySQLi functions that retrieved the data from the database and the echo operator and json_encode() function that encoded the data in JSON format and sent the data to the client side.

12

Bash Bash is a UNIX shell command language that allowed for a background process to run. This background process was enabled by the writing of a script. This script executed the Python code every second. Since the Python code is responsible for gathering and inserting the temperature, date and time data into the database, this implies that the Bash script plays an important role in making sure that the data in the database is up to date.

HTML/CSS HTML stands for HyperText Markup Language.HTML is a markup language that is responsible in determining the structure of the web page. Data is fed dynamically into HTML tags through the PHP and JavaScript. HTML tags are interpreted by web browser which then renders a web page. HTML is only responsible for structure of a website (i.e. where forms, text boxes, select boxes are placed on a webpage). The look, feel and overall style of a website is determined by CSS. CSS stands for cascading style sheet. A CSS file is comprised of a list of a name html tags. These html tag names then encase a list of attributes that are set to specific values. These values can be colors, positions, font types, font sizes, etc. All these attributes and set values will then make up how a web page is styled and presented.

JavaScript/jQuery JavaScript is a client side (executed by the web browser) scripting language. It is used to create objects, variables, alerts and to overall make web pages interactive. For example, if you want an image to change when a mouse is hovered over it or if you want to embed a poll in your web page, JavaScript can be used. One obstacle that was faced was how to get the dynamically generated data from PHP to get passed into the HTML page. A disconnect occurs since HTML and JavaScript are only executed on the client side and PHP is only executed on the server side. There seems to be no way to get these two technologies to communicate with each other in order to facilitate the transfer of data from the database to PHP to JavaScript and ultimately on to the web page. This is where jQuery comes into play. jQuery is a JavaScript library. The two most important functions inherited from this library for use in this project were jQuery.parseJSON() and $.ajax({}). The jQuery.parseJSON() function takes in the incoming data from the server side PHP code and then parses the data into a format readable by the JavaScript code. This data is then inserted by the JavaScript into the appropriate places in the HTML structure to achieve the final step in the process of retrieving and outputting the data. In essence, the jQuery library, particularly, the $.ajax({}) method helped by acting as a bridge for communication between the client side and the server side and was essential in achieving real time updating of the webpage. The real time updates came in the form of pulling the most current data from the MYSQL database. Ajax technology that asynchronously updates webpages is ubiquitous throughout the Web and is used by many large applications such as Google Maps and Facebook’s Wall. A code snippet of some Ajax code that was used in the project can be found below.

13

Figure 11: Example of Some AJAX Code Used

Software Conclusion In summary, this project consisted of various software technologies that worked together to facilitate the process flow of retrieving, storing, querying, transferring and presenting data while all on the web. The software technologies that were used were the Raspbian OS, Apache Web Server, MYSQL, Python, PHP, Bash, HTML/CSS and JavaScript/jQuery. A diagram of how all these technologies communicate with each other can be seen below.

Figure 12: Diagram of High Level View of Software Technology Communication

14

Results The results of setting up the hardware, developing software and integrating the two was a real time temperature monitoring dashboard accessible from anywhere through the cloud. The dashboard consisted of three sections. The first section was a table with three rows that display what the temperature currently is, what has been the maximum temperature throughout the current day so far and what has been the minimum temperature throughout the current day so far. All the values being displayed change in real time and update as soon as the current temperature, maximum temperature for the day or minimum temperature for the day changes. A screenshot of this section of the dashboard can be seen below.

Figure 13: Screenshot of the First Section of the Temperature Dashboard

The second section of the dashboard is a live chart that displays what the current temperature is and also keeps a historical record of what the temperatures have been throughout the day. The x axis of the chart is hours after midnight the reading was taken and the y axis is the temperature value that was observed. The axes auto-adjusts on the fly based on what data is in the chart. The chart doesn’t require refresh of the page in order to plot the latest temperature data and a user can sit in front of the screen and closely monitor what changes in temperature are occurring. A screen shot of this section of the dashboard can be seen below

Figure 14: Screenshot of the Second Section of the Temperature Dashboard

15

Another feature of the chart is if the image of the three lines in the top right corner (highlighted by a red box) of the chart is clicked on, then a drop down menu appears allowing for the export of an image of this chart in various image file formats. This drop down menu also gives the option to print out the chart. The third and final section of the dashboard is an interactive bar chart that automatically updates and shows the minimum and maximum temperatures for each day for the last 7 days from the current date. The chart also has the feature of being able to export an image in various image file formats and also printing it. This chart is interactive in that if a user only wants to see the maximum temperatures, the minimum temperatures, nothing at all or wants to see both plotted, all the user has to do is select which options are desired. A screenshot of the third section of the dashboard can be seen below with the clickable option setting legend highlighted by a red box.

Figure 15: Screenshot of the Third Section of the Temperature Dashboard

The final dashboard can be viewed remotely from anywhere as long as an internet connection is available. The final dashboard can be viewed at the address below.

http://address

16

Possible Enhancements Given a larger budget and time this project can be scaled up to further expand on the idea of the “Internet of Things”. More and different types of sensors can be purchased and affixed to the Raspberry Pi. Examples of these sensors can be humidity sensors, light sensors and pressure sensors. This would require a larger breadboard and the whole circuit can be enclosed in a case for protection. A database table can be created for each of these sensors and data collected from each of these sensors. New PHP, Python, JavaScript, HTML and SQL code can be written for each of the sensors. This code would then enable each of the sensors to have their own dashboard. The current website can then be reorganized and a page created for each sensor. This would then give the user a real live feed of even more information about what’s going on in a particular place in their home that can be accessed from anywhere in the world. The next enhancement that can be made is that more Raspberry Pies can be purchased and each set up with sensors and programmed to output dashboards. These Raspberry Pies can then be placed in different locations and then a dashboard for each location conveying the circumstances of that location can then be accessed in the same way it would have been accessed for if there was only one Raspberry Pi. So now a scale up in the number of locations being able to be monitored on a dashboard can be achieved. If each Raspberry Pi is equipped with a portable power supply then that would enable the Raspberry Pi to gather data from a location with no power outlets available such as outside. Another potential enhancement that can be made is to allow alert functionality. So additional code can be written to constantly check whether any data is above or below a certain threshold value. If the data is above or below a threshold when it ideally shouldn’t be then an alert can be generated to inform the user. These alerts can then be logged and the user can view how many times in the past an alert was generated. This will then enable the user to see a trend in problems and therefore make better informed decisions on how to fix the problem so data values always stay within an ideal range. A fourth enhancement is to move the web files and database to a hosting site in the cloud to allow for more security and for a greater tolerance for server stress. The Raspberry Pi is powerful, but it’s limited in that if many users access the website this can overburden the Raspberry Pi and cause freeze ups in the webserver. This is less likely to happen if the web server was external to the Raspberry Pi. Then the Raspberry Pi’s only job would be to constantly send data values to the external server through FTP repeatedly over an interval of time.

17

Potential Application of Underlying Paradigm (Internet of Things) This project is based on the paradigm of the “Internet of Things”. The idea that devices communicate with each other leveraging networks of sensors that provide data all on top of a cloud based infrastructure. This idea can be applied to a large number of applications. Some examples include GE’s LightGrid Outdoor Wireless Control System, the Canary home security system and TCP’s home lighting automation system. The previous section discussed the potential enhancements of this project. If all those enhancements are implemented keeping the paradigm IoT in mind, a type of smart home system can potentially be created. Sensors such as voice, light, temperature music, sensors attached to appliances, cameras etc. can be set up around a home. The data from these sensors can be displayed on a web interface to allow access from anywhere. Now the concept of Machine Learning can be integrated with this system of sensors so that the system over time will know what is normal in the home and what is not. For example, if the home detects an entry into the home at an unusual time then the home will be “smart” enough to alert the home owner. Also, cameras can be set up at the door with the home scanning faces of people entering the home. Machine Learning will enable the home to learn who is a normal visitor to the home and who is not. So if someone unusual approaches the door the homeowner can be alerted. Even more features can be integrated so that a web interface isn’t necessarily the only way the system can be controlled. The home can “learn” the sound of the homeowner’s voice and the homeowner can simply talk to the interface or the home itself and commands can be executed that way. There are currently products similar out in the market (i.e. Time Warner IntelligentHome) but there are currently high markups for sensor equipment because this equipment only works for the particular system of the particular corporation offering that service. If a system can be created to be implemented in a home, a sort of operating system for a home, which can connect with third party sensors from any manufacturer then that would be truly revolutionary. This would make a smart home system more affordable and also help hasten the adoption of smart homes. This idea is extremely mind blowing because it can be adopted into other arenas such as city grids, roads, street lights and cars. In other words, help rush in the age of the Internet of Things.

Conclusion The result of this project was a scalable tool that can be used to aid in making informed and timely decisions. Its implementation was based on the concept of the Internet of Things and executed utilizing a Raspberry Pi that was connected to a temperature sensor and other peripheral hardware. It was programmed using a variety of software technologies including MYSQL, Python, PHP, HTML/CSS, Bash scripting and JavaScript/jQuery. This project implemented an instance of the powerful idea of the Internet of Things and revealed other ways on how that idea can be applied in real world situations. The Internet of Things is a trend that’s only getting stronger and as time passes and data becomes easier to manage eventually almost every physical man made object will be “smart” and communicate with other “things” around them via sensors and the Web.

18

References 

http://www.gelighting.com/LightingWeb/na/images/94439-GE-LightGrid-Wireless-Lighting-Control-SystemsBrochure_tcm201-65709.pdf



http://www.gelighting.com/LightingWeb/na/solutions/control-systems/lightgrid-outdoor-wireless-controlsystem.jsp



http://www.mckinsey.com/insights/high_tech_telecoms_internet/the_internet_of_things



http://www.modmypi.com/blog/tutorial-how-to-give-your-raspberry-pi-a-static-ip-address



https://www.raspberrypi.org/learning/lamp-web-server-with-wordpress/worksheet/



http://iot-projects.com/index.php?id=connect-ds18b20-sensors-to-raspberry-pi



http://www.w3schools.com/sql/



https://www.raspberrypi.org/downloads/



https://www.raspberrypi.org/forums/



https://kerneldriver.wordpress.com/2012/10/21/configuring-wpa2-using-wpa_supplicant-on-the-raspberry-pi/



www.raspberryweather.com



https://en.wikibooks.org/wiki/PHP_and_MySQL_Programming/Database_Connectivity



https://www.binpress.com/tutorial/using-php-with-mysql-the-right-way/17



http://www.tutorialspoint.com/sql/sql-date-functions.htm



https://learn.adafruit.com/downloads/pdf/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing.pdf



https://www.adafruit.com/products/1914

19