Skip to content

Commit

Permalink
Update install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlgo11 committed Dec 1, 2021
1 parent 3bab5f8 commit 684486f
Showing 1 changed file with 25 additions and 19 deletions.
44 changes: 25 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,40 @@ GitHub Activity graph on Nanoleaf Canvas using the Nanoleaf LAN API.

## Installation

### Nanoleaf Canvas IP
[![](https://img.shields.io/docker/image-size/carlgo11/nanoleaf-github-activity?label=Docker&logo=Docker&sort=semver&style=for-the-badge)](https://hub.docker.com/r/carlgo11/nanoleaf-github-activity)
[![](https://img.shields.io/docker/image-size/carlgo11/nanoleaf-github-activity?color=3fb930&label=GitHub&logo=GitHub&sort=semver&style=for-the-badge)](https://github.com/Carlgo11/nanoleaf-github-activity/pkgs/container/nanoleaf-github-activity)

Set the value of `NANOLEAF_HOST` in `.env` to the Canvas IP address and port. The IP address can be found from your DHCP server or by scanning your network with something like Nmap.
### Environment Variables

The default port for Nanoleaf canvas is `16021`.
| Name | Description | Example |
|:--------------:|:-------------------------------------------------------:|:---------------------:|
| GITHUB_USER | GitHub Username | "Carlgo11" |
| NANOLEAF_HOST | LAN IP of the Nanoleaf Canvas | "192.168.1.2" |
| NANOLEAF_PORT | Optional Nanleaf API port. Default is 16021 | "16021" |
| NANOLEAF_TOKEN | Nanoleaf [API Key][postman_api_key] ||
| PANELS | List of Canvas panel IDs in reverse chronological order | "1001 1002 1003 1004" |

### API Key

An API key is needed to control the Nanoleaf Canvas. To get your API key follow the instructions by Nanoleaf on [Postman #Add a user](https://documenter.getpostman.com/view/1559645/RW1gEcCH#2bee1873-aedb-4a8f-9353-035e2d9ad584).
When you've received your API key, set it as the value for `NANOLEAF_TOKEN`.

### Panel IDs
## Usage

This program needs to know the order of your Canvas panels and their IDs.
To get your panel IDs follow the instructions on [Postman #Layout](https://documenter.getpostman.com/view/1559645/RW1gEcCH#3eef67f5-8793-415e-ab09-53e75a2586c4)
Add the panel IDs to `PANELS` in in reverse chronological order.
### Docker

Example:
```SH
PANELS="1001 1002 1003 1004"
```SHELL
docker run --env-file .env carlgo11/nanoleaf
```

## Usage
### Docker Compose

```SH
docker run --env-file .env carlgo11/nanoleaf
```YAML
version: '3.7'
services:
nanoleaf:
image: carlgo11/nanoleaf-github-activity
env_file:
- .env
```
## License
The project is licensed under GPLv3. See the full license in [LICENSE.md](LICENSE.md).
The project is licensed under GPLv3. See the full license in [LICENSE.md](LICENSE.md).
[postman_api_key]: https://documenter.getpostman.com/view/1559645/RW1gEcCH#2bee1873-aedb-4a8f-9353-035e2d9ad584

0 comments on commit 684486f

Please sign in to comment.