Geppetto is a home automation server. It's written for the Raspberry Pi but with some small modification you should be able to run it on other devices with GPIO pins. Geppetto provides a REST API which let you control the GPIO pins of your Raspberry Pi. Apps can be build on top of this API in order to control the GPIO pins easily.
Full documentation is available on RTD.
Geppetto has been tested under Python 3.3 and Python 3.4. Geppetto uses Quick2Wire's gpio-admin and its Python wrapper. The documentation of this wrapper says that it works with Python 3, but my experience is that it works well with Python 2.7 too.
$ pyvenv-3.4 .env
$ source .env/bin/activate
$ pip install -r requirements.txt
Install GPIO ADMIN by following the installation instructions.
Create a database database and generate an API key:
$ pynt setup_db
[ build.py - Starting task "setup_db" ]
[ build.py - Completed task "setup_db" ]
$ pynt create_user
[ build.py - Starting task "create_user" ]
User <User 1, api_key: b'fcba99ca-3360-4683-a54d-1ce8ad1f20f3'> has been created.
[ build.py - Completed task "create_user" ]
In order to start the webserver in development mode, set environment variable
GEPPETTO_ENV
to dev
.
$ export GEPPETTO_ENV=dev
$ ./server.py
Tests are written using py.test. Run the test suite with:
$ py.test tests/
The documentation is powered by Sphinx and can be build with:
$ sphinx-build -aE -b html docs docs/_build
or with
$ make -C docs html