how can i get a local event (example: a physical button pressed) to trigger events on a remote django website.
without using a keyboard or mouse click.
2 Answers 2
@lenik is right.
Another way is just use Python: write a Python script (or even better, a Django project) to send a HTTP request (I would use JSON or REST API) to the Django remote application. Sounds too much work, and it is if the purpose is just for fun. But it's way more elegant.
you're trying to do things the other way around.
the correct way would be to write a python
script to use GPIO
library to access the current state of your pins and then if something interesting happens, use urllib
to access the remote URL, thus telling your web server about the remote events.
Explore related questions
See similar questions with these tags.