element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Pi IoT
  • Challenges & Projects
  • Design Challenges
  • Pi IoT
  • More
  • Cancel
Pi IoT
Blog [Pi IoT] Smart Competition Home #6: Competition system I - Platform overview
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: clazarom
  • Date Created: 27 Aug 2016 5:01 PM Date Created
  • Views 580 views
  • Likes 2 likes
  • Comments 2 comments
  • android
  • pi 3
  • android app
  • designchallenge
  • piot
Related
Recommended

[Pi IoT] Smart Competition Home #6: Competition system I - Platform overview

clazarom
clazarom
27 Aug 2016

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):

image

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

 

imageimage

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.

 

Conclusion

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
  • Sign in to reply

Top Comments

  • clem57
    clem57 over 9 years ago +1
    Nice 50,000 foot review to check out the plan. Thanks for giving this blog. Keep up the good job. Clem
  • volly
    volly over 9 years ago +1
    clazarom . Cool....Mega cool!!!
  • volly
    volly over 9 years ago

    clazarom. Cool....Mega cool!!!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • clem57
    clem57 over 9 years ago

    Nice 50,000 foot review to check out the plan. Thanks for giving this blog. Keep up the good job.

    Clem

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube