Loading...
Loading...
Control Philips Wiz smart lights via Node.js library. Use when Claude needs to: (1) Create WizLight instances with IP addresses, (2) Control light status (on/off), (3) Set colors (RGB, RGBW, RGBCW), (4) Adjust brightness, (5) Retrieve light status, (6) Configure connection options (port, timeout, retries), (7) Schedule light control with node-cron, (8) Run ready-made light control scripts
npx skill4agent add anubhavgupta/wiz-light wiz-light"What is the IP address of your Wiz light?" or "Where is your Wiz light located?" or "What IP does your Wiz light use?"
# Navigate to the skill directory first
cd wiz-light
# Install dependencies
npm install
# Turn light ON
node scripts/light-on.js 192.168.1.2
# Turn light OFF
node scripts/light-off.js 192.168.1.2
# Set color with brightness
node scripts/light-color.js 192.168.1.2 38899 blue 80
# Check status
node scripts/light-status.js 192.168.1.2package.jsonnpm init -y"type": "module"wiz-lightnode-cronimport { WizLight } from 'wiz-light';
// Create instance with IP and port (IP must be provided)
const wl = new WizLight('192.168.1.2', { port: 38899 });
// Turn light ON
await wl.setLightStatus(true);
// Turn light OFF
await wl.setLightStatus(false);
// Set properties
await wl.setLightProps({
r: 0,
g: 255,
b: 0,
c: 0,
w: 100,
dimming: 100
});
// Get current status
const status = await wl.getStatus();
console.log(status.result);setLightProps()wcw: 100c: 0c: 100w: 0const wl = new WizLight('192.168.1.2', {
// Port number (default: 38899)
port: 38899,
// Time to wait before retrying in ms (default: 1000)
statusCheckTimeout: 1000,
// Number of retry attempts (default: 5)
retryTimes: 5
});node-cronimport { WizLight } from 'wiz-light';
import cron from 'node-cron';
const wl = new WizLight('192.168.1.2', { port: 38899 });
// Schedule light to turn ON every day at 6:00 AM
cron.schedule('0 6 * * *', async () => {
await wl.setLightStatus(true);
});
// Schedule light to turn OFF every day at 10:00 PM
cron.schedule('0 22 * * *', async () => {
await wl.setLightStatus(false);
});scripts/light-on.jsscripts/light-off.jsscripts/light-color.jsscripts/light-status.js# Navigate to the skill directory first
cd wiz-light
# Install dependencies
npm install
# Turn on light with default white color
node scripts/light-on.js 192.168.1.2
# Turn on light with custom color and brightness
node scripts/light-on.js 192.168.1.2 38899 red 100
# Turn off light
node scripts/light-off.js 192.168.1.2
# Set specific color
node scripts/light-color.js 192.168.1.2 38899 blue 80
# Check status
node scripts/light-status.js 192.168.1.2package.jsonnpm init -y"type": "module"wiz-lightnode-cron