-
Notifications
You must be signed in to change notification settings - Fork 4
Lightscripting Nanoleaf
James Brundage edited this page Mar 28, 2022
·
1 revision
NanoLeaf is a flexible multipanel light with a built-in microphone for music effects.
On Windows, you can Find-NanoLeaf to discover devices.
NanoLeaf devices tend to be a little slower to respond to SSDP requests, and so you may have to increase your timeout, depending on your network quality.
To pair, press the link button and run this command in the next minute
Find-NanoLeaf | Connect-NanoLeaf
Once you have the nanoleaf connected, you can:
# Get information about each NanoLeaf
Get-NanoLeaf
# Get a list of panels from each NanoLeaf
Get-NanoLeaf -Panel
# List plugins on the device
Get-NanoLeaf -ListPlugin
# List effects on the device
Get-NanoLeaf -ListEffect
# Set all NanoLeaf devices to a color temperature
Set-NanoLeaf -ColorTemperature 6500
# Make all NanoLeaf devices dim
Set-NanoLeaf -Brightness .1
# Make them bright again
Set-NanoLeaf -Brightness 1
# Directly use a plugin
Set-NanoLeaf -Palette "#ff0000","#00ff00", "#0000bb" -PluginName Wheel
# Directly use a plugin with an option
Set-NanoLeaf -Palette "#ff0000","#00ff00", "#0000bb" -PluginName Wheel -EffectOption @{linDirection='up'}
# Set a series of panels
Set-NanoLeaf -Panel @{
1234 = "#ff0000" # set a series of panels
}
# Enable fast external control
Set-NanoLeaf -ExternalControl
# Set a series of panels, via UDP
Set-NanoLeaf -Panel @{
1234 = "#ff0000" # set a series of panels
} -AsByteStream
# Set all panels to an RGB Color
Set-NanoLeaf -RGBColor "#00ff00",
# Set all panels to fade between two RGB Colors
Set-NanoLeaf -RGBColor "#012356", "#1245ab"
# Set all nanoleafs to an effect name.
# Effect names are currently case-sensitive.
Set-NanoLeaf -EffectName 'Blaze'
# You can also Watch for nanoleaf touch events:
Watch-NanoLeaf
# This will allow you use Register-EngineEvent to handle events, like whenever a panel is touched.
Register-EngineEvent -SourceIdentifier NanoLeaf.Touch.Down -Action {
$event.MessageData | Out-Host
}