Lightmanagement Server to control room lighting
You will need a recent version of node js (http://nodejs.org/). To configure, install and start run:
npm install
node setup.js
Tested on Raspbian and OSX.
Make sure the Device is connected to the network.
sudo apt-get install mongodb
git clone https://github.com/mostley/lightnet.git
npm install
node setup.js
Choose local
as DB Option.
- Discovery of handlers
- Management of available lights
- controling lights via 3 dimensional coordinate system
- ESP8266
- autoconnect to Wifi (including Access Point for credentials)
- autodiscovery (registers itself at lighnet server)
- registers itself at DNS
- support for WS2812, WS2801 and APA102 LED Strips
- check whether light count has changed (in comparison with what is saved in the API) after restart
- ping handlers if still available
- nodes (e.g. esp8266) with installed Handler
- Hub (e.g. raspberry pi zero) with installed Server
- Devices (e.g. android) with installed Client (not yet, use webinterface for now)
- Nodes listen for multicast message on 224.0.0.1:3535
- Server multicasts a message containing "lightnet:"
- Nodes answer with a TCP message to :3636 with ";;\r\n"
- Server pushes the changes of the node list to the clients (TODO)
- On User interaction Client sends a POST message to the Server
use IPTables to NAT map port 80 to port 4060 where the webinterface runs. Like this for example:
sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 80 -j REDIRECT --to-port 4060
Append this line to your /etc/rc.local if you want this to survive a reboot (without sudo).
While running the API offers a very rudimentary interface documentation page under http://<yourserver>:4050/apiDocs/
.