Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
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
The npm package hue-daylight receives a total of 1 weekly downloads. As such, hue-daylight popularity was classified as not popular.
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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.