Coder Social home page Coder Social logo

cat0rgi0 / home.pi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from denschu/home.pi

0.0 1.0 0.0 4.22 MB

Home Automation with AngularJS and MQTT on a Raspberry Pi

Shell 0.09% JavaScript 81.99% Objective-C 0.69% C++ 0.17% C# 0.17% Java 0.17% CSS 16.59% HTML 0.13%

home.pi's Introduction

Home.Pi

Build Status

Simple Home Automation solution with MQTT

Facts

  • Home Automation with MQTT
  • Cloud-based Micro Service Architecture (only the bindings to control the devices are running locally)
  • Completely independent from the used technology (btw. most bindings are actually written in node.js)

Screenshot

Screenshot

System Architecture

System Architecture

Installation

	git clone https://github.com/denschu/homepi
	cd homepi
	sudo npm install -g cordova ionic gulp
	npm install
	gulp install
  • Publish your configuration to MQTT with the topic "username/home/config" (see publish-config.sh)

Example configuration:

{
	"id" : "ceiling_light",
	"type" : "on_off",
	"value" : false,
	"name" : "Ceiling Light",
	"topic" : "denschu/home/devices/livingroom/ceiling_light/value"
}
  • Run with local HTTP Server
cd www
python -m SimpleHTTPServer 8080
mosca --http-port 8000 --http-bundle --verbose | bunyan

Open http://localhost:8080 in a webbrowser and provide your credentials to connect to the MQTT Broker.

  • Run it as native app
sudo npm install -g cordova ionic
ionic platform add ios
ionic build ios
ionic emulate ios
  • Run the complete stack with Docker
docker run -p 1883:1883 -p 8000:8000 -v /var/db/mosca:/db denschu/mosca-secure
docker run -d -p 80:80 denschu/homepi

MQTT topic conventions

When you create the above device configuration for the GUI then you always define the topics it will subscribe to.

<username>/home/devices/<room>/<device-name>/value
denschu/home/devices/living_room/light1/value

The GUI application will always add a "/set" to the topicname from above when it publishes a message. The payload of the message contains the value to set on the device.

<username>/home/devices/<room>/<device-name>/value/set <value>
denschu/home/devices/living_room/light1/value/set true

Available MQTT Bindings (separate git-Repositories)

Take a look at my puppet manifests to setup the Raspberry Pi very easily with puppet. You also get some help for the manual setup.

At the moment the following "experimental" MQTT bindings are available:

Technologies/Frameworks

  • MQTT
  • Ionic Framework (with AngularJS)
  • node.js

For further informations please refer to my blog posts:

home.pi's People

Contributors

denschu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.