-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,38 @@ | ||
## lightflow | ||
# lightflow | ||
|
||
- Smooth lighting transitions with hue lights. | ||
- Transition light colours and brightnesses gradually. | ||
- Set a target brightness or colour, transition time, and let fly... | ||
|
||
Create a config file at `server/src/config/private.ts` which looks like this: | ||
## Usage | ||
|
||
```typescript | ||
export const HUE_USERNAME = "GET_ME_FROM_THE_HUE_DOCS"; | ||
Firstly, follow the [Hue developer | ||
instructions](https://developers.meethue.com/develop/get-started-2/). Create a | ||
new "app" on your bridge and save the `username` it generates for you. | ||
|
||
export const STEP_INTERVAL_MS = 10 * 1e3; // seconds | ||
``` | ||
Then run the `chmac/lightflow` docker container on the same network as your hue | ||
bridge. It runs on port `4000`. If you're using docker-compose, this should be enough: | ||
|
||
```yaml | ||
version: "3.8" | ||
|
||
To start run `./build.sh`. | ||
services: | ||
lightflow: | ||
image: chmac/lightflow | ||
environment: | ||
- HUE_IP=192.168.0.XXX | ||
restart: unless-stopped | ||
ports: | ||
- "4000:4000" | ||
``` | ||
Then run `node server/build/` | ||
### Advanced | ||
Lightflow should now be running on port 4000. | ||
Some aspects of the application can be controlled via environment variables set | ||
via docker. | ||
If you really want to use this and have challenges, open an issue here and I'll | ||
do what I can to help out. | ||
- If you have more than 1 bridge on your network, or if your bridge has had | ||
multiple IP addresses, the server will log an error on startup. Figure out the | ||
IP of your hue bridge (see the hue docs above) and then set it in `HUE_IP`. | ||
- To enable debugging on the graphql server set `DEBUG_GRAPHQL` to a string. | ||
- To enable debugging of the application set `DEBUG` TO `*` or `lightflow:*`. |