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

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

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 a rule via Homifys web interface.

Features

Structure

Each Rule has the following structure:

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

Example

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

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

HTTP-API

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

For example:

COMING SOON

PLUG-IN DEVELOPMENT

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

If you are creating a plug-in for homify, you have to inherit from a Thing-Type. Or you create an additional thing-type. Each Thing needs a <Thing>.php, Create<Thing>.php and a 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:

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.

For further information please read our contributing guidelines


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