DZone
IoT Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > IoT Zone > Home Automation With a Raspberry Pi (Part 3)

Home Automation With a Raspberry Pi (Part 3)

This home automation series' conclusion delves into a demo of the app in action, including how to connect your appliances and configuring hand gestures for control.

Santosh Prajapat user avatar by
Santosh Prajapat
·
Hardik Upadhyay user avatar by
Hardik Upadhyay
·
May. 15, 17 · IoT Zone · Tutorial
Like (9)
Save
Tweet
8.02K Views

Join the DZone community and get the full member experience.

Join For Free

and we are back with the third blog of our home automation series. the first and second blogs of this series were more about technology set up, as seen in the software installation guide and implementation of hand gesture recognition . the third blog is more about command configuration set up and a user-oriented real time demo of the application, which is actually a captive portal type application designed to automate home appliances.

image title

creating a captive portal

  • as the user can have remote access to the application, we hosted the application on the raspberry pi server.
  • though spring boot is known for making a notable reduction of configuration and boilerplate code, its auxiliary niceties of being lightweight and the capability of packaging the application as a runnable jar that includes an embedded tomcat server attracted us more for, considering its rest endpoints also helped us in making the application accessible through a browser.
  • the application package comes in executable jar format, and it has configured system settings that help to start the web server upon the raspberry pi startup without any user interaction.
  • a user-friendly application flow, described in the real-time demo section, could be achieved through prominent utilization of spring boot's capabilities.

real-time demo

user setup

this basically looks like a plug-and-play set-top box intended for easy installation and operation. the user simply needs to supply electric power through a cable to access it.

elementary application access

  • we have tried to make the application access handy, at least as much as possible.
  • once the user plugs in our set-top box lookalike device and connects to their wi-fi network, the system ui will automatically open up in each laptop or mobile device connected to that particular network and enable the user to manage their home appliances through them.
  • we have used the captive portal concept for implementing this functionality and, of course, it needs successful wi-fi access permissions like ssid and the password or any configured hint.
  • then the url of the application will be saved in a browser so that users can manually ping the system.

how it works

once the user starts the application, it will check whether the “smart ir device” has connected or not, according to the device status application message. if it is connected, the system will go ahead. otherwise, it will display an error message, and in that case, the user needs to configure the smart ir device by providing the wi-fi user id and password. this process is called ‘smartconfig’.

image title

once the ir device gets connected, the application will confirm it with a message and will navigate you to the home page.

learning mode

  • learning mode is all about making the ir device understand which gesture or numerical input to be considered for performing the desired action. accordingly, this lets the ir device pass the signals to the connected home appliance.
  • for manual input setups, the application will display a dashboard with configured options. for gesture input setup, you can enable the device's camera and capture the gesture by using the start capture and stop capture buttons. once the gesture is configured, you can link that gesture to the desired actions (on, off, etc.).

image title

execution mode

once the gestures are configured and linked to their relevant actions, they can be executed any time. to execute it, the user simply needs to assess the application and capture the gesture using take snapshot.

image title

manual inputs can be executed by using number keys.

image title

the help section is also the part of the application to guide the user so that they can use the application flawlessly.

conclusion

of course, this accomplishment has certainly boosted our techie spirit up to the optimum level. still, while the world is advancing swiftly toward the internet of things, and people are looking forward to a high-end and affordable technological experience in their routine lives, there is a long way to go. many more advancements are still on the way for us.

raspberry pi mobile app

Published at DZone with permission of Santosh Prajapat, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Chopping the Monolith: The Demo
  • Progressive Web Apps vs Native Apps: Differences and Similarities
  • Troubleshooting HTTP 502 Bad Gateway in AWS EBS
  • Comparing Distributed Databases

Comments

IoT Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo