IKEA Trådfri


#173

I totally get the idea of no DTH available atm. But the problem I have is I cannot even get the ‘thing’ show up in the app and hence can’t really get much from it even if I wanted to play with ZigBee. I’ll try to pair it again later this week and see if I can get any luck from it.


(sam) #174

I’d give it a try where it is, I did mine from a fixture across the room and it paired fine, may need to run with the puck to the hub holding the connect button if it doesn’t show up initially though…


(MikeG) #175

Apologies for the newbie question ; just got the ST and a set of Ikea E14’s to try. Exciting :slight_smile:

All works a treat with the new handler but linking them to the Amazon Echo is a different story. Grouped 3 lights fine and it will dim/brighten on request however the colour resets to warmest when the light level changes. Still working out how this can be fixed so any pointers really gratefully received. Does not do it if I use the ST app. I have updated to the latest handler code also


(Edvald Eysteinsson) #176

Which device type handler are you using?


(MikeG) #177

Your wonderful code :slight_smile: Checked it was the latest version as I saw you made a change to cover something similar. Might be me being daft … usually the case!


(Edvald Eysteinsson) #178

There was a bug in the code that prevented disabling level and color temperature linking, if you still experience any issues with the latest code then post in this thread and i’ll look into it.

https://community.smartthings.com/t/update-ikea-tradfri-bulb-device-type/83394


( Cosmo) #179

This would seem a promising place to start for creating a Usable DTH for the remote. Maybe?


(MikeG) #180

Hiya,

Still seems to do it - even reapplied the latest code in case. Also altering the colour temp in the app. I have double checked the link option is set to off. Probably my fault somewhere :slight_smile:


(Edvald Eysteinsson) #181

Are you sure that you are setting it to off and pressing “Done” in order to save the changes? i just checked and it works for as it should for me and i have no changes locally that’s not published


(William Tuzik) #182

Just picked up an IKEA Tradfri bulb and I am having trouble pairing it directly to the smartthings hub. I do not have a puck any advice. I have already done powercycling 6 times and the bulb flashes once but never shows up in the add a thing screen. The bulb is literally sitting on the hub.


(Keith Spragg) #183

When I paired the bulb, I had to reset the bulbs a couple of times each, and run the “add a thing” a couple of times before it finally picked up - a couple of the bulbs went first time (I paired six in total), but most of them were at least twice each.

I didn’t have to do anything special - and I just added the device handler that @Edvald had posted above without any changes.

I’m pretty new to smartthings, and this was my first non-out-the-box device, too.


(Rob) #184

Can you tell me what you did to get the bulb to reset? I’ve had no success so far in getting a Trådfri to be seen by a STH-ETH-200.


(Keith Spragg) #185

At the moment, I’ve not got a lamp that accepts GU10 bulbs that I could place near the V2 SmartThings hub I’ve got, so instead I moved the hub near the only place I could. The switch in that room is a single button dimmer, and when I tried turning it on/off rapidly it didn’t work - somewhere around switch 4 it locked up every time!

Instead, I just manually twisted the bulb in and out of contact quickly 6 times, and waited a second for the light to flash once, which is it’s signal that it’s in pairing mode. If it doesn’t flash, I go again, and once it does flash, I hold the box at 10 cm or so.

As mentioned above, sometimes that isn’t enough, so I cancel the thing-search on the phone, and repeat the reset on the bulb, before finally starting the add a thing search again. Once I’ve paired them, the distance isnt an issue from where the box lives normally.


(Rob) #186

Thank you. I’ve been flipping the switch on and off at varying speeds for 5 or 6 times and, thankfully, occasionally get a slight flash. The hub sees a Lightbulb 01 at that time, but it is perpetually in a “PLEASE WAIT” state.

You mentioned not being able to get the bulbs near the hub and that is my problem as well; closest I can get is about 4 feet. Well, perhaps that is my problem. (Now I’m wishing I bought one of the E26 “socket on a cord” at IKEA just for this purpose.)

Thanks again.


(mark) #187

Ok I bought two of the GU10 bulbs yesterday from Ikea and just in case anyone is having issues then this is how I included them into ST.

Bulb was about 6 feet from hub and on the other side of a wall.
Placed bulb in holder with power off.
Run the ST app and pressed find things.
Whilst ST was scanning turned on the light at the switch.
30 seconds or so later ST found a thing, renamed it and saved clicking done.
In the app my new thing was on my list but next too it it said PLEASE WAIT.
Logged into ide and went to devices, clicked on edit and went to device type. ST had decided my new bulb was in fact a Samsung TV, WTF!!!
Looked in the devices until I found z wave ZLL tempruture light and changed device type to that and updated.
Went back into ST app and my new bulb was now showing as a light that I can dim and turn on and off.

Hope this helps someone else
:grinning:


(Keith Spragg) #188

They always show as the first thing in the list (Samsung Smart TV 2015, iirc) if you haven’t got a matching device handler. @Edvald has written a custom device handler for the IKEA bulbs, which once installed auto detected the bulbs correctly for me. Loads of threads on here on how to add Device Handlers, and @Edvald’s code is linked above :slight_smile:
Once you’ve installed the code, you’ll never need to switch it manually again!

Edit: @SmartHomePrimer’s post below is bang on the money. Do that. Also, changed the word “Detect” to “Thing” in sentence one.


(Douglas Krug) #189

Adding IKEA Trådfri to SmartThings

Here are step by step instructions for adding an IKEA Trådfri bulb to SmartThings for the first time. Thanks to EDVALD EYSTEINSSON and others, we now have a wonderful device handler that allows better color temperature control over IKEA Trådfri bulbs than the Ikea Gateway or Steering Remote currently allows.

Once the bulb(s) are added to the SmartThings hub, you can also use up to two IKEA Trådfri devices to control one or more bulbs and still maintain control by the SmartThings Hub. Those instructions follow.

Adding IKEA Trådfri bulb device handler to SmartThings

  1. Sign-in to the SmartThings developer API at https://graph.api.smartthings.com/
  2. Choose My Device Handlers at that top, then click the green Create New Device Handler button on the right
  3. Select the From Code tab and paste the code copied from here - https://github.com/edvaldeysteinsson/IKEA-Tradfri/blob/master/devicetypes/edvaldeysteinsson/ikea-tradfri.src/ikea-tradfri.groovy
  4. Click the green Create button at the bottom
  5. Click Publish and select For Me from the drop-down that appears
  6. Add a Thing to SmartThings using the app
  7. Reset your IKEA Trådfri bulb (Power ON & OFF 6 times) - This will put the bulb in pairing mode.
  8. Trådfri should appear in the app after about 15 seconds
  9. Click Save on the top right.
  10. Repeat for the next bulb

Pairing the Ikea Steering Remote, Steering Wheel (Dimmer) or Motion Sensor with SmartThings hub

  1. Make sure all the bulbs you want to control are first added to SmartThings
  2. Reset the IKEA Trådfri device by pressing the pair button 4 times quickly per Ikea’s instructions. Wait 10 seconds before attempting to pair with the SmartThings hub.
  3. If the device is not unused, and has been paired with an Ikea bulb or Ikea Gateway, then you should also remove the battery for 10 seconds, reinstall it and wait 10 seconds again before attempting the pairing process.
  4. Add a Thing to SmartThings using the app
  5. Hold the Ikea device right against the SmartThings hub and press and hold the pair button on the Ikea device for about 15 seconds. If it doesn’t appear in the SmartThings app as Thing, then release the button, repeat the reset procedure from Step 2 and again hold the button for 15 seconds (be sure to wait 10 seconds after resetting an Ikea device before attempting to pair).
  6. Rename the device according to its type (i.e. Ikea Remote, Ikea Dimmer or Ikea Motion Sensor)
  7. Repeat Steps 2-6 until you have all the devices you want added.
  8. With one of the bulbs you want to control set to ON, hold the device right next to the bulb base and press the pair button until the bulb begins and finishes pulsing per Ikea’s instructions. You will now have control over the bulb by both the Ikea device and the SmartThings hub
  9. Repeat Step 8 for additional bulbs. As long as you do not reset the Ikea device and it remains paired with the SmartThings hub, it will not be “stolen” by pairing it with additional bulbs. However, it you reset the Ikea device, it will pair only to a single bulb. It must remain paired with the SmartThings hub to prevent this from happening.

Note about Ikea Steering device with SmartThings:

ON/OFF and Dim works, but changing bulb color temperature does not work and will need a device handler when available.

Pairing two devices with one or more Ikea bulbs

As long as both devices you wish to use with your bulb(s) are paired to the SmartThings hub using Steps 2-7 under Pairing the Ikea Steering Remote, Steering Wheel (Dimmer) or Motion Sensor with SmartThings hub, then two devices can control one or more Ikea bulbs at once and still allow control of the bulbs with the SmartThings hub

  1. With one of the bulbs you want to control set to ON, hold BOTH devices right next to the bulb base and press BOTH pairing buttons at the exact same time, keeping both buttons held in until the bulb begins and finishes pulsing per Ikea’s instructions. You will now have control over the bulb by BOTH Ikea devices and the SmartThings hub at once
  2. Repeat for additional bulbs.

Notes:

As long as you do not reset the Ikea devices and they remain paired with the SmartThings hub, they will not be “stolen” by pairing them with additional bulbs. However, it you reset an Ikea device, that device will pair only to a single bulb, steal control from all other devices, and will mess up any pairing you have already done with that device to other bulbs. They must not be reset and must remain paired with the SmartThings hub to prevent this from happening, otherwise you’ll have to repeat the process of pairing them to the hub and then pairing them to the bulb(s) again.

If you are trying to pair two devices to one or more bulbs and only one of them pairs with the bulb, DO NOT RESET THEM. Just repeat Step 1. The pairing buttons must be pressed together at the same time. Three Ikea devices on a single or multiple bulb does not seem to be a repeatable option with the SmartThings hub at this time.

Now all we need is a custom SmartApp to allow multiple bulb color temperatures to be adjusted at once. Maybe “Trend Setter” is a good starting point?

A modification to the Alexa skill to allow SmartThings to control bulb color would be nice too.

[GitHub link updated - 5/8/2017]


IKEA Tradfri Button -- help needed (DTH in post 36)
[UPDATE] IKEA Trådfri Bulb Device Type
IKEA Floalt pairing Smarttthings Hub
IKEA Tradfri Button -- help needed (DTH in post 36)
Problems with Lightify+SmartThings Lately
#190

Thanks for the detailed instructions, Douglass. I was able to add my Tradfri bulbs. However, they said “please wait” next to them until I went into the API site and changed the device type of each one to “ZLL White Color Temperature Bulb”. Then they worked.

Next, I tried to pair my 5 button Tradfri remote with the ST hub. This didn’t work at first. I tried so many times, but finally discovered that moving the hub away from my router, tv, and soundbar allowed it to pair. The pairing signal from the remote must be pretty weak, and was getting interference from another device.

The remote doesn’t do anything in ST, but once it was paired with ST, I could pair it with the bulbs again and control them from both ST and the remote. Woo!


(Keith Spragg) #191

I think you’ve missed the step in @SmartHomePrimer’s set of instructions that gets you to add the Device Handler code to Smartthings API. Either that, or you’re based in the EU and have logged in to the US site (or vice versa, though less likely).

If you’ve got the device handler code in the API, it’ll auto detect the bulbs with the right name (IKEA Tradfri) and they’ll start working correctly. At the moment, by using the “ZLL white bulb” device, you won’t actually get the proper range of white ‘colours’ that the bulbs do and don’t support - @Edvald’s code does all these things for you properly.

Once you’ve got the Code in, you can nip back in to devices and change the device type to “IKEA Tradfri”, which will appear at the very bottom of the list, and from there, any new bulbs you buy will auto-detect.


(Douglas Krug) #192

I wondered about this and actually had the steps written differently before I posted them. Like you, when I first tried adding the bulb and I did not have the device handler installed, it of course showed “Please Wait” because the default device that is assigned is a Samsung TV. Once I had @Edvald’s device handler installed, it didn’t automatically change the bulb device type that was discovered as “Thing”. I had to log into https://graph.api.smartthings.com/ and change the device type to IKEA Trådfri (which shows up last in the list) under “My Devices” > “Device Type”. However, when I added the second bulb, it was auto-detected as IKEA Trådfri. To test, I removed both bulbs, added them back, and now both were added automatically as IKEA Trådfri. Then I removed the device driver and the bulbs from the hub, added the device driver back and again the bulbs were automatically discovered as IKEA Trådfri.

So I rewrote the steps to simplify it, but I still wondered if something was cached in the hub and it was now picking up part of the zigbee ID when discovering subsequent bulbs. I’m too new to SmartThings to know the correct answer to that and I was unwilling to reset my entire hub to factory to test that suspicion. Maybe someone whom has not tried these steps or attempted to add an IKEA Trådfri could confirm if the steps I posted are accurate in every case.

What you confirm in the remote pairing is also possibly due to holding the remote too close. I didn’t have the issue with my SmartThings v2 Hub but I did have the issue with the IKEA Trådfri Gateway. I found that if I held the remote 2 cm away when pairing with the IKEA Trådfri Gateway, I was more consistently successful the first time. I have an Insteon hub, Hue bridge, Wink hub, SmartThings hub, IKEA Trådfri Gateway and two WiFi routers all very close by and have not experienced any pairing issue as a result.

The remote will not interact with SmartThings until there are device handlers for them. Rather, by pairing with the hub first, you prevent the subsequent pairing with the bulb from becoming exclusive between the bulb and the remote. The idea is similar to that shown in this very good video for which I am so grateful because I use this exact method in my own home. This is the method IKEA also uses with the Gateway and it’s a very simple way to maintain control of the lights even if the Gateway or Bridge has no power or is not responding. It makes a lot of sense for IKEA to choose this relatively non-technical method and it avoids the frustration of the Philips Hue method to read tiny serial numbers in light grey off the base of a bulb when the bridge fails to autodetect their Hue bulbs.