Back end and web code for controlling the JAJ whole house LED system. This speaks to LEDControllers using UDP, and listens for messages from the hardware LEDChooser.
ajax | ||
core | ||
css | ||
dev | ||
img | ||
install | ||
js | ||
.gitignore | ||
.htaccess | ||
actionbutton.php | ||
boardstatus.php | ||
config-dist.php | ||
functions.php | ||
getpatterns.php | ||
header.php | ||
htmlfooter.php | ||
htmlheader.php | ||
index.php | ||
manifest.json | ||
README.md | ||
setcolor_cli.php | ||
setcolor.php | ||
setpattern.php |
LEDColors
This project is a simple web interface for managing "JAJ LED Controllers". JAJ LED Controllers are custom analog LED strip driver boards which use a WiFi connected microcontroller (ESP8266 for now) to drive analog 12v RGB LED strip lights.
Installation
The hardware "LEDChooser" device uses a database to store named color patterns.
Create Database and Grant Permissions
While logged into the SQL database as root...
create database ledcolors;
create user 'ledcolors'@'localhost' identified by 'mypassword';
grant all privileges on ledcolors.* to 'ledcolors'@'localhost';
flush privileges;
- Note that the "localhost" reference above should be changed to reflect the local environment if a remote database is used.
- The "mypassword" reference is a password chosen for the application and will need to be set in the configuration file.
Configuration
The config.php file should be customized for the local environment. The following settings should receive particular focus:
- LEDADDRESS: This should be set to the broadcast address for the local network.
- DBHOST: If a remote database is used this must be set appropriately.
- DBPASS: This is the password selected in the "Create Database..." section above.