
A CLI PHP application to control Nanoleaf panels, using the Nanoleaf OpenAPI.
You'll need to know the IP address of your Nanoleaf controller.
On Linux (Ubuntu), you can use thearp-scan
utility to scan for devices connected to your network:
sudo arp-scan -l --interface=wlp2s0
Changewlp2s0
to the name of your current wifi device, find out withip a
.
Minileaf is a highly experimental project, use at y our own risk.
You'll need PHP 7.4+, Curl, Json, and Composer.
Clone this repository:
cd minileafcomposer install
./minileaf device connect
This will prompt you for the device's IP address, and an identifiable name that you will use to manage this device later on, for instanceoffice orliving.
Once this information is passed on, it will wait for you to hold the power button on your Nanoleaf control panel for 5 seconds. PressENTER
to continue.
When the pairing is finished, you'll should see asuccess
message. Then you're ready to control the panel via commands.
./minileaf power on device-name
./minileaf power off device-name
brightness-value
can be a value from0
to100
, where100
is fully bright and0
is off.
./minileafset brihgtness device-name brihgtness-value
./minileaf device effects device-name
./minileafset effect device-name"Effect Name"