sudo apt-get install python-dev python-pip python-yaml
sudo pip install flask
sudo pip install flask-restful
sudo pip install celery
sudo pip install --upgrade RPi.GPIO
sudo apt-get install rabbitmq-server
Edit the settings file settings.yml.
cd path/to/raspidrink_gpio_api
celery -A gpio_api.celery worker --loglevel=info
cd path/to/raspidrink_gpio_api
python gpio_api.py
curl 127.0.0.1:5000
This command should return RaspiDrink GPIO API online
If you want to run more test you can run scripts.
- test_pumps script will set all pin in settings to HIGH durring 1 second and then LOW directly with the GPIO lib without calling the API.
- test_api script allow you to test each component of the API. Comment out what you want to test and then run the script