katunari
Posts: 10
Joined: Mon Feb 06, 2012 2:35 pm
Contact: Website

Controlling GPIOs via internet

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?

ksangeelee
Posts: 192
Joined: Sun Dec 25, 2011 5:25 pm
Location: Edinburgh, UK
Contact: Website

Re: Controlling GPIOs via internet

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?

katunari
Posts: 10
Joined: Mon Feb 06, 2012 2:35 pm
Contact: Website

Re: Controlling GPIOs via internet

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.

Return to “General programming discussion”

Who is online

Users browsing this forum: No registered users and 2 guests