-
Notifications
You must be signed in to change notification settings - Fork 4
Lightscripting Phillips Hue
James Brundage edited this page Mar 28, 2022
·
1 revision
Hue Bridges let you control every Philips Hue (or compatible ZigBee) light in your house.
To get started with LightScript and your Hue Bridge press the link button and run this command in the next 30 seconds:
Find-HueBridge | Connect-HueBridge
LightScript will remember this Hue Bridge, so you only have to run this once per machine.
After you're set up, run
Get-HueLight
Now try setting the lights:
# Make the color temperature a warm afternoon (This should work on all bulbs).
Set-HueLight -ColorTemperature 425
# Make a bedroom pink (This should work on all color bulbs)
Set-HueLight -RoomName Bedroom -Hue 340 -Saturation .8 -Brightness 1
# Make the kitchen a light blue
Set-HueLight -RoomName Kitchen -RGBColor "#1245ab"
# Turn off the light Nightstand1
Set-HueLight -Name Nightstand1 -Off
# Make all of the lights blink once
Set-HueLight -Effect select
# Make all of the lights loop color
Set-HueLight -Effect colorloop
# Make all of the lights stop looping color
Set-HueLight -Effect none
Bridges also coordinate schedules, read and write sensors, and process rules.
# Get all of the sensors
Get-HueSensor
# Read the daylight sensor
Read-HueSensor -Name Daylight
# Add a schedule to blink all lights in 10 minutes
# (this is great for the oven)
Add-HueSchedule -In '00:10:00' -Command (Set-HueLight -Alert lselect -OutputInput) -Name Blink10
Set-HueLight supports smart aliasing.
This means that you can run Set-HueLight by any name of a light (or room).
This syntax will be available after you re-import. Once you've connected, you should be able to:
# Set a light by name
LightStrip1 -RGBColor "#1245ab"
# Set a whole room by name
Bedroom -On -ColorTemperature 425