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 the arp-scan utility to scan for devices connected to your network:
sudo arp-scan -l --interface=wlp2s0 Change wlp2s0 to the name of your current wifi device, find out with ip 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:
git clone cd minileaf
composer install./minileaf device connectThis will prompt you for the device's IP address, and an identifiable name that you will use to manage this device later on, for instance office or living.
Once this information is passed on, it will wait for you to hold the power button on your Nanoleaf control panel for 5 seconds. Press ENTER to continue.
When the pairing is finished, you'll should see a success message. Then you're ready to control the panel via commands.
./minileaf power on device-name./minileaf power off device-namebrightness-value can be a value from 0 to 100, where 100 is fully bright and 0 is off.
./minileaf set brihgtness device-name brihgtness-value./minileaf device effects device-name./minileaf set effect device-name "Effect Name"