The goal of this project is to use Nanoleaf Canvas tiles and create a virtual skylight based on the current weather.
This project is built with deno because ... all the cool kids are doing it.
- Clone Repo
- Ensure you have deno installed.
- Copy the
.env.example
file and create a.env
file. Fill out the fields with your IP Address, Port and Auth Token first. See ".ENV Setup" below. - Run the code
deno run --allow-env --allow-read --allow-net index.ts
Likely when you first clone this repo you will not have all the required configuration information to just start.
- Find the IP address of your Nanoleaf. I did this using my router app but there are many ways. See the Nanoleaf Docs for other options.
- In the Nanoleaf Docs they mention the default port is
16021
but also not to hardcode that. At this time I have hardcoded it but may later build a dynamic way to determine it. - Getting the auth token can be done with the
getAuthToken
function. It simply calls/api/v1/new
just as the docs suggest.
Part of this project has started to use an API for to get near real time images of the sky and weather data.