PHPackages                             muesli/huephp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. muesli/huephp

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

muesli/huephp
=============

PHP library to control the Phillips Hue lighting system

1.0(11y ago)3436312MITPHPPHP &gt;=5.4.0

Since Dec 4Pushed 8y ago3 watchersCompare

[ Source](https://github.com/muesli/huephp)[ Packagist](https://packagist.org/packages/muesli/huephp)[ RSS](/packages/muesli-huephp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

huephp
======

[](#huephp)

PHP library to control the Philips Hue lighting system. Started out as a fork of the unmaintained phpHue class () and ended up as a complete rewrite.

Getting Started
---------------

[](#getting-started)

The src/ directory contains the huephp classes and all necessary functions for interacting with the Hue hub.

Additionally, you can easily require huephp as a dependency using [composer](https://getcomposer.org/)

`php composer.phar require muesli/huephp ~1.0`

Check out the "samples" directory. You'll find a few demos, showing you how to interact with huephp. It uses the PEST library to access Hue's RESTful API, but as a user of huephp, you don't need to worry about the details.

hue command-line tool
---------------------

[](#hue-command-line-tool)

bin/hue is a command line lighting system controller.

```
./bin/hue
    -i [Hue bridge's ip]

  If you don't already have a valid registered key for this Hue bridge:
    -g [register a new key with the Hue bridge]

  Once have a registered key, you need to specify it with -k:
    -k [valid key that is registered with your Hue hub]

  Use it in combination with one of the following parameters:

    To get information from the bridge:
      -f [fetch full state from Hue hub]
      -c [check light states: returns 0 when a light is off, 1 when on]

    To control the bridge:
      If you don't specify a light number, bin/hue will target all bulbs:
        -l [light number]

      Turning a light on or off:
        -o [0 for turning the light off, 1 for turning it on]

      To set a new color, pick one of the following options:
        -n [color name (see below)]

        or
        -h [hue in degrees on the color circle 0-360]
        -s [saturation 0-254]
        -b [brightness 0-254]

        or
        -t [white color temp 150-500]

      Additionally options are:
        -r [transition time, in seconds. Decimals are legal (".1", for instance)]
        -e [command to execute before changing light setting]

```

You need to specify an ip (-i), a key (-k) and at least one of the following options: -h, -s, -b, -t, -o or -n. If you don't specify a light, it'll set the values you specify on all of them.

If you don't have a key yet, you can register one by calling bin/hue with -g.

You can turn lights on or off with the -o switch. Any other parameter implies '-o 1'. In other words, if you specify any other parameter when the lamp is off, we'll turn it on for you.

### Presets

[](#presets)

The '-n' switch takes a one-word name for a color, and sets the selected lights to that color. It has a small list of predefined color names, and simply doesn't do anything if you give it a string it doesn't know. It currently knows red, blue, purple, green, coolwhite, and warmwhite. A '-n' parameter may be overridden in part by other parameters. For instance, "-n red -s 50" will give you a pastel red, and "-n blue -r 10" will produce a 10-second fade to blue. Note that "-n red -h 200" will override the redness of the red command with a hue of 200, which is purpleish, but it will inherit the full saturation and brightness of the "red" preset.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4184d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c5c829dc5b295085cb3022e47b98dc15efcdda1fd123d51c7a77ef6482f74e49?d=identicon)[muesli](/maintainers/muesli)

---

Top Contributors

[![muesli](https://avatars.githubusercontent.com/u/146378?v=4)](https://github.com/muesli "muesli (16 commits)")[![navarr](https://avatars.githubusercontent.com/u/145128?v=4)](https://github.com/navarr "navarr (3 commits)")[![olemathias](https://avatars.githubusercontent.com/u/891048?v=4)](https://github.com/olemathias "olemathias (1 commits)")[![PrestaEdit](https://avatars.githubusercontent.com/u/2631425?v=4)](https://github.com/PrestaEdit "PrestaEdit (1 commits)")

---

Tags

hacktoberfest

### Embed Badge

![Health badge](/badges/muesli-huephp/health.svg)

```
[![Health](https://phpackages.com/badges/muesli-huephp/health.svg)](https://phpackages.com/packages/muesli-huephp)
```

###  Alternatives

[mastergalen/adsense-ads

Display Adsense ads easily in Laravel.

1211.2k](/packages/mastergalen-adsense-ads)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
