![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
hue-push-client
Advanced tools
[![License](https://img.shields.io/badge/License-MIT-blue)](#license "Go to license section")
Allows easy access to the push API of Philips Hue Bridge
npm install hue-push-client
/**
* This example connects to a Hue Bridge and closes connection after 30 seconds
*/
const HuePushClient = require('hue-push-client');
const client = new HuePushClient({ip: '192.168.0.85', user: 'mWAfdI7PUJRvZ9IwXB0YgeLVn9Ytjpb5RjrFJ0rn'});
setTimeout(() => {client.close();}, 30000);
client.addEventListener('open', function () {
console.log('connection opened');
});
client.addEventListener('close', function () {
console.log('connection closed');
});
client.addEventListener('error', function (e) {
console.log('error: ' + e.message);
});
client.addEventListener('message', function (message) {
if (!message.data) {
console.log('empty message');
return;
}
try {
let data = JSON.parse(message.data);
console.log(JSON.stringify(data));
} catch (e) {
console.log('could not parse data');
return;
}
});
The data part of an incomming message looks like this:
[
{
"creationtime":"2021-09-01T08:40:54Z",
"data":[
{
"id":"d231f405-baab-406e-0000-d345a1440000",
"id_v1":"/sensors/8",
"light":{
"light_level":10509,
"light_level_valid":true
},
"type":"light_level"
}
],
"id":"f15d7da4-f849-44c9-0000-afc54dbe0000",
"type":"update"
}
]
You can also retrieve a description of all UUID's that are used in update messages:
/**
* Be aware that uuids() returns a promise
*/
async function getUUIDs() {
try {
let UUIDs = await client.uuids();
console.log(UUIDs);
} catch (e) {
console.log(e);
}
};
getUUIDs();
todo (see examples)
Released under ISC by @Pmant
FAQs
[![License](https://img.shields.io/badge/License-MIT-blue)](#license "Go to license section")
The npm package hue-push-client receives a total of 56 weekly downloads. As such, hue-push-client popularity was classified as not popular.
We found that hue-push-client 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.