This update should help navigate through the next posts: it's been a long period without any news and I will be quite active for the next days... I hope the final result does not look very confusing ^^u


The innovation part of this project is the competition system: we want to engage the residents of the house in a competing environment to promote a healthier way of life. It can later be expanded for more fun type of activities. For now, the only challenge presented to the roommates is the amount of km walked/run/biked during a month. This information will be gather thank to a mobile phone application and be sent to the smart house central node.


In the end, the smart house main GUI will have the regular smart house information plus current status of the competition.


Main components


The following image shows the basic structure of the system (with only one user included):


NOTE: The house wifi router will be performing the corresponding port forwarding to the Central Node and its competition port.


User's tracking: Android application

Initial setup:Nexus 5 - Android 6.0.1



We will update the original User's node, so that it hosts:

  • Competition activity - implements a distance tracker and shows the user how many km have they walked in that current session. It also holds the totals of the day and the month (as the competition will be held MONTHLY). It has to send this information to the central node, so that it can be compared to the other residents of the house.
  • Smart home activity - implements the MQTT subscriber client (showed in Smart Competition Home #4) to show the smart house data only when the phone is connected to the house's WiFi.



Competition System Activity

It will be divided in three main functions:

  • Track the distance, using both GPS location and accelerometer data
  • Manage daily and monthly totals (to be stored in a local SQLite database)
  • Send the information to the central node

Smart Home Activity

I will be modifying the original application. It is a basic Android app that connected to the MQTT broker and display the smart house values upon request.

First, this apps functionalities will be included in the Smart Home Activity to be enhance later on, with:

  1. Select the broker IP and Connect/Disconnect options
  2. Real time update of the smart home values
  3. Phone buzzing when there is an alarm




Competition management: Central node

Initial setup: Raspberry Pi 3 - Raspbian SO (Jessie) / SSH Enabled / Mosquitto MQTT Broker installed / MQTT Subsciber client / Console interface / Python GTK interface /  MySQL Server / Apache2 web Server


In the central node, I will have to implement the Competition Service. This service will manage the income packages from each roommate (containing the distance update) and update it in the MySQL database.


The main Python scripts (managing the MQTT_client_subscriber and Main GUI) will include functions to read the competition values from the database and update the Interface accordingly.



The developing of the competition system will require:

  • USER'S NODE - SMART COMPETITION HOME APP An Android application implementing:
    • Distance tracking -Record the km/distance
    • Server communication - Send the information to the central node
  • Add new functionalities to CENTRAL NODE (Raspberry Pi 3):
    • Competition server -Receive the km/distance from the Android application and store the values
    • Competition Database - Organize values from different users
    • Main GUI update from database - Display these values in the main GUI of the smart house
  • Integrate User's node in the same SMART COMPETITION HOME APP, so that:
    • If the phone is connected to the home WiFi, it can also read the smart house data
    • If the phone is not connected to that WiFi, it should indicate so