A high level mobile ready web application for the Homie-esp8266 IoT framework
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)
- 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
- Install mysql database schema from db/logging.sql
- Install php dependencies using composer
php composer.phar install
- Copy api/src/settings-sample.php -> settings.php and update usernames / passwords
- Install dependencies using bower
bower install
- Copy js/config-sample.json to config.json and edit mqtt passwords
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:
- Copy devices/configs/config-sample.json to .json (i.e. heating.json for heating.py)
- Configure mqtt details within config file
- Run with
python heating.py
This device will log any properties that are registered in the database. This device must be run standalone and cannot (currently) be wrappered by manage.py
This device periodically checks if a property is scheduled in the database and updates as needbe
This device executes a 'profile' of properties
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
This device enables a switch to be toggled based on a temperature property reading and a schedule.
A very specific device for relaying property changes from homie-devices to an OLED. Will be generalised and database managed in future
Is a special device that wraps the other devices into a single process
More docs to follow...