Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
hue-daylight
Advanced tools
Auto change hue lights to match daylight based on the sun schedule
const hueDaylight = require('hue-daylight');
const daylight = hueDaylight(config); // See example config beloy
daylight.start();
// Later
daylight.stop();
// config.js
module.exports = {
// fake: {
// initial:
// skip:
// },
colors: {
'<name>': [x, y] // Color xy format
RED : [ 0.6807, 0.3032],
ORNG: [ 0.6041, 0.3743],
GOLD: [ 0.4566, 0.4108],
PINK: [ 0.3203, 0.3172],
BLUE: [ 0.3003, 0.3102]
}
bridge: {
username: '' // Hue Bridge Username
ipaddress: '192.168.1.117' // IP of Hue Bridge
}
location: {
// Used to calc sunrise / sunset
lat: 30.2198,
lon: -98.3586,
},
interval: 5,
configurations: [
{
name: /^recessed|light/i, // regex to match
breakpoints: [
{offset: -1.00, color: 'GOLD'},
{offset: -0.30, color: 'RED'},
{offset: 0.00, color: 'ORNG'},
{offset: 0.05, color: 'GOLD'},
{offset: 0.15, color: 'PINK'},
{offset: 0.50, color: 'PINK'},
{offset: 0.60, color: 'BLUE'},
{offset: 0.70, color: 'PINK'},
{offset: 0.95, color: 'GOLD'},
{offset: 2.00, color: 'GOLD'}
]
}
]
};
Offset is scaled based on sunrise and sunset. We use 3 ranges:
When | Range |
---|---|
0:00 to sunrise | -1 to 0 |
sunrise to sunset | 0 to 1 |
sunset to 23:59 | 1 to 2 |
FAQs
Auto change hue lights to match daylight based on the sun schedule
We found that hue-daylight demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.