Anyone used Trådfri Remote or Dimmer?

UPDATE (late 2020): For anyone reading this thread now who wants a quick summary, most of the Ikea remote/button devices will not work with Hubitat. (Yes, this is an old thread, but the fact that they don't work is still true. :slight_smile: ) One exception is the Symfonisk Remote (works with built-in driver) and unofficially the "wireless dimmer" (plain, round white knob; custom driver required, and no guarantees). The warm white bulb is also officially compatible; you may have mixed luck with others (particularly color bulbs where their implementation of the color model is possibly incomplete or at the very least not matching what Hubitat requires, the hue/saturation model).

My original post is preserved as-is below for context. Your best bet is to consider the variety of other natively supported button devices, which you can find on the Compatible Device List from the docs (and should my post become massively out of date and any of the below change, I'd expect these devices to be added there if that happens).


Original post:

I just bought some IKEA Trådfri bulbs, and some came with a remote (the 5-button device, https://www.ikea.com/us/en/catalog/products/20303317/). I also bought a dimmer (hockey-puck style, https://www.ikea.com/us/en/catalog/products/20347830/) just for fun to see if either or both of these could pair to Hue or Hubitat.

It appears some people have had luck using the puck/dimmer on ST (IKEA Tradfri Button -- help needed (DTH in post 36) - Community Created Device Types - SmartThings Community), but I'm not sure anyone has gotten the 5-button remote to do anything besides report battery status (I hastily did a find-and-replace to get one DTH for the remote working on Hubitat and found the same, though since the button models are different that isn't too surprising--I don't see that device implement the button capability on ST, but I also don't see anything in the ZigBee or device logs when I try to use it).

Thought I'd ask before I go to far. I'm also going to try them with the Hue bridge, but I don't think they work for much besides on/off there either. I think they can be paired directly to bulbs as well, which might be the best option, though that would obviously lack some features.

I'd be happy to loan or donate one of these to anyone who'd be willing to work on a driver. :slight_smile: Otherwise, in the US they are sold both alone and as part of kits with bulbs if anyone is interested. I got these mostly to see how the bulbs compare to Hue (jury is still out) so I won't be disappointed either way. (On a related note, I'm happy to see that today's firmware update added support for the Hue dimmer remote! I'm really just trying to find good button devices to avoid adding a Caséta Pro bridge to all my existing equipment. :slight_smile: )

4 Likes

I have both of these devices, the 5 button (steering wheel) device is not possible to support at this time.
The device operates using Zigbee group broadcasts only, and while HE could be updated to deal with this type of payload, it's not a high priority at this time.
The puck device is almost complete, and will probably be in the next release, it is however fidgety and I'm not sure if I'll be able to reliably get two buttons (cw = 1, ccw = 2) with pushed and released out of it or not.

2 Likes

Thanks for the updates! I'll go back to my idea of trying the 5-button remote on the Hue bridge or paired directly to the bulb(s). Look forward to seeing what functionality can be squeezed out of the puck/dimmer, though I might just end up doing the same for that device. I really just wanted the bulbs for some lesser-used fixtures where I didn't feel like paying for the Hue color bulbs and could deal with some inconsistency in case the Trådfri ones don't work quite the same...figured the remotes were cheap enough (especially as part of a bulb/remote package) that it couldn't hurt to try those too. :slight_smile:

Xiaomi buttons @bertabcd1234 , fantastic price and work very well.
Also nice to hear about the pucks @mike.maxwell, I'll keep my 3, just in case! :slight_smile:

1 Like

I have a few Xiaomi buttons, but as you probably know, there are some problems with them. First, like all Xiaomi devices, they are subject to falling off the network easily, in many cases probably because they're routing through a repeater that doesn't treat them as well as the hub does. Of the known-working repeaters (the Sylvania Smart+ non-A model and the Orvibo), neither seems to be made anymore. Xbee is the only remaining option currently known to work, but it requires buying components from an electronics retailer and configuring the device yourself, to say nothing of how less clean it looks. (I've actually tried this but think there's something wrong with my module, as the Digi software never finds it; I have another on the way.) If there is an easier way here (besides keeping everything pretty close to the hub and eliminating other repeating ZigBee devices), please let me know. :slight_smile:

Also, the Trådfri "puck"/dimmer doesn't cost much more than a Xiaomi button, is available locally-ish for many people, and probably follows a standard ZLL or ZHA profile that, despite oddities above, is more likely to work consistently, so there are some advantages. Multi-presses and holds are also a bit odd on Xiaomi but it sounds like it's even worse on the puck. It would be cool if the 5-button model would work and we'd finally have a decent, reasonably priced multi-button device! (Also tempted to try one of the Aoetech models but they cost much more and have mixed reviews.)

1 Like

other options...

Osram Lightify smart switch: 4 buttons, press, hold and release on all 4 (driver coming soon)
Hue dimmer: 4 buttons, top and bottom press, center press, hold and release (driver in build 1.1.1)
Hank 4 button (already out)
Not in picture is the Osram Lightify 2 button switch, this driver is in release 1.1.1 as well.
Each of these is $30 or less

Then there's always Lutron Picos, at $12 to $15 each, which could pay for the bridge on a large install...
Also the ZRC 90, 8 button @$45

Thanks for the ideas! I do have some Hue dimmers (paired to Hue--excited to see that there's a native Hubitat driver in the latest release!) and that's probably what I'll use. I have the 2-button Osram switch (probably the one you mentioned but didn't picture, the one that goes over a toggle or rocker) and it seems to have problems staying paired, but I had the same issue on ST and might just have a dud.

I've definitely considered the Pico remotes, but I really want to avoid having another hub/bridge in my house (if Hubitat could license Clear Connect or whatever Wink did, now that would be awesome :slight_smile:). I've never seen the Hank button before, so thanks for that idea! (Wonder if you can rub/sand off the pre-printed button labels :laughing:).

Have to say, I’ve only ever had one bad experience with any of the Xiaomi buttons, motion sensors or contacts (have many of each). Which was when I had the TRÅDFRI bulbs connected to ST, how I don’t know, but those bulbs were repeaters for many of my Xiaomi devices. If my other half turned the lights off at the switch most wouldn’t work. Drove me to the edge of madness :wink:

Took me several weeks to resolve that issue. Now my bulbs reside on Hue, the rest on my Hubitat (then ST). Not one issue since. I have two other plugs which I use as repeaters. One ST, one Hive (UK) plug. Out of 8 contacts, 6 motion sensors and 6 buttons dotted around, again not an issue. In fact with the Hubitat hub, I find them more resilient than I did on ST.

I guess it horses for courses, no two places or device setup is the same. But gotta say, I do like ‘em. Agree on the pucks, and look forward to when I can get those onboard :+1:

Hope you get your second Xbee working. Yeah, that needs a good looking case. Maybe someone with a 3D printer could design something. Looking at you @EdwardN. :stuck_out_tongue_winking_eye:

I won't suggest keeping the Xiaomi buttons 30 feet or less from the hub again (but that really does work). Have not a had any drops from those.

@mike.maxwell,

I just picked up the Tradfri bulb with the spinner dimmer. I'm thinking this is the one that you thought you could get working?

I just tried to pair the spinner with hubitat, but it doesn't find it. I put it right next to the hub while looking for new devices and then hold the button for ten seconds. The red light stays on, but the hub never finds anything.

Am I doing something wrong here?

Thanks.

No, but we don't have a driver for it currently anyway, and it won't work with anything we currently have.
I think I needed to do a factory reset on mine.

Oh. I thought you said you were hoping to put it in the next release back in July.

Thanks.

Haven’t tried with Hubitat, but you should be able to get the Hub to at least pair with it so the bulb can be controlled by both the hub and the dimmer.

I wrote some instructions here that should help. Pulling the battery is important with the Trådfri remotes if they won’t pair.

But that is smartthings. Will the same dth work with hubitat?

Thanks!

You dont need that DTH with Hubitat. I merely pointed you there for the instructions on how to prepare a Trådfri remote and the dimmer for pairing. The actual procedure is obviously going to be different for Hubitat. The remote and the dimmer don't have a driver in SmartThings either as far as I'm aware. The DTH written by EDVALD EYSTEINSSON was for the bulbs, not the remotes. Hubitat already has drivers that work with Trådfri bulbs.

In SmartThings, the remotes simply pair as THING. You might try seeing if you can pair them as "Device" in Hubitat. The idea is to simply get the hub to recognize them, not interact with a driver. If you pair the bulb with the hub, and you're able to pair the dimmer with the hub, then when you pair the dimmer to the bulb (because that is how IKEA Trådfri is designed to work) then you should be able to control the bulb from both the hub and the dimmer.

If you just pair the dimmer to the bulb first, you'll be able to control the bulb with the dimmer, but you won't be able to then pair the bulb to the hub. If you pair the bulb with the hub, but then pair the dimmer to the bulb without the dimmer first being paired with the hub, then the dimmer will just steal the pairing away from the hub and you won't be able to control the bulb from the hub anymore. Both the dimmer and the bulb have to first be paired with the hub, or your not going to be able to use the both the hub and the dimmer to control the bulb. This is because there is no driver for the dimmer, If there was, then you would be able to adjust the dimmer, the dimmer would talk to the hub and the hub would control the bulb. That's not what you need to achieve in this case. You need both the hub and the dimmer paired with the bulb at the same time.

1 Like

THANKS! It works great. Well your directions work great. The ikea steering wheel thing is a little flakey. But it's just as flakey with Hubitat as it is without, so ...

Thank you again!

-Todd

1 Like

Mike, Any update on when we can expect the driver for the Lightify 4 button? I have one on my desk just waiting for a driver.

I have both the Lightify 4 button switch and also the so-called Mini Switch. I currently have the 4 button switch paired with the Lightly Gateway and don't have it or the lights it controls paired with Hubitat yet.
But, I have paired the Mini Switch with Hubitat. It is current just pairing as an unknown device. But I will dig deeper to see if I can create a driver for it. I would suppose it would be similar to the driver for the 4 button switch.
One thing I noticed that I would like to figure out though. I also have Lightify Plugs/Switches connected to Hubitat as Generic Zigbee Outlets. I have the problem that it switches on and off when I use the Mini Switch. I am pretty sure this is via the ZLL protocol that doesn't require a hub. My Lightify LEDs that are paired with the Lightly Gateway are not reacting to the switch. So, I suppose the Lightly gateway is somehow limited the devices connected to it to only react to other devices connected to the gateway and not be generally "open". Since my Lightify Outlet is only paired to Hubitat it is still open to listening for any ZLL devices it sees. So, I would like to figure out how to tell the Outlet to no longer listen for other ZLL commands while it is paired to hubitat. I suppose there is some cluster I can utilize to configure this.

Anyways, looking forward to getting my Lightify switches hooked up to Hubitat. It's just natural to control lights using a physical switch and not be dependent on an app or manually accessing the Hubitat hub via smartphone to turn lights on and off.

WOW, I've been able to pair and use this Ikea puck! I chased down some old posts on the ST forums and used a DTH someone was attempting to get working. I could never get this working on ST, but have managed it on HE :slight_smile:

I can see in the Device that I'm changing levels by turning the puck, but how the heck do I create a rule to test it with some lights?

I could use webCoRE but I'm trying to cut the use of it.
Any tips welcome!

This is the driver I'm using, I have no idea how clean it is or if there could be issues. But just happy its working.

	/**
 *  Tradfri Dimmer v0.2
 *
 *  Copyright 2017 Kristian Andrews
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
 *
 *  In this handler the following actions are recognised
 *    turning clockwise slowly increased the level, the amount is determined by the time turning
 *    turning clockwise fast increased the level by 50
 *    turning anticlockwise slowly decreases the level, the amount is determined by the time turning
 *    turning anticlockwise fast decreases the level by 50
 *
 *  There are several reported actions that I can't decipher
 *    
 *  When the level reaches 0 the switch is turned off, any level above 0 the switch is on
 *  
 *  Can be used to control lights by the use of a SmartApp such as Synchronised Dimming
 *
 *  To do:
 *  1) Debug why the light flashes when I turn off, maybe I don't need to report events for the ones that are set or the commands should be reversed?
 *  e.g. when Off is set from the app GUI do I need to send an Off event as well?
 *  2) Update so that a fast turn clockwise/anticlockwise can turn the lights on and off but maintain the set level
 */
metadata {
	definition (name: "Tradfri Dimmer v0.2", namespace: "andrews.k", author: "Kristian Andrews") {
		capability "Sensor"
		capability "Switch"
		capability "Switch Level"
		capability "Configuration"

		fingerprint endpointId: "01", profileId: "0104", deviceId: "0810", deviceVersion: "02", inClusters: "0000, 0001, 0003, 0009, 0B05, 1000", outClusters: "0003, 0004, 0006, 0008, 0019, 1000"
	}
	
}

// parse events into attributes
def parse(String description) {
	log.debug "Parsing '${description}'"
	// TODO: handle 'switch' attribute
	// TODO: handle 'level' attribute
	def name = null
	def value = null
	def name2 = null
	def value2 = null
	
	// Check if the stored variables are initialised
	if (state.level == null) {
		state.level = 100
	}
	
	if (state.OnOff == null) {
		state.OnOff = 1
	}
	
	if (state.start == null) {
		state.start = now()
	}
	
	if (state.clockwise == null) {
		state.clockwise = 0
	}
	
	if (description?.startsWith("catchall:")) {
		//def descMap = zigbee.parseDescriptionAsMap(description)
		
		log.debug "Catch all: $description"
		log.debug zigbee.parseDescriptionAsMap(description)
		
		// Responds to Zigbee events sent by the dimmer
		// Probably not the most elegant solution
		if (description.endsWith("00 0000 05 00 00C3")) {
		
			// Start Turn clockwise
			log.debug "cw"
			
			// Store when the turning started and the direction
			state.start = now()
			state.clockwise = 1
		} else if (description.endsWith("00 0000 01 00 01C3")) {
			// Start turn anticlockwise
			log.debug "acw"
			
			// Store when the turning started and the direction
			state.start = now()
			state.clockwise = -1
		} else if (description.endsWith("00 0000 07 00 ")) {
			// Stop turning
			log.debug "Stop"
			
			// Calculate duration of turn
			def turnTime = now() - state.start
			//log.debug "Turn ms: $turnTime"
			
			// If the turn is too long ignore it, it probably came from a missed event
			if (turnTime > 2500) {
				turnTime = 0
			}
			
			// How much change to the level
			// 2000 ms = full up or down
			int change = turnTime / 20
			
			//log.debug change
			
			if (state.clockwise == 1) {
				// If clockwise, increase the level and turn on
				
				// Update the stored state
				state.level = state.level + change
				
				// If above 100 reset to 100
				if (state.level > 100){
					state.level = 100
				}
				
				// Create the ST event details
				name = "level"
				value = state.level
				
				// Turn on switch if off
				if (state.OnOff == 0){
					// Create the ST event details
					name2 = "switch"
					value2 = "on"
					
					// Update the stored state
					state.OnOff = 1
				}
				
				// Set state to not turning
				state.clockwise = 0
			} else if (state.clockwise == -1){
				// If anticlockwise, decrease the level
				
				// Reduce the stored level
				state.level = state.level - change
				
				// If below 0 reset to 0
				if (state.level < 0){
					// Make sure it doesn't go below 0
					state.level = 0
				}
				
				// Create the ST event details
				name = "level"
				value = state.level
				
				// If level = 0 then turn off switch
				if (state.level == 0) {
					// Update stored state
					state.OnOff = 0
					
					// Create ST event details
					name2 = "switch"
					value2 = "off"
				}
				
				// Set state to not turning
				state.clockwise = 0
			}
		} else if (description.endsWith("00 0000 04 00 000100")) {
			// Fast turn anti-clockwise
			log.debug "fast acw"
			
			// turn down level by 50
			state.level = state.level - 50
			
			// If below 0 reset to 0
			if (state.level < 0){
				state.level = 0
			}
			
			// Create ST event details
			name = "level"
			value = state.level
			
			// if reached 0 turn off switch
			if (state.level == 0) {
				if (state.OnOff == 1) {
					state.OnOff = 0
					name2 = "switch"
					value2 = "off"
				}
			}
		} else if (description.endsWith("00 0000 04 00 FF0100")) {
			// Fast turn clockwise
			log.debug "fast cw"
			
			// turn up level by 50
			state.level = state.level + 50
			
			// make sure it doesn't go above 100
			if (state.level > 100) {
				state.level = 100
			}
			
			name = "level"
			value = state.level
			
			if (state.OnOff == 0) {
				state.OnOff = 1
				name2 = "switch"
				value2 = "on"
			}
		} else if (description.endsWith("00 0000 07 00 ")) {
			// Unknown reply - appears after most turns
			log.debug "Unknown catchall 1"
		} else {
			log.debug "Other Catch all: '$description'"
			// The output I have seen so far from the dimmer
			// catchall: 0104 0008 01 01 0100 00 D035 01 00 0000 04 00 000100 - fast turn anti-clockwise
			// catchall: 0104 0008 01 01 0140 00 D035 01 00 0000 04 00 000100 - different type of fast turn anti-clockwise?
			// catchall: 0104 0008 01 01 0100 00 D035 01 00 0000 04 00 FF0100 - fast turn clockwise
			// catchall: 0104 0008 01 01 0140 00 D035 01 00 0000 04 00 FF0100 - different type of fast turn clockwise?
			
			//def descMap = zigbee.parseDescriptionAsMap(description)
			//log.debug zigbee.parseDescriptionAsMap(description)
		}
	} else {
		log.debug "Not catch all: $description"
	}
	
	// createEvent returns a Map that defines an Event
	def result = createEvent(name: name, value: value)
	def result2 = createEvent(name: name2, value: value2)
	
	// If there is any result log it
	if (name != null) {
		log.debug "Result 1: ${result?.descriptionText}"
	}
	if (name2 != null) {
		log.debug "Result 2: ${result2?.descriptionText}"
	}
	
	// returning the Event definition map creates an Event
	// in the SmartThings platform, and propagates it to
	// SmartApps subscribed to the device events.
	return [result, result2]
}

// handle commands
def on() {
	log.debug "Executing 'on'"
	// Handles 'on' commands from the SmartThings app or others
	
	// if switched off, turn on and set level to 50
	state.level = 50
	state.OnOff = 1
	
	// Send switch on and level events
	sendEvent(name: "switch", value: "on")
	sendEvent(name: "level", value: 50)
}

def off() {
	log.debug "Executing 'off'"
	// Handles 'off' commands from the SmartThings app or others
	
	// Update the stored state
	state.level = 0 // Set level to 0
	state.OnOff = 0 // Set to off
	
	// Send events to report set level and switch off
	sendEvent(name: "switch", value: "off")
	sendEvent(name: "level", value: 0)
}

def setLevel(int lev) {
	log.debug "Executing 'setLevel' $lev"
	// Handles 'setLevel' commands from the SmartThings app or others
	
	// If the level has changed
	if (lev != state.level) {
		if (lev == 0) {
			// If 0 switch off
			
			// Update the stored state
			state.level = lev
			state.OnOff = 0
			
			// Send events for the updates
			sendEvent(name: "switch", value: "off")
			sendEvent(name: "level", value: 0)
		} else {
			// Set the stored level
			state.level = lev
			
			// If above 100 set to 100
			if (state.level > 100) {
				state.level = 100
			}
			
			// If the switch is off turn it on
			if (state.OnOff == 0) {
				state.OnOff = 1 // Update stored state to on
				sendEvent(name: "switch", value: "on")
			}
			
			// Send event to set the level (needed?)
			sendEvent(name: "level", value: state.level)
		}
	}
}

def configure() {
	log.debug "Configure called"
	["zdo bind 0x${device.deviceNetworkId} 0x01 0x01 8 {${device.zigbeeId}} {}"]
}
1 Like

I saw that ST DTH, too, but in my opinion they wrote it wrong. They used the "Switch" and "Switch Level" capabilities, so basically it acts like a dimmer--a real, in-wall dimmer switch, not a remote control for one. It is usable in this way, except the device (and only the device, unless I guess you use something like the equivalent of Trendsetter) "remembers" its settings like dim level, and each time you start "dimming" the device, it will work from there regardless of the state of the device(s) it actually controls.

I imagine the above implementation would be difficult to actually use in apps/rules. I don't see why they didn't write it as a button device (maybe a regular push or hold is button 1 and actions turning left or right are buttons 2 and 3). It appears Mike was working on a driver for this above that presumably would have worked like this, but I'm not sure if it was ever released.

I can't imagine how someone would use this as-is (unless, again, maybe you have it "synced" with actual bulbs/dimmers). I might take a look at the driver and see if it's easily re-doable as a button.