The Problem
- Many people who either live alone or in isolated locations, pose the threat of home thefts / intruders
- They have no way to know if a door has been opened when no one is home
- The elderly or the disabled often depend on others for help, such as turning ON/OFF lights, fans especially when they are about to sleep or when they wake up in the middle of the night
- We can enhance our quality-of-life by automating repetitive tasks be it turning ON the geyser in the morning or mosquito repellent devices like All Out or Good Knight at a pre-set schedule
The Solution
- Wouldn’t it be nice if I could be notified on my phone if an unknown person is detected near my house?
- And if I could watch a live stream of a camera placed at my front door?
- And get mails of video clips if any motion is detected?
- And… And… And… ???
Features - Security
- Get notified on the app if an unknown person is detected around the home
- Watch a live stream from camera on a browser or the app
- Get emails of video from camera if any motion is detected
- Get on notified on the app if door is opened
Features - Safety
- Get notified on the app if smoke or gas is detected
- Turn ON light in the night when motion is detected. This is helpful especially for the elderly when the wakeup during the night
- Remotely lock and unlock the door from the app. This allows keyless entry, thus limiting the spread of the deadly Coronavirus
- This keyless entry can be used to remotely open doors so that delivery agents can drop packages safely and securely even when the user isn’t home
Features - Quality of Life Enhancements
- Occupancy awareness can be used to turn ON/OFF lights automatically depending on whether the user is home or not. This helps save a lot of electricity
- Control appliances remotely from the app
- Touch switches to control appliances without the app
- Set schedules to automatically turn ON/OFF appliances. E.g. Turning ON/OFF geysers in the morning, so the user has hot water ready to use as soon as they wakeup
How Does It Work?
MAC Address Detection
- These days almost everyone carries a smartphone with them
- These smartphones constantly emit Wi-Fi packets to look for already known access points
- These packets contain a source and destination MAC address
- We can look at the source MAC address to identify the smartphone and hence the person
Camera Stream
- To local web server in MJPEG format
- Can be viewed on a browser or the app
- If any motion is detected, it is recorded, saved locally and then, a copy is emailed
Sensors Used
Technologies Used
- C++ to program Sony Spresense, Node-MCU, ESP-32
- Motion Software to get the video from the camera and stream it to a web-server
- Python to e-mail the video clips
- Kotlin to make the Android app
- Google Firebase Realtime Database as the cloud database
Schematics and Circuit Diagram
Hardware Architecture
Software Architecture
Future Scope and Improvements
- Move schedules from app to a backend cloud service
- Improve latency in getting data from Firebase by ESP-32
- Automate heating and cooling of the house
Challenges I Faced
- I wasn’t successful in setting up a web-server on the Sony Spresense because of some issue. I’m still trying to figure it out
- Hence, I used a Raspberry Pi as a fix. But I would love to get the web-server working on the Spresense especially for the huge power savings it provides
How is it Going to Benefit Others
- Leave / Live at home without any fear of theft or robbery as :
- They get notified when an unknown person is in the vicinity of their home for a certain period of time.
- Can watch a live stream of their home.
- Control devices or set schedules to automatically control devices from the app.
- Motion activated lights help navigate in the dark.
- Elderly can become much more independent as they can control devices from their bed or any other convenient place.
- Get notifications on the app in case any smoke or gas leakage is detected or the door is opened.
- Relocate hard to access switch panels by using touch switches that can be placed in an easy to access location.
- Touch switches enhance the look and feel of the home, making it look modern.
I have made this project open source
You can have a look at the Source Code here