Hue Ambiance Color A19 bulb without Hue Bridge

Just finished my first integration of a device that required custom code and wanted to share the steps for others who may be going through one for the first time as I found there was a lot of lingo I had to sort through in addition to figuring this out. I have an iPhone. No clue what is different on Android. This is what worked for me:

  1. If you have already went to “My Home” and “Add a Thing” your device may have showed up as a “Thing”. I left this in and changed the name multiple times as I played with it until I figured things out. At the end of the process I eventually had to delete the device and re-add it. If you have not added it yet, I recommended not adding it until you have downloaded the code. If you have, no need to mess with it anymore as you will have to remove and re-add.
  2. Go to (keep this SmarthThings window open once you login, you will need to come back here)
  3. Login
  4. Click on “my hubs” and “my devices” and make sure that your hub and your devices show up. I learned the hard way that there are a couple different entry points into step # 2. The original one I was given did not actually take me to one that recognized my hub even though it let me sign-in. Technical support can help you with the correct one if your hub does not show up.
  5. @sticks18 (gentleman who writes code) has a device handler (also referred to as DTH or custom code depending on who is talking) he has written to operate the bulbs. Follow this link to get to it:
    Enhanced Zigbee Hue Bulb - Direct Connect to ST
  6. Scroll down and click on the link he left there which will take you to the github website where the code is kept.
  7. Click on Raw button
  8. Copy code
  9. Go back to SmartThings Window
  10. Click on “My Device Handlers”
  11. Click on “Create New Device Handler”
  12. Click on “From Code”
  13. Click on “Create” at bottom of page
  14. Click on “Publish” at top right and “For Me”
  15. If you previously added the device, delete it now. Go to “My Devices”, choose the device, scroll to the bottom and delete. Light will need to be off and you will need to be out of it on the app to do this.
  16. Turn light off
  17. Go on phone and add the device. (My Home, +, turn light on, etc.)
  18. Close app
  19. Once added, go to SmartThings Window and find it in “My Devices”
  20. Click Edit and Choose “Improved Zigbee Hue Bulb MA - Test” for “name” and “type” then click update.
  21. Open app on phone and test

Just wanted to point out that not everyone is on the IDE URL you used above. It is best to use

More info can be found here:

1 Like

Welcome! :sunglasses: I’m glad that you were able to get things working to your satisfaction. SmartThings is very flexible and powerful, but as you did discover, not always very intuitive.

For anyone who finds this thread in the future, we might want to add two additional points.

The Official Integration uses the Hue Bridge

First, officially the only method which is supported for using hue bulbs is to have them attached to their own bridge and then to connect the bridge to your SmartThings account.

The reason is that SmartThings uses a different set of zigbee channels than the hue bridge uses. If your particular hub happens to be on one of the channels that the hue bridge does not use, you will never be able to use the bulb again with any hue bridge without buying an additional device and going through some additional steps. Because this can be so frustrating to customers, that method is not officially recommended. Which also means that if you do run into any problems and you are trying to connect to hue bulb without using the hue bridge, SmartThings support will not help you.

That said, there are some customers who choose to go ahead and use a Hue bulb without the hue bridge, and it is technically possible to do that.

The Custom Code FAQ

Most people find the following FAQ on using custom code helpful. It explains both the various terminology that might be used and the general concepts. There is also a brief discussion further down in the thread about different “shards,” which is the issue that you ran into with the addresses. So even though you already have yours working, you might want to glance over the FAQ for the discussion of the general concepts as it will come up again as you add other custom code in the future.

Again, I’m glad you got yours working.

p.s. The steps 15 through 18 in your post should not be needed. You should be able to simply change the device type handler to the new one by editing the device entry in the IDE. It’s helpful to understand this, because there may be other times in the future when you want to temporarily change to a new device type handler and then change back again. It’s not necessary to actually delete the device from your account each time – – you can simply assign it to the preferred device type handler using the edit method, and then assign it back again. That way you don’t also have to change all of your rules and automations. This method is covered in the FAQ.

Getting Answers

Also if you do have any questions about a specific device type handler, the quickest way to get answers is to post in the author’s thread for that particular code. The author will be automatically notified when a new post is added to it, and other people who are using the same code may also be able to help.

Finding Code to Use

Finally, you probably have already discovered this, but again for others who may find the thread later, the easiest way to find custom code to use is usually to check the quick browse lists in the community – created wiki where the code is organized by type. There’s also a list in the project report section called “get started” which has a number of helpul topics you might find interesting. :bulb:


Thank you for the warm welcome! Was not sure who to write to as the posts I found were several months old and many of the answers were still over my head until I fiddled around a lot and learned what the lingo was. Good to know it notifies the author!

FYI…Steps 15 to 18 were indeed needed. I spent a couple hours changing device handlers and editing this particular handler before finally going back to this original handler and deleting the device and re-adding it. It was only after deleting the device itself and re-adding that it worked. No clue why.

Thank you for the info on the “shards”- no doubt that is more new lingo! Also, I had not found the Quick Browse and I am sure that will be helpful in the future!

If you found deleting the device to be necessary, it means that you must have had a failed pairing at some point so that the device’s “fingerprint” was listed in your account device table, but the full exchange of information hadn’t actually taken place. So I’m not doubting that in your particular case you found steps 15 to 18 necessary, but they should not be necessary most of the time.

The reason that that’s important comes up once you’ve had your system running for awhile and you’ve added multiple rules and automations that include that particular device.

When you then go to delete the device, the system will tell you that it’s in use in those rules, and it will make you go through and change every individual rule before you can delete the device from your account. And then if you add the device back into your account, you would have to go back through and rebuild each individual rule. :disappointed_relieved:

Fortunately, except in the case of the failed pairing that I mentioned, you shouldn’t have to delete the individual device, which means you don’t have to change all the rules that refer to it. All you need to do is switch to the different device type handler. All your rules remain intact. :sunglasses:

So as a general guideline for others, I do think that steps 15 to 18 should be removed, as they will only cause people to have to do additional work that otherwise should not be needed.

If somebody tried the process and things weren’t working, then they could try deleting to see if it helped. But I would reserve it for a troubleshooting step rather than making a part of the basic process.

Welcome again! As always, SmartThings is a very powerful system, but it can be quite confusing figuring out how to access all those features. :stuck_out_tongue_winking_eye: You should always feel free to ask in the forums if you get stuck on anything, you can often save yourself several hours of work that way.

Thanks, I set this up with my Philips Hue Bloom lamp and it is working perfectly so far.