So – having managed to get WordPress up and running on the P2 I thought it might be nice to step back toward the original plan and get some home control running. I like PHP so I thought that it might be nice to have a PHP page with some security running – with buttons. I stumbled on an article that suggested the first thing to do is get phpMyAdmin running – so that you can mess around with a database on the Pi.
Sure enough, 10 minutes after discovering this article I was up and running with phpMyAdmin in a browser. Amazing.
Then this link – which takes a little longer than 10 minutes…
So that gets you a nice web page with which you can control pins – once you have logged in of course.
And all of that is great, but I don’t like the constant polling of the database every 5 seconds – from my brief exposure to this, the PHP page accepts buttons and returns the status – a background script looks at the database and sets GPIO accordingly. Put it this way it’s never going to replace OpenHab but at least out of the process you get a little experience of all of this, not to mention phpMyAdmin – and in my case a little better understanding of moving files and privileges around in the Pi… and it’s nice to know this older stuff works in the new model! I did have issues with the higher pins not doing anything but I’m far to new to this device to claim it’s anything other than potential finger trouble or some difference with Pi 2 perhaps…