Login:
Dashboard:
Soon to be a dashboard to serve as an interface between my Raspberry Pi Security Camera, the lighting, air conditioning, and blinds in the Macon House (my house) for us to use Senior Year.
This will allow us to control utilities in my room/our house over the web. These include Phillip Hue lightbulbs, Raspberry Pi Security Cameras, Netgear Arlo Security Cameras, and a ethernet-connected motor to close and open the blinds. The ultimate goal is for this to be a "dashboard" with buttons allowing me to interact with these devices via a closed network and various APIs.
Why PHP?
Quick and easy. Enough said.
Currently, this is a PHP site running on Heroku with DNS support from Cloudflare as well as SSL protection.
You can find the site here:
It also uses New Relic APM support to prevent idling dynos.
It's currently using an extremely lightweight instance of MySQL supported through the ClearDB Heroku add-on.
DB Access can be achieved through the Heroku Dashboard.
Disclaimer: You'll need a running LAMP stack to run this application.
Steps:
$ touch config.ini
-
First make your own
config.inifile which looks like this and fill in the necessary parameters.[macon-command-center] PRODUCTION=FALSE PRODUCTION_DB_HOST= PRODUCTION_DB_DATABASE= PRODUCTION_DB_USERNAME= PRODUCTION_DB_PASSWORD= DEVELOPMENT_DB_HOST= DEVELOPMENT_DB_DATABASE= DEVELOPMENT_DB_USERNAME= DEVELOPMENT_DB_PASSWORD=
The first value can be set to either TRUE/FALSE to indicate whether to pull production or local (development) database parameters.
- Then, create a database (I call mine "dashboard") and a table to hold the users. Yeah yeah, I know this isn't secure but this is a localized site.
CREATE TABLE `users` (
`username` varchar(20) DEFAULT NULL,
`password` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1Then, add a username and password to the table.
INSERT INTO users (username, password) VALUES ('admin', 'test');-
Now, navigate to your localhost and you should have a working login screen.
Finally, commit your project:
-
$ git add . -
$ git commit -m 'new_commit_message' -
$ git push heroku master

