DEV Community

Dennis 🚀
Dennis 🚀

Posted on • Originally published at Medium on

4

Control your Philips Hue lights from your Laravel code

Recently I created a package to manage my Philips Hue lights with. I wanted an easy way to signal my lights in my office when something special happens. Things that are special for example could be:

  • New user sign up
  • New paid order
  • New support ticket
  • New newsletter subscription
  • … etc

Here’s a link to the package:

Cannonb4ll/laravel-philips-hue

I’m still doing work on it, but the basics are implemented and fully working.

You can switch lights on and off per ID, but also in a complete group.

Syntax is as easy as this:

(new HueClient)->lights()->on(1)

Some example commands:

$hue = new HueClient();

$hue->groups()->all();
$hue->lights()->all();
$hue->lights()->get(1);
$hue->lights()->on(1);
$hue->lights()->off(1);
$hue->lights()->customState(1, [
 "hue" => 25500,
 "bri" =>200,
 "alert" => 'select'
]);

You can do whatever you want!

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Retry later
đź‘‹ Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay