Finally here is the release of the web controller, you can find it in the file manager.
And so now you can build your own functional controlable led screen over internet.
I've deviated a bit from my previous ideas about my web app dev logs, so what's changed?, and what does that look now? here the answers:
- Full MySQL (abandoned the SQLite idea)
- sha384 for password hashing (instead of md5, not a game changer but still beter)
- reCAPTCHA on authentication (against brute force)
That all, now some screenshots.
To change the reCAPTCHA API key pair, open the file adminAccount.php and change line 14.
$secret = '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe';
And index.php, line 50:
<center><div class="g-recaptcha" data-sitekey="6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI"></div></center>
A guide to get your key pair can be found here: https://developers.google.com/recaptcha/intro on google website.
For the SQL settings, open the "DB.class.php" file on a text editor. Now specify the database host ($dbHost), username ($dbUsername), password ($dbPassword), and name ($dbName) as per your database server credentials.:
private $dbHost = "localhost";
private $dbUsername = "root";
private $dbPassword = "";
private $dbName = "arduino";
For the forgot password email feature, open the "email_functions.php" file in a text editor and do the following changes:
Specify your domain (example.com) in $resetPassLink variable and specify also the sender name ($serderName), sender email ($serderEmail), and body content ($mailContent).
$resetPassLink = 'http://example.com/admin/resetPassword.php?fp_code='.$userData['forgot_pass_identity'];
$serderName = 'HLVLED-F3.75R-16S';
$serderEmail = 'firstname.lastname@example.org';
$to = $userData['email'];
$subject = "Password Update Request | HLVLED-F3.75R-16S";
$mailContent = '<p>Dear <strong>'.htmlentities($userData['first_name']).'</strong>,</p>
<p>Recently a request was submitted to reset a password for your account. If this was a mistake, just ignore this email and nothing will happen.</p>
<p>To reset your password, visit the following link: <a href="'.$resetPassLink.'">'.$resetPassLink.'</a></p>
<p>Let us know at email@example.com in case of any query or feedback.</p>
That's enough, now create a database (for example arduino) on phpMyAdmin and import the "SQL/arduino_web.sql" file on this database.
The default credential are:
Open the admin URL (http://example.com/led/admin/) on the browser and log in to the admin panel and change the login credentials.
Dashboard after authentication:
Add a new message:
List of message:
Now for the arduino sketch, edit ethernetWireMaster.ino, line 9:
char server = "your-server.fr"; // change to your host
String dataLocation = "/led/index.php HTTP/1.1"; // change to your PHP page
To where you have set up your web controller.
On the same file, line 73, you can adjust in milisecond the refresh interval for retrieving message:
delay(60000); // Delay before next loop (one minute).
Voila, that all.
I've been running my display like that since 2 weeks now, with no interuption and an arduino sketch who call the gate each minute and everything seem fine and stable.