Logo
Program smart lights API Documentation

Nanoleaf

Number of APIs: 32


From Section 7 of the Nanoleaf Open API Reference. Requires setting up a developer account and signing in to their developer portal.

[nanoleaf logo](https://s3.amazonaws.com/Qodex-static-getQodex-com/Qodex-docs/nanoleaf-logo.png)

Click the orange Run in Qodex button to import this Qodex collection and cnvironment into your local instance of the Qodex app.

Quickstart

  1. Update the Qodex environment with your IP and port.

  2. If you already have an authorization token, update the Qodex environment with your token. Otherwise, you will need to use the Add a user POST request to generate an authorization token.


1. Quickstart: lighting up the Nanoleaf - Quickstart: Add a user

POST http://{{ipAddress}}/api/v1/new

A user is authorized to access the OpenAPI if they can demonstrate physical access of the Light Panels.

Generate an authorization token

  1. On the Nanoleaf controller, hold the on-off button for 5-7 seconds until the LED starts flashing in a pattern.
  2. From the Qodex app or your own app, send a POST request to the authorization endpoint within 30 seconds of activating pairing, like this (substituting the IP address and port for your central controller):

http://192.188.x.x:16021/api/v1/new

The result returned will be a 32-character authorization token that you will use in all of your subsequent calls.

Refer to Section 6 of the Nanoleaf Open API Documentation.

Note: In this request's test script, the auth token value will be set as an environment variable called authToken. If you already have an authorization token that you'd like to use, update the Qodex environment with your token.



2. Quickstart: lighting up the Nanoleaf - Quickstart: Get all light controller info

GET http://{{ipAddress}}/api/v1/:auth_token/



3. Quickstart: lighting up the Nanoleaf - Quickstart: update on/off

PUT http://{{ipAddress}}/api/v1/:auth_token/state



4. Quickstart: lighting up the Nanoleaf - Quickstart: List Effects

GET http://{{ipAddress}}/api/v1/:auth_token/effects/effectsList



5. Quickstart: lighting up the Nanoleaf - Quickstart: Update Effect

PUT http://{{ipAddress}}/api/v1/:auth_token/effects



6. Authorization - Add a user

POST http://{{ipAddress}}/api/v1/new

A user is authorized to access the OpenAPI if they can demonstrate physical access of the Light Panels.

Generate an authorization token

  1. On the Nanoleaf controller, hold the on-off button for 5-7 seconds until the LED starts flashing in a pattern.
  2. From the Qodex app or your own app, send a POST request to the authorization endpoint within 30 seconds of activating pairing, like this (substituting the IP address and port for your central controller):

http://192.188.x.x:16021/api/v1/new

The result returned will be a 32-character authorization token that you will use in all of your subsequent calls.

Refer to Section 6 of the Nanoleaf Open API Documentation.

Note: In this request's test script, the auth token value will be set as an environment variable called authToken. If you already have an authorization token that you'd like to use, update the Qodex environment with your token.



7. Authorization - Delete a user

DELETE http://{{ipAddress}}/api/v1/:auth_token

Requires an authorization token of an existing user.



8. Get all controller info - Get all light controller info

GET http://{{ipAddress}}/api/v1/:auth_token/



9. State - On/Off

GET http://{{ipAddress}}/api/v1/:auth_token/state/on



10. State - Color Temperature - update

PUT http://{{ipAddress}}/api/v1/:auth_token/state

1.5.0:

  • Min and max values returned for ct are wrong. They should be 1200-6500, but are returned 0-100.


11. State - Brightness

GET http://{{ipAddress}}/api/v1/:auth_token/state/brightness



12. State - Hue

GET http://{{ipAddress}}/api/v1/:auth_token/state/hue



13. State - Saturation

GET http://{{ipAddress}}/api/v1/:auth_token/state/sat



14. State - Saturation - update

PUT http://{{ipAddress}}/api/v1/:auth_token/state/sat



15. State - Color Temperature

GET http://{{ipAddress}}/api/v1/:auth_token/state/ct

1.5.0:

  • Min and max values returned for ct are wrong. They should be 1200-6500, but are returned 0-100.


16. State - Color Mode

GET http://{{ipAddress}}/api/v1/:auth_token/state/colorMode



17. Effects - Select

GET http://{{ipAddress}}/api/v1/:auth_token/effects/select



18. Effects - Write

PUT http://{{ipAddress}}/api/v1/:auth_token/effects



19. Effects - List

GET http://{{ipAddress}}/api/v1/:auth_token/effects/effectsList



20. Panel Layout - Global orientation

GET http://{{ipAddress}}/api/v1/:auth_token/panelLayout/globalOrientation



21. Panel Layout - Global orientation - update

PUT http://{{ipAddress}}/api/v1/:auth_token/panelLayout/globalOrientation



22. Panel Layout - Layout

GET http://{{ipAddress}}/api/v1/:auth_token/panelLayout/layout

To retrieve the panel layout, send an HTTP GET request like this (inserting your authorization token):

http:192.188.x.x/api/v1/<auth_token>/panelLayout/layout



23. Identify - Identify

PUT http://{{ipAddress}}/api/v1/:auth_token/identify

Causes the panels to flash in unison. This is typically used to help users differentiate between multiple panels.



24. Rhythm - Rhythm connected

GET http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmConnected

Indicates if the Rhythm is connected to the Light Panels or not.



25. Rhythm - Rhythm active

GET http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmActive

Indicates if the Rhythm's microphone is currently active or not.



26. Rhythm - Rhythm id

GET http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmId

Indicates the Rhythm's Id in the Light Panel system.



27. Rhythm - Hardware version

GET http://{{ipAddress}}/api/v1/:auth_token/rhythm/hardwareVersion

Indicates the Rhythm's hardware version.



28. Rhythm - Firmware version

GET http://{{ipAddress}}/api/v1/:auth_token/rhythm/firmwareVersion

Indicates the Rhythm's firmware version.



29. Rhythm - Aux available

GET http://{{ipAddress}}/api/v1/:auth_token/rhythm/auxAvailable

Indicates if an aux cable (3.5mm) is currently connected to the Rhythm.



30. Rhythm - Rhythm mode

GET http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmMode

Allows the user to control the sound source for the Rhythm. Writing 0 to this field sets the Rhythm's sound source to the microphone, and writing 1 to the field sets the sound source to the aux cable.



31. Rhythm - Rhythm mode - update

PUT http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmMode

Allows the user to control the sound source for the Rhythm. Writing 0 to this field sets the Rhythm's sound source to the microphone, and writing 1 to the field sets the sound source to the aux cable.



32. Rhythm - Rhythm positions

GET http://{{ipAddress}}/api/v1/:auth_token/rhythm/rhythmPos

Indicates the position and orientation of the Rhythm in the Light Panels' layout.



ENDPOINTS