{"id":17040343,"url":"https://github.com/carlgo11/nanoleaf-github-activity","last_synced_at":"2025-06-26T13:36:43.464Z","repository":{"id":67868383,"uuid":"352179595","full_name":"Carlgo11/nanoleaf-github-activity","owner":"Carlgo11","description":"GitHub Activity graph on Nanoleaf","archived":false,"fork":false,"pushed_at":"2024-04-15T23:01:38.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"nodejs","last_synced_at":"2024-05-02T04:12:15.064Z","etag":null,"topics":["activity-graph","github-activity","nanoleaf","nanoleaf-canvas"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Carlgo11.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-27T21:20:44.000Z","updated_at":"2024-05-21T02:49:41.452Z","dependencies_parsed_at":"2024-05-21T02:49:40.014Z","dependency_job_id":"702328bb-9bfa-4334-b90d-4932182ad907","html_url":"https://github.com/Carlgo11/nanoleaf-github-activity","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/Carlgo11/nanoleaf-github-activity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Carlgo11%2Fnanoleaf-github-activity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Carlgo11%2Fnanoleaf-github-activity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Carlgo11%2Fnanoleaf-github-activity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Carlgo11%2Fnanoleaf-github-activity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Carlgo11","download_url":"https://codeload.github.com/Carlgo11/nanoleaf-github-activity/tar.gz/refs/heads/nodejs","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Carlgo11%2Fnanoleaf-github-activity/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262077152,"owners_count":23255129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activity-graph","github-activity","nanoleaf","nanoleaf-canvas"],"created_at":"2024-10-14T09:09:29.054Z","updated_at":"2025-06-26T13:36:43.413Z","avatar_url":"https://github.com/Carlgo11.png","language":"JavaScript","readme":"# Nanoleaf Github Activity \u003cimg src=\"https://res.cloudinary.com/dbsfyc1ry/image/upload/v1637969751/nanoleaf_pqdsm7.svg\" height=\"32px\"\u003e\n\nGitHub Activity graph on Nanoleaf Canvas using the Nanoleaf LAN API.\n\n## Installation\n\n[![](https://img.shields.io/docker/image-size/carlgo11/nanoleaf-github-activity?label=Docker\u0026logo=Docker\u0026sort=semver\u0026style=for-the-badge)](https://hub.docker.com/r/carlgo11/nanoleaf-github-activity)\n[![](https://img.shields.io/docker/image-size/carlgo11/nanoleaf-github-activity?color=3fb930\u0026label=GitHub\u0026logo=GitHub\u0026sort=semver\u0026style=for-the-badge)](https://github.com/Carlgo11/nanoleaf-github-activity/pkgs/container/nanoleaf-github-activity)\n\n### Environment Variables\n\nThe project requires the following environment variables to be present.\n\n| Name           | Description                            | Example             |\n|----------------|----------------------------------------|---------------------|\n| GITHUB_USER    | GitHub Username                        | \"Carlgo11\"          |\n| NANOLEAF_HOST  | LAN IP and port of the Nanoleaf Canvas | \"192.168.1.2:16021\" |\n| NANOLEAF_TOKEN | Nanoleaf [Auth Token](#Auth-Token)     |                     |\n\n### Auth Token\n\nControlling the Nanoleaf lights requires an \"auth token\". Follow the instructions below to generate a token.\n\n1. Send a POST request from your computer to the Nanoleaf lights.\n    ```shell\n    curl -X \"POST\" http://192.168.1.2:16021/api/v1/new\n    ```\n2. Press and hold the power button on the lights for 5-7 seconds.\n3. You should now have received a 32 character long \"auth token\" on your computer. Save this inside your `.env` as `NANOLEAF_TOKEN`\n\n\u003e [!NOTE]\n\u003e Replace `192.168.1.2` with the IP address of your Nanoleaf lights.\n\u003e The default port is `16021`.\n\n## Usage\n\nThe Node.js code is written to be run inside a Docker container. You can either use a Docker Compose file or just run a Docker command to start the container. Running this container will expose a Node.js server on port 3000. Any HTTP connections to this server trigger the code to fetch recent GitHub activities and update the Nanoleaf Canvas accordingly.\n\n\u003e [!NOTE]\n\u003e Remember to first populate your `.env`-file with the required data.\n\n### Docker\nRun the Docker container using the provided environment variables from the `.env` file.\n\n```shell\ndocker run --env-file .env --ports 3000:3000 carlgo11/nanoleaf-github-activity\n```\n\n### Docker Compose\n\n```yaml\nversion: '3.8'\nservices:\n  nanoleaf:\n    image: carlgo11/nanoleaf-github-activity\n    restart: unless-stopped\n    env_file:\n      - .env\n    ports:\n      - \"3000:3000\"\n```\n\n### Updating the lights\n\nOnce you've started the Docker container, you can access the Node.js server on http://localhost:3000. Every time you access this page, the nanoleaf lights will update.\nI recommend either setting up a cronjob on your server, or a home automation service such as [Apple Shortcuts](https://support.apple.com/guide/shortcuts/welcome/ios), [Node-RED](https://nodered.org/), [Home Assistant](https://home-assistant.io).\n\n\n## Festive colors\n\nDuring certain dates, the default colors change on the Canvas. Should you not want this, you can create a file called `colors.json` with the following data:\n\n```json\n{\n  \"default\": [\n    \"#EBEDF0\",\n    \"#9BE9A8\",\n    \"#40C463\",\n    \"#30A14e\",\n    \"#216E39\"\n  ]\n}\n```\n\nThe above-mentioned code will cause the Canvas to always use the same colors for the graph. To add it to your container,\nappend your `docker-compose.yml` file with the following lines:\n\n```diff\nversion: '3.8'\nservices:\n  nanoleaf:\n    image: carlgo11/nanoleaf-github-activity\n    restart: unless-stopped\n    env_file:\n      - .env\n    ports:\n      - \"3000:3000\"\n+    volumes:\n+      - \"./colors.json:/app/colors.json\"\n```\n\nHere's a graphical demonstration of the custom festive colors\n\n### Valentines Day _(February 14th)_\n\n![Valentines Day](https://res.cloudinary.com/dbsfyc1ry/image/upload/v1713221809/nanoleaf/02_14_cgtoso.svg)\n\n### Halloween _(October 31st)_\n\n![Halloween](https://res.cloudinary.com/dbsfyc1ry/image/upload/v1713221810/nanoleaf/10_31_afarls.svg)\n\n### Christmas _(December 24th - 25th)_\n\n![Christmas](https://res.cloudinary.com/dbsfyc1ry/image/upload/v1713221810/nanoleaf/12_25_q18913.svg)\n\n## License\n\nThe project is licensed under GPLv3. See the full license in [LICENSE.md](LICENSE.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlgo11%2Fnanoleaf-github-activity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarlgo11%2Fnanoleaf-github-activity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlgo11%2Fnanoleaf-github-activity/lists"}