npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ambilight

v0.2.4

Published

An API library for Node.js that interacts with a Philips Ambilight TV.

Downloads

22

Readme

ambilight

An API library for Node.js that interacts with a Philips Ambilight TV.

This API provides all documented features and a set of useful functions to control the tv remotely. This API abstracts away the Philips Ambilight REST API. This project is based on the [email protected] project by Peter Murray. As in the HUE API, the Ambilight API supports for each function a callback and if omitted a promise will be returned for use in chaining.

Change Log

For a list of changes, please refer to the changelog. ChangeLog

Installation

$ npm install ambilight

Philips Ambilight Resources

There are plenty of resources about ambilight on the internet, but the best technical description is probably your own tv (http://<ip-address>:1925/1/doc/API.html). You may need to enable jointSPACE by entering the following digit sequence while watching TV.

5646877223

Work in Progress

Currently I am writing new tests to test the REST endpoints. Especially the POST requests have not been tested truely.

API

var ambilight = require('ambilight')

Examples

Getting the Topology

The Topology of the ambilights is an object with the amount of lightstrips mounted to the TV. My TV (Philips 46PFL8007K/12) has 5 lights mounted to the left and right and 10 on the top, bottom is zero. To query the Topology use the following snippet:

var ambilight = require('ambilight');

var showResult = function (result) {
    console.log(JSON.stringify(result));
};

var host = "192.168.0.11",
    api = new ambilight.AmbilightApi(host);

// Using a Promise
api.getTopology().then(showResult).done();

// Using a Callback
api.getTopology(function (err, result) {
    if (err) throw err;
    showResult(result);
});

The resulting output looks like this:

{"layers":1,"left":5,"top":10,"right":5,"bottom":0}

A full list of examples can be found inside the examples directory.