Skip to content

A high level application for the Homie-esp8266 IoT framework

Notifications You must be signed in to change notification settings

stufisher/homie-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

homie-control

A high level mobile ready web application for the Homie-esp8266 IoT framework

GitHub Logo

Introduction

homie-control provides a web UI to manage Homie devices as well as a series of virtual python devices to allow extended functionality.

Its lets you do useful things like:

  • Historically log device properties
  • Schedule changes in event properties (i.e. water your garden once a day)
  • Execute profiles of property values (i.e. turn a series of lights on and off simultaneously)
  • Trigger property changes based on:
    • When a network device is dis/connected (i.e. your phone joins your wifi, turn the lights on)
    • Sunset / rise
    • When another property changes
  • OTA updates (planned not yet implemented)

Requirements

  • A php / mysql stack running on whatever webserver you like
  • An mqtt broker (i use mosquitto)

##Installation The application consists of three components:

  • A PHP REST API
  • A Marionette js client
  • A series of homie-python devices

API

  1. Install mysql database schema from db/logging.sql
  2. Install php dependencies using composer php composer.phar install
  3. Copy api/src/settings-sample.php -> settings.php and update usernames / passwords

JS Client

  1. Install dependencies using bower bower install
  2. Copy js/config-sample.json to config.json and edit mqtt passwords

Python devices

In order to allow scheduling, profile execution, logging, etc, a series of homie-python devices are provided. These need to be running all the time for this functionality. To run a device:

  1. Copy devices/configs/config-sample.json to .json (i.e. heating.json for heating.py)
  2. Configure mqtt details within config file
  3. Run with python heating.py

logger.py

This device will log any properties that are registered in the database.

schedule.py

This device periodically checks if a property is scheduled in the database and updates as need be

profile.py

This device executes a 'profile' of properties

device.py

This device checks the network for devices connecting and disconnected and triggers property changes as needed. It also monitors the time and sends triggers for sunet and sunrise

heating.py

This device enables a switch to be toggled based on a temperature property reading and a schedule.

repeater.py

A generic device that will subscribe to a property on one device and pass it to another, properties can be configured via the UI > Repeater page. Can also be used to send statics (group name, sub group name) to a device property

manage.py

Is a special device that wraps the other devices into a single process

More docs to follow...