-
Open terminal and navigate to your the directory this file is in.
-
Type
npm install
to install the required dependencies -
Rename
.env_example
to.env
(you may have to type ls -a to see it!) -
Then open
.env
in a text or code editor and replace the values in for everything except theGOVEE_BASE_URL
with your own values. (Don't change the stuff on the left of the equal sign)
-
You can request an api key in the govee app, and they will email it to you. Which is weird.
-
You can check your device id online, via a quick google search. (They seem to follow the pattern: 'Hxxxx' where x is a number)
-
You can check your router or use local network tools to find the mac address.
-
PORT is probably fine to leave, but if things don't work, you may want to change it to 5002, 5003, 5008, or some other unused value.
- In terminal, type
npm start
to run the server.
npm run server
will start the server in dev mode, automatically restarting it if you make changes to the code. This is useful when tinkering around.
- Open your browser, and go to to
localhost:5001
(or whatever port number you used.)
Govee's web and LAN APIs don't support individual addressing of LEDs. If you want that, you'll need to use the Govee app, or do some hardware hacking. (There are a ton of good youtube tutorials on that)
For now, this is as good as it gets without cutting wires folks.
- Validate User Input
- Add retries to API requests
- Add awereness for rate limits
- There are two types!
- Make it pretty ✨
- Maybe the page should turn the color of the lights?
- Go for more walks