Coder Social home page Coder Social logo

homify's Introduction

Homify 🏡

Open-source home-automation / smarthome platform running on PHP (Laravel).

Dashboard

Table of content

ABOUT HOMIFY

Homify is built using a modular approach so support for other devices or actions can be implemented easily. See also the section on creating your own plug-in below in this READ.me.

KEY FEATURES

  • Manage your IoT-devices simply over the GUI
    • Instantly see if your device is online or not
  • Automate your home with rules
  • Install Plug-ins
    • Homify is built using a modular approach so support for other devices or actions can be implemented easily.
  • Central Room Management
  • Tablet View for your rooms

FEATURED PLUG-INS

SETUP

To install and run this application, you'll need Composer and PHP7 installed on your computer.

Composer

# Download & install Homify with its dependencies
$ composer create-project markushaug/homify
$ composer update

Database

Setup your database & mail settings in the .env file and then run:

# Creating tables and inserting their default values to them
$ php artisan migrate
$ php artisan db:seed

Webserver

  • Set the webroot of your webserver to the public folder
  • Grant permissions to the homify folder.
    • If the application runs into an issue, try this command inside of the homify directory: chmod -R 777 storage.

Note for Raspberry Pi users

I highly recommend to use nginx or lighttp. Apache2 is using too much CPU and RAM on the Raspberry PI.

RULES

Homify supports rules to automate your home. You can create an rule via Homifys web interface.

Features

  • Define multiple rules for one thing.
    Each rule expands the entire rule base of the respective item with a logical OR.
    IF <RULE1> === TRUE || <RULE2> === TRUE || ...
  • The ThingController calls the RuleParser every time an event is triggered and scans for defined rules in the rule base.
  • Time-controlled events are constructed as a cron job that triggers the execution block.

Structure

Each Rule has the following structure:

{
	"rule": "rule name (unique)",
	"if": {
        /*<TRIGGER CONDITION>*/
	},
	"then": {
        /*
        <EXECUTION_BLOCK1> and
        <EXECUTION_BLOCK2>
        */
	}
}

Example

Below is an example of a rule with a time-controlled event wich triggers an channel of the defined thing.

{
	"rule": "goodEvening",
	"if": {
		"time": "20:00:00"
	},
	"then": {
		"thing": {
			"name": "Play1",
			"channel": "off"
		}
	}
}

HTTP-API

Homify provides an http-api to acces your things. You can use the following HTTP-GET Request to access your things:

  • https://<server_ip>/thing/<thing_name>/<channel>

For example:

  • https://10.10.3.1/thing/Sonos:Play1/on

COMING SOON

  • WebGUI for central room management & device management
  • Tablet View for single rooms
  • HAP-Protocol (HomeKit) integration

PLUG-IN DEVELOPMENT

Ech Plug-in inherits from an Thing-Type (Light, Switcher, Speaker, etc.). Each Thing-Type inherits from the abstract thing class. So each thing has the required functions.

If you are creating an plug-in for homify, you have to inherit from an Thing-Type. Or you create an additional thing-type. Each Thing needs an <Thing>.php, Create<Thing>.php and an Update<Thing>.php File. You can take on of the existing Plug-ins as template.

ThingClass

FAQ / CONTACT / TROUBLESHOOT

If you run into issues while using Homify or during development of a component, please use one of the following options:

  • Use github's issue reporter on the right, so that other people can search these issues too
  • Send me an email [email protected] (might take a few days)

CONTRIBUTING

I would appreciate it if you would contribute to this project. Do not hesitate to contact me if you are interested. I can give you an introduction to the core and the main concepts of the program. (Intermediate) Laravel skills are desirable.


Homepage haugmarkus.de  ·  GitHub @markushaug  ·  Twitter @markushaug

homify's People

Contributors

markushaug avatar

Watchers

James Cloos avatar jose nazario avatar  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.