Skip to content

artkrz/energenieApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

energenieApi

energenieApi is simple app written in Python (Flask-RESTful) that allows controlling Energenie sockets using Pi-mote control board connected to Raspberry Pi

Installation

You will need to run this app as root as it's the easiest way to access GPIO

git clone ...
virtual env energenieApi
cd energenieApi
pip install -i requirements.txt
python app.py

Usage

Make a GET request via curl: curl http://127.0.0.1/socket/all/on the app will respond with JSON, for example:

{
    "socket": "all",
    "state": "on"
}

you can also use Ajax, example

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Credits

Socket class is based on the sample code provided on the Energenie website

License

Free for all, don't know what licanse suits this but as far as I'm concerned it's Open Source

About

API for Energenie Pi-mote

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages