Created
April 3, 2020 03:28
-
-
Save janegilring/9d4741114fc8dd4cb3bd25b8023fd40b to your computer and use it in GitHub Desktop.
Configure color of Philips Hue Lightstrip - example usage: https://twitter.com/JanEgilRing/status/1245433266099965959
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function r { | |
if (-not (Get-Module -Name PoSHue)) { | |
Import-Module -Name PoSHue | |
} | |
$BridgeAPIKey = $env:HueAPIKey | |
$BridgeIPAddress = '10.0.1.236' | |
$Bridge = [HueBridge]::New($BridgeIPAddress, $BridgeAPIKey) | |
$LightName = 'Hue lightstrip plus 1' | |
$Light = [HueLight]::New($LightName, $BridgeIPAddress, $BridgeAPIKey) | |
# Red | |
$Light.SetHueLight(200, 64537, 254) | |
Write-Host "Configured Philips Hue Work-From-Home Lightstrip to RED" -ForegroundColor Red | |
} | |
function g { | |
if (-not (Get-Module -Name PoSHue)) { | |
Import-Module -Name PoSHue | |
} | |
$BridgeAPIKey = $env:HueAPIKey | |
$BridgeIPAddress = '10.0.1.236' | |
$Bridge = [HueBridge]::New($BridgeIPAddress, $BridgeAPIKey) | |
$LightName = 'Hue lightstrip plus 1' | |
$Light = [HueLight]::New($LightName, $BridgeIPAddress, $BridgeAPIKey) | |
# Green | |
$Light.SetHueLight(200, 24432, 254) | |
Write-Host "Configured Philips Hue Work-From-Home Lightstrip to GREEN" -ForegroundColor Green | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment