PHPackages                             jkniest/hue-it - 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. [API Development](/categories/api)
4. /
5. jkniest/hue-it

AbandonedArchivedLibrary[API Development](/categories/api)

jkniest/hue-it
==============

PHP wrapper for the phillips hue api

0.3.0(3y ago)637MITPHPPHP ^8.0|^8.1|^8.2

Since Mar 20Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jkniest/hue-it)[ Packagist](https://packagist.org/packages/jkniest/hue-it)[ RSS](/packages/jkniest-hue-it/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (11)Versions (7)Used By (0)

PHP wrapper for the Phillips Hue API
====================================

[](#php-wrapper-for-the-phillips-hue-api)

[![Test](https://github.com/jkniest/hue-it/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/jkniest/hue-it/actions/workflows/test.yml/badge.svg?branch=main)

Installation
------------

[](#installation)

Simply install this package via composer:

```
composer require jkniest/hue-it
```

[Documentation](https://hue-it.jkniest.dev)
-------------------------------------------

[](#documentation)

The full documentation can be found [here](https://hue-it.jkniest.dev).

Getting started
---------------

[](#getting-started)

You can use the hue-it wrapper for both local network connections or using the cloud.

### Usage (Local bridge)

[](#usage-local-bridge)

First, you'll need to figure out the IP address of your bridge. You can find the IP address in your router.

Also, you need physical access to your bridge.

Below is an example of how we might connect to a bridge with the IP address `123.456.78.9`. After calling the `authenticate` method the application waits until you press the LINK button on your bridge.

```
use jkniest\HueIt\PhillipsHue;

$hue = new PhillipsHue('123.456.78.9');
$hue->authenticate('device'); // Press LINK button

$hue->getLight(3)->turnOn();
```

Of course, you can reuse the generated username. See [Local authentication](https://hue-it.jkniest.dev/authentication/local/)for more information.

### Usage (Cloud)

[](#usage-cloud)

Using the hue cloud is a little more complex than the local network. First, you'll need to [create a Phillips hue app](https://developers.meethue.com/my-apps/).

After creating the app you'll have access to client credentials (id and secret) and an app ID. We need both to connect via the cloud. The device id and name can be chosen as you like.

We recommend that you'll read the basics of [OAuth2](https://oauth.net/2/)before continuing.

For more information see [Cloud authentication](https://hue-it.jkniest.dev/authentication/cloud/).

```
use jkniest\HueIt\PhillipsHueCloud;
use jkniest\HueIt\Cloud\HueClient;
use jkniest\HueIt\Cloud\HueDevice;

$client = new HueClient('id', 'secret');
$device = new HueDevice('id', 'name');

$hue = new PhillipsHueCloud($client, $device, 'app-id');
$hue->getOAuthUrl('state'); // The user must open this url in the browser.

// Here you can use the code which came back from the OAuth process.
$hue->authenticate('code');

$hue->getLight(3)->turnOn();
```

Testing
-------

[](#testing)

If you are writing tests while using hue-it, there are two possibilities if you don't want to make api requests each time your test suite runs:

1. Mock the PhillipsHue instance
2. Create your own Fake PhillipsHueGateway.

Currently we don't have documentation for this, but each Gateway extends from an abstract class and has its own client (Cloud Client VS Local client). You could create a new Gateway class and / or client class which returns mocked or fake data.

Generally it is planned to provide a full test mode.

PHP compatibility
-----------------

[](#php-compatibility)

Please use the following table to check which version can be used for your PHP version

PHP VersionNewest hue-it versionSupportedv8.2v0.3.\*✅v8.1v0.3.\*✅v8.0v0.3.\*✅v7.4v0.2.\*❌Roadmap
-------

[](#roadmap)

- Test mode
- Creating / Deleting / Editing groups and lights
- Capabilities API
- Update handling (Bridge &amp; Light Updates)
- Implement more entities: Schedules, Scenes, Sensors, Rules, etc.
- Configure transition times

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Jordan Kniest](https://github.com/jkniest)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.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

Every ~212 days

Total

4

Last Release

1238d ago

PHP version history (3 changes)0.1.0PHP ^7.4|^8.0

0.2.0PHP ^7.4|^8.0|^8.1

0.3.0PHP ^8.0|^8.1|^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/7fb77ee357245e247ed582cdb6cc071a60317842f88291262d473cc82e8d8eab?d=identicon)[jkniest](/maintainers/jkniest)

---

Top Contributors

[![jkniest](https://avatars.githubusercontent.com/u/15618191?v=4)](https://github.com/jkniest "jkniest (80 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")

---

Tags

huelightsphillipshuesmarthome

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jkniest-hue-it/health.svg)

```
[![Health](https://phpackages.com/badges/jkniest-hue-it/health.svg)](https://phpackages.com/packages/jkniest-hue-it)
```

###  Alternatives

[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[swisnl/json-api-client

A PHP package for mapping remote JSON:API resources to Eloquent like models and collections.

211473.2k12](/packages/swisnl-json-api-client)[storyblok/php-content-api-client

PHP Client for Storyblok Content API

11136.8k4](/packages/storyblok-php-content-api-client)[storyblok/php-management-api-client

Storyblok PHP Client for Management API

1224.4k1](/packages/storyblok-php-management-api-client)[smnandre/pagespeed-api

PageSpeed Insight PHP Api Client 🚀 Analyse web pages for performances metrics, core web vitals...

1511.5k](/packages/smnandre-pagespeed-api)[craftpulse/craft-typesense

Craft Plugin that synchronises with Typesense

122.7k](/packages/craftpulse-craft-typesense)

PHPackages © 2026

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