Sunrise Simulation for TP-Link Kasa color lightbulbs
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
Settings.5.png
demo.css
form-basic.css
logo.png
logo.svg
master.js
sunrise-tp.js
sunrise.html
youtube.jpg

README.md

sunrise

sunrise

Sunrise Simulation for TP-Link Kasa color lightbulbs with web interface using node.js.

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.

Sunrise Simulation Demo

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 alwynallan@gmail.com 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 node-cron
        $ npm install node-persist
        $ npm install tplink-smarthome-api

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

User Interface

To install permanently use

       $ sudo npm install -g forever
       $ crontab -e

And add the lines

       SP=[Path]
       @reboot /usr/local/bin/forever start --workingDir $SP $SP/master.js

Then test

        $ sudo reboot