Philips Hue – simple relay hack

img_20170102_162008OK, so I said I’d start simple but this is about as simple as it gets. I’m almost embarrassed it’s not a little more complicated. I’ve done a teardown of a LBW010 bayonet fitting bulb and thought I’d take a look at its E27 screw-in cousin. (I’ll post this teardown later, but here’s a photo to give you the gist of it.) You can see the main board in the centre and the LED board that I’ve removed. It was similar to the B22 but quite different too.

Coming in from the left in the main photo below are the Hue mains connections – blue neutral and red live. My apologies about the mixed colour schemes but those were the wires I had to hand. Heading out on the right are the positive (red) and negative (black) that normally run to the LED PCB. All I’ve done is connect these directly to the input of a solid state relay. That’s it.img_20170104_212708

So why is this hack a little blunt? Well the four wires you see that aren’t connected are my far more sophisticated attempt to dig out some useful logic signal from test point on the PCB. There’s some nice stuff there. I thought I’d use a PWM output I found on TP5 to drive the SSR. It was almost enough but I hit a small snag. (Currently it works as expected between 1 and 100% but irritatingly switched the SSR on when at 0%.) I thought about leading these to a logic circuit, maybe even another microcontroller.

Then I saw the 3-32V input on the SSR. 32V?? That’s a little bit more that the Hue puts out the the LEDs. Could I? Yes, I could. The Hue outputs are used to driving 260mA at about 31V so with minimal load it actually reached about 37V, but it seemed to work fine. I’m using a constant current driver to drive a low impedance and just getting lucky that the voltage limit is being hit. I know that’s not sensible.

So basically , rip the bulb apart, connect it to a SSR and you can now drive any mains lighting you like! It should work with the B22 and maybe even the GU10 bulbs too, but these single colour bulbs are the cheapest.

Things can certainly be done a little better and it will be. For instance:

  • I could use a voltage divider to tame that 37V a bit.
  • I could drive a normal relay if I added a  suitable series resistor and a flyback diode. SSR have problems driving some loads – ironically LED drivers being one of them.
  • I could dig further into that PWM signal and properly detect the power level of the light, maybe driving more than one relay or SSR.

Anyway, all this will come but I thought this simple hack was worth sharing as-is.

UPDATE: A better way to get to a decent signal to control anything (using a B22 bulb) here.


12 thoughts on “Philips Hue – simple relay hack

  1. Love this hack. Trying to figure out if theres a way to dim the end that goes through the relay. I have a few edison bulb lamps that id like to dim using the hue interface

    • An incandescent bulb might dim OK. I tried track lighting that has a transformer and hit a problem. The fading that Hue does even when simply switching on/off uses very fast switching (at 1kHz) and blew a fuse.

      • are you referring to just skipping the relay altogether and running an incandescent bulb off of the 37v?

  2. Could I dim a few (within rating of the SSR) halogen lamps without having to fiddle with the PWM wires? Or would the SSR go full on at 0%

    • The SSR would go full on at 0%. I have actually found a”proper” PWM output and a simple on/off signal which I’ll document in a new post. Unfortunately they aren’t on easily accessible test points so do require soldering to some tiny components on the PCB.

  3. Pingback: Philips Hue – control anything hack | 0xFRED

  4. Hi 0xfred,

    Like many others, I’m after a way to control something a little more complicated than a one bulb fixture. Do you think this is an easy project to build my own Hue 13 amp switch/outlet from? I’ve read the update post but that looks way beyond my skills.

    Are you able to post close ups of the above picture showing the contacts on the PCB you used?



    • This could be used to switch an outlet. Getting to the contacts on the PCB does unfortunately require some very delicate surface mount soldering. No way round it I’m afraid. I’m tempted to open up one of the even cheaper IKEA bulbs. They work with Hue after jumping through a couple of hoops. Maybe that will be easier to with with.

      • Hi 0xfred, dunno if you saw my other post but the current [Mar 2017] single colour B22 are massively different inside. Apart from the 90v LED board there are now 2 PCB’s a smaller zigbee controller and cheaper single sided main board (for power and current controlled dimming). You can no longer use the 90v for any SSR as the current controller circuit expects ~100ma and if it cannot drive that current the voltage tops out at 100v, and you get no current. I haven’t explored the load requirements but my guess is that it expects a couple of watts to keep it happy. Also with the bulb off there is still 50v.
        My next plan is to decouple the zigbee board and ditch the main power board, but not sure if I’ll find any PWM .. here’s hoping!
        I’d like to post up a few photos for others, but not sure where to put them ..
        BTW I’ve also checked the hue lightstrip+ PWM frequency and it runs at 1Khz. But getting these controllers ain’t cheap at £50+ a pop.

      • The different versions certainly makes things harder. The E27 and B22 bulbs that I examined were certainly completely different.

        A separate ZigBee and power board might be a bonus. The connections between the two seem like a good place to look for an accessible signal.

        If you document the newer bulb and lightstrip, feel free to link to it in the comments (or I can add a link to the main post).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s