All Projects → jakhax → smart-home

jakhax / smart-home

Licence: other
Control house using raspberry pi djago based secure REST api. Made using raspberry pi, arduino, django ,django REST and angular.

Programming Languages

typescript
32286 projects
SCSS
7915 projects
python
139335 projects - #7 most used programming language
HTML
75241 projects
C++
36643 projects - #6 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to smart-home

django-firebase-auth
Django DRF authentication provider for Google's Firebase Authentication Service
Stars: ✭ 50 (+66.67%)
Mutual labels:  django-rest-framework, jwt-authentication
drf-angular-docker-tutorial
Dockerized Django Back-end API using DRF with Angular Front-end Tutorial
Stars: ✭ 53 (+76.67%)
Mutual labels:  django-rest-framework, jwt-authentication
drf-jwt-example
Code samples of the tutorial "How to Use JWT Authentication with Django REST Framework"
Stars: ✭ 31 (+3.33%)
Mutual labels:  django-rest-framework, jwt-authentication
shopping-cart
A simple Shopping-cart built with React and Django REST Framework(DRF)
Stars: ✭ 41 (+36.67%)
Mutual labels:  django-rest-framework, jwt-authentication
Django rest Vuejs Auth
An Authentication project using JWT Tokens, Vuejs(frontend) and Django-Rest(backend).
Stars: ✭ 92 (+206.67%)
Mutual labels:  django-rest-framework, jwt-authentication
Lumos
😴 Smart Lighting for Better Sleep
Stars: ✭ 98 (+226.67%)
Mutual labels:  smarthome, raspberry-pi-3
SmartMirror
Raspberrry Pi powered smart mirror inspired by HackerHouseYT Smart Mirror project
Stars: ✭ 16 (-46.67%)
Mutual labels:  smarthome, raspberry-pi-3
Homebridge Raspbian Image
Official Homebridge Raspberry Pi Image based on Raspbian Lite.
Stars: ✭ 534 (+1680%)
Mutual labels:  smarthome, raspberry-pi-3
wor-flasher
Legal utility that runs on RPiOS to flash another SD card with Windows 10/11
Stars: ✭ 451 (+1403.33%)
Mutual labels:  raspberry-pi-3
path planning GAN
Path Planning using Generative Adversarial Network (GAN)
Stars: ✭ 36 (+20%)
Mutual labels:  smarthome
TvrboReact
Dream starter project: React, Redux, React Router, Webpack
Stars: ✭ 13 (-56.67%)
Mutual labels:  jwt-authentication
ioBroker.lametric
Send notifications and other important information to your LaMetric time
Stars: ✭ 15 (-50%)
Mutual labels:  smarthome
ble2mqtt
Bluetooth to MQTT bridge, add your bluetooth-capable (including controllable) devices to your smart home
Stars: ✭ 46 (+53.33%)
Mutual labels:  smarthome
Bistu
集成了 django-simpleui 作为 admin 管理主题,实现的一个小型的管理系统,并且有的 django-rest-framework 使用示例。此外有个 Bistu-Ant-Design-Pro 项目作为配套的前端使用。如果喜欢记得给个🌟star哦。
Stars: ✭ 51 (+70%)
Mutual labels:  django-rest-framework
lgtv2mqtt
Interface between LG WebOS Smart TVs and MQTT 📺
Stars: ✭ 90 (+200%)
Mutual labels:  smarthome
drf-addons
Some customised Django classes and functions that one can use in DJango. Collected from internet!
Stars: ✭ 20 (-33.33%)
Mutual labels:  django-rest-framework
matchering-web
🎚️ Self-Hosted LANDR / eMastered Alternative
Stars: ✭ 25 (-16.67%)
Mutual labels:  django-rest-framework
Human-Resources-Management-System
Human Resources Management System Project
Stars: ✭ 32 (+6.67%)
Mutual labels:  jwt-authentication
express-mongo-jwt-boilerplate
Express Mongo JsonWebToken boilerplate
Stars: ✭ 100 (+233.33%)
Mutual labels:  jwt-authentication
django-mobile-app
A batteries-included mobile app backend in Django
Stars: ✭ 52 (+73.33%)
Mutual labels:  django-rest-framework

Smart Home

Description

Smart Home This is a raspberry pi based smart-home that can be used get data from sensors & control devices e.g light bulbs, fans, air conditioner, humidity & temp sensors, home media system.

The main aim of the project was to create a smart home system thats lets you to easily add more devices to your home without having to rewrite your code or change your circuit design.

Getting started

Requirements

This project was created on a debian linux platform but should work on other unix based[not limited to] systems.

  • Tested on Debian Linux
  • Python3
  • node 10.2.0 and npm 6.3.0
  • angular cli 6.0.0

Cloning the repository

git clone https://github.com/jakhax/smart-home.git && cd smart-home

Setting up Angular

Install node packages

  • This part should be preferably done on your PC and not on the Pi as it is painfully slow to compile angular packages on the raspberry pi.
cd front-end
npm install
ng serve

Edit django-rest api endpoint

  • Edit environment.ts(.prod.ts in production) apiEndPoint to your django-rest endpoint, in this case the IP address of your Raspberry Pi.

Build for production

  • Build your app with npm run build:prod

Smart Home Interface

Setting up the Django server on the raspberry pi

  • First clone the project to your Raspberry Pi

Creating a virtual environment

python3 -m virtualenv virtual
source virtual/bin/activate

Installing dependencies

pip3 install -r requirements

Prepare environmet variables

For this project you will need the following configurations.

DEBUG=True
SECRET_KEY=SECRET_KEY

ALLOWED_HOSTS=.localhost,.127.0.0.1,testserver,.ngrok.io
CORS_ORIGIN_WHITELIST=127.0.0.1:4200,localhost:4200

JWT_EXPIRATION_DAYS=7
DATABASE_URL=postgres://user:[email protected]:5432/database

IS_PI=False
WEATHER_API_KEY=WEATHER_API_KEY

Database migrations

python manage.py migrate

Running the server

python manage.py runserver

Running the tests

python manage.py test

weather api

  • Get a weather api key from Darksky

Cordova build android

  • Assuming you have android sdk(preferably through android studio), java and gradle installed.
  • Install cordova with npm npm install -g cordova
  • Create a cordova project cordova create mobile
  • At this point you can copy contents of the dist folder created when you build the angular app and replace them with the contents of the www folder in the cordova project folder, you can also uses a system link.
  • Add or edit the <base href> tag in index.html to <base href="./"> since we will using a file path and not a url
  • Add android , cordova platform add android
  • Connect your android device via usb, enable usb-debugging then run cordova run android, it should run the app in your device.

Getting started

To be documented

  1. Adding GPIO pins, devices and device types to the Database via django admin.
  2. Suggestions on physical connections and builds.

Live demo

Front-end

django-admin

  • You really dont think am going give you creds this !!, but am pretty sure there is a bug somewhere so feel free to hack through and be nice :)

Contributing

License (MIT License)

This project is licensed under the MIT Open Source license, (c) Smart Home

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].