BelloBronxie / smartHome

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Smart Home Prototype

This is a Smart Home Prototype developed during my Master's Thesis of the MSc of Internet of Things. In order to read more about this project, check the Documentation.

My Image

Getting Started

This repository stores the source files of every component of this prototype, but before running it, take a look at the prerequisites to check if you are ready for the deployment.

Prerequisites

Requirements for the hardware, software and other tools to build, test and push.

Hardware

Software

Installing

A more detailed README will be inside each different folder in order to explain the installation of the different tools in each platform.

Setting up the system

Now that we have everyting installed in every platform. Lets run the whole system:

  1. Turn On the Arduino.

  2. Open the VNC desktop of the Raspberry Pi, click on the Bluetooth icon in the top right corner, and select Add Device.

    BT(1)

    Then, go to the Bluetooth search interface, wait for a moment, you can find the corresponding HC-06 module, click on Pair to pair. Follow the instructions and enter the Bluetooth pairing password (in the case of the HC-06 is 1234). If there is an error as shown in the following figure, you can simply ignore it.

    BT(2)

    Open the Raspberry Pi command line and enter hcitool scan. It scans for available Bluetooth devices (with MAC address). After some time, it will output the devices found like it is displayed:

    BT(3)

    Then enter the command sudo rfcomm connect 1 98:D3:31:7D:58:95. If the connection is successful, the communication between both devices is ready to go.

    BT(4)

  3. Now, it is time to start the server. In order to do that, lets change the directory where the server is located, in my case: /home/pi/Desktop/server/bin. Once in the correct folder, launch the command php server.php. Now, the Web service is running.

    server1

    The next step is connecting the Android app to the server. This is the easiest step because the only thing which is needed to do is launching the app due to the fact that the app is connected to the server via WebSocket on the start-up of the app. If the app is connected successfully a message displaying New Connection message is going to appear in the console as well as the current data from the Arduino.

    server2

  4. Last but not least, in order to have component in the system up and running, launch the app Node-RED which will start the mosquito service that will start the MQTT broker and the MQTT publisher simulating the sensors of the trash cans.

    node1

    Of course, check in the Node-RED app if the MQTT nodes are connected to the broker succesfully

  5. At this point, the prototype is ready, once we have launched successfully all the components.

Authors

  • Joserra13

LinkedIn

License

This project is licensed under the CC0 1.0 Universal Creative Commons License - see the LICENSE.md file for details.

About

License:Creative Commons Zero v1.0 Universal


Languages

Language:Java 54.1%Language:C++ 30.9%Language:PHP 10.6%Language:Python 4.4%