Apparently there's science that says that sunrise is a healthy way to wake up. If your boss won't let you schedule your day around the sun, you need this.
Get the TP-Link LB-130s configured and named on the LAN with the Kasa app. Update firmware. LB-230s should work, but have not been tested. This works on Linux. It should work with node and npm on an always-on Windows or OS-X machine, but those have not been tested. E-mail [email protected] with info. [The two links in this paragraphs are Amazon affiliate links, which could earn me a commission.]
Requires some node.js packages:
$ npm install
Note that node-persist requires user write permission in the working directory.
Try
$ node master.js
then configure at http://localhost:8000/ with a UI like this
To install permanently, if Ubuntu 18.04, avoid bugs with
$ sudo npm install -g npm@latest
$ hash -d npm
then for any Linux/OS-X
$ sudo npm install -g forever
$ crontab -e
And add the lines
SP=[Absolute path to master.js]
@reboot /usr/local/bin/forever start --workingDir $SP $SP/master.js
Then test
$ sudo reboot