Controlling GPIOs via internet

General programming chat and advice for beginners

3 posts
by katunari » Fri Jul 13, 2012 10:36 am
What would be the best practice to use GPIOs with webserver?
I would like to unlock/lock my house with Raspi controlling electric strike lock. If I use PHP, how should I call GPIO routines?
Posts: 10
Joined: Mon Feb 06, 2012 2:35 pm
by ksangeelee » Fri Jul 13, 2012 1:42 pm
Generally speaking, the easiest way might be to use the sys filesystem approach (see examples using Bash here), because you can control everything you need using basic file I/O. Just make sure the permissions are appropriate for the web server/PHP interpreter.

More specifically however, do you really want to secure your house using PHP?
Posts: 193
Joined: Sun Dec 25, 2011 5:25 pm
Location: Edinburgh, UK
by katunari » Fri Jul 13, 2012 4:11 pm
I need PHP for changing the security codes and seeing whether someone has entered the building with guest codes. Actual control of the doors would not involve web server functionality, but testing would. I also plan to have a web camera taking video whenever the door is accessed.
Posts: 10
Joined: Mon Feb 06, 2012 2:35 pm