Best android open-source packages and libraries.

SmartOutlet IOT

DIY - Smart home outlet system
Updated 4 months ago

SmartOutlet-IOT

Thingiverse License

Home automation POC (proof of concept) system that allows the user to control a device from any client connected to the wifi network.
The main parts of this project are the outlet device that receives the instructions, the gateway that handles the data between the client and the outlet device and the client that sends the requests.

FYI

Each module (api / hardware /mobile) contains a different README that has more details related to that topic.

Demo

Full Youtube video: SmartOutlet-IOT

Android Mobile application

API

For the API implementation I've used Flask (Flask is a lightweight WSGI web application framework) more info here

Available endpoints

Project structure
├── models
│   ├── device.py
├── templates
│   ├── index.html
│   ├── gateway_setup.html
│
├── app.py  
├── config.py  
├── device_control.py
├── device_manager.py
├── gateway.py
├── rf_rpi_command.py  
├── run.py
└── .gitignore

start server command
sudo python3 run.py

Gateway (Raspberry pi)

Raspberry pi H34A (TX)
VCC VCC
GND GND
DAT DAT

ANT (Optional) - provides improved range

Outlet Hardware

This is a DIY project so in order to create it you would need the following components.

  • Outlet case (for this project I've used a Mechanical Outlet Timer)
  • Phone charger (I've used an IPhone charger), open the container and get the circuit
  • Solid state relay (5V)
  • Receiver H3V4F Module (433 MHz) OR LR45A Receiver Module (433 MHz)
  • ATTINY85 USB Development Board

The main idea behind this project is that we make the outlet hardware using really cheap components.

Also I've made a simple and very graphic schematic that explains how the connections are made.

And this is how the devices look after the 3D printed lid and IOT / WIFI design was added

3D STL files are available on my Thingiverse profile here

More details in the hardware module

Todo:

  • [ ] Add standalone module that will connect to extension cord
  • [ ] Add mobile app set gateway IP screen

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Tags flask