Hufx - Controlling Lifx bulbs with Hue

Hey y’all.

I just got a Hue bridge and a couple of Hue dimmer switches, to see if it was possible to control the Lifx bulbs with a third-party system.

And success I have been able to! I have written some Ruby, to poll the Hue bridge for button events, and then send those events; on, off, brightness up, brightness down to the Lifx bulb.

There are only two caveats!

  1. I had to fork the Lifx Ruby gem, as that code is no longer maintained. I have got that work now.
  2. I had to fork a (as there is no official) Hue Ruby gem, as that code didn’t support sensors (the dimmer switch counts as a sensor in the Hue API).

So with those two caveats there are a few options.

  1. Submit patches to update both repos
  2. Keep forks and publish new Ruby gems

Bare in mind I haven’t spoken to either gem author yet, so hopefully option 1 pans out. But more likely it’ll be a combination of the two.

Anyway that was a long post, and I haven’t even shown my Hufx (get it Hue + Lifx) code yet. Well seeing as it wouldn’t work for anyone else yet, I thought best not share it, but I will over the next few days.

Let me know if you’d be interested in this kind of thing!

2 Likes

I am very interested in this, would be great to combine the quality hardware of LIFX and the quality hub/software of Hue

1 Like

I am also insanely interested. I’m not very proficient with Ruby, but I could still help maintain the project if needed or chip in with ideas of how to make it generic enough so that it gets to a point where it’s usable for other people as well.

I have a few Hue devices at home, switches included, and I just got a LIFX bulb as a present. And I am trying to do exactly this. Since the wife loves the brightness of the LIFX bulb and we are already used to controlling our lights via these dimmer switches.

1 Like

Hi all, glad a few of you are interested in this. I’ve not had a chance to work on it over the holiday period, but hopefully in a few days I’ll get back at it and share my code. :slight_smile:

I’ve not forgotten, just haven’t had time to update the code. It’s gone pretty well, I can push it up tomorrow, and write up an example of how to use it.

I’m still waiting on my PR to be merged into the Hue gem to add Sensor support, but we can work around that for now. :slight_smile:

Wondering if your code has been posted anywhere? I’m interested in trying this out. If you have any basic instructions, it would be helpful. I’m a bit green in Ruby but have experience in other languages.

1 Like

So sorry for my late reply. I have pushed my code up, but I need to write instructions on how to use it. https://github.com/juliancheal/huefx

There are lots of issues, one big one, being that my changes to the Hue gem haven’t been merged yet, so I still need to use my fork of that.

I’m working on getting this to be easily deployed onto something like a raspberry pi using Docker. If that would be of interest to people.

Heck yes that would be very interesting. I would gladly make a donation for a cup of coffee or a six-pack of beer or something like that just for your hard work and making my life easy.

I actually already have a Docker host setup so docker is a perfect implementation.

Cool, I’m just getting all the kinks worked out this evening, then I’ll post it up :slight_smile:

I have experience in working with Docker or if you are looking for some testing let me know. I’m more then willing to help some “Beta” testing.

1 Like

Any chance you’ve made any additional progress??

I’ve been playing with some Node implementations and while i can get the bulbs to come on and off, dimming would be nice.

Looking at the reply in this thread, it seems to be possible without any gems, just using HomeKit: Just a Light Switch?