A Python based http server that integrates to the Internet of Things
This script can be used in conjunction with IFTTT to perform various tasks.
Install Pip
apt-get install python-pipInstall Python Tornado
apt-get install python-tornadoInstall Todoist
pip install todoist-pythonInstall Tox
pip install toxInstall supervisor
apt-get install supervisorCopy the config to /etc/supervisord/conf.d/pyhttp.conf and then restart supervisor
supervisorctl
reload
statusThe script can be run without supervisor for testing.
python main.pyTasks can be created with a POST request. The following will create a task that will display a reminder when I arrive home.
curl -X POST http://localhost:5000/todo/remind/me -d "I will be reminded when I get home"Tasks can be created with a reminder at alternative locations.
curl -X POST http://localhost:5000/todo/remind/me/at/station -d "I will be reminded when I arrive at the station"
curl -X POST http://localhost:5000/todo/remind/me/at/city -d "I will be reminded when I arrive at home in the city"
curl -X POST http://localhost:5000/todo/remind/me/at/country -d "I will be reminded when I arrive at home in the country"Deploy this with ansible
ansible-playbook \
-i ansible/hosts.ini \
ansible/playbook.yml