Anyone used Trådfri Remote or Dimmer?

TBH I kind of want it to act like a real dimmer, rather than just on/off. After-all it is an actual dimmer not a button. It seems like they accomplished this in the lighting app in ST as that had a "mirror" option. This is the part I'm missing.

I can get it to turn lights on/off no problem by using Cobra's One To Many app. But obviously not the dimming. I don't think there is a need for it to remember its dimming value. If you use it as intended for the lights, On, set level, off etc. That's all I want it for.
At the very least I have it functioning for on/off which is great.

I agree with you, I don't think its written very well, and thankfully haven't seen it cause any issues. But I'm monitoring for that. Now all I need is a way to mirror the value its set to when turning, but half way there anyway. They were sat there doing nothing, and now at last useful :wink:

1 Like

But that's the problem--it's written as a "Switch Level" driver, which does remember this value. :slight_smile: I think it's a lot closer to a button device--you just activate the second or third buttons with turns. What you want--the device acting as a dimmer for actual dimmable lights--can be done if the driver were properly written as a button device on Hubitat. It would be the job of an app to send the appropriate commands to the lights, which Button Controller can do, as can Advanced Button Controller (and I'm working on an app to make this easier for Pico remotes where many people also want to use them as switches/dimmers, which may be applicable here too).

1 Like

Ahhhh "penny dropped" now I get you.

I just created another one to many to reverse the values.
I can turn on with the dimmer, and should I turn the lights off by any other means, it resets the level to 0 and switch off. Granted not pretty, but at least useful :slight_smile:

Yeah, I keep starting with this thing from time to time, it's pretty difficult to make anything meaningfully out of the data it spits out, part of the issue being the data values returned aren't symmetrical...

1 Like

UPDATE: While it may be useful to play with the driver below, I do not recommend using it. See the one on my later post for something that is closer to functional, albeit one that as of my writing does indeed work like the switch/switch level device I'd prefer it not work like (but that may be the best we can do).

Original post:

OK, so I modified what appears to be a different version of DTH above to use the button model instead of the nonsensical switchLevel capabilities it was using. I am clearly not interpreting the events from the button correctly, since it gives me unexpected button numbers and events but does at least register something for each turn I make...and really each time I come vaguely close to touching the device (it must be extremely sensitive).

When I have more time, I'll compare what I did to the above--I'm assuming that DTH (from the same author, possibly a newer version) does a better job of interpreting the values than whatever i was working with.

If anyone is interested, the below is what I have. I do not recommend using this since it does not produce the expected events at the moment but it may be a good place to start if you are also interested in developing a driver for this device:

/**
 *  Copyright 2018 Robert Morris, portions by K. 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.
 *  
 *  Version Author		Note
 *  1.0		K Andrews	Initial release
 *  1.1		K Andrews	Added Configure button
 * ???         RMoRobert    Attempt at Hubitat modification and adaptation to button model
 */

//import physicalgraph.zigbee.zcl.DataType

metadata {
    definition (name: "IKEA Dimmer", namespace: "RMoRobert", author: "Robert Morris, Kristian Andrews") {
		capability "PushableButton"
		capability "ReleasableButton"
        capability "Sensor"
        capability "Configuration"

        fingerprint profileId: "0104", inClusters: "0000, 0001, 0003, 0009, 0B05, 1000", outClusters: "0003, 0004, 0006, 0008, 0019, 1000", manufacturer: "IKEA of Sweden",model: "TRADFRI wireless dimmer",deviceJoinName: "IKEA Tradfri Dimmer"
        fingerprint profileId: "C05E", inClusters: "0000, 0001, 0003, 0009, 0B05, 1000", outClusters: "0003, 0004, 0006, 0008, 0019, 1000", manufacturer: "IKEA of Sweden",model: "TRADFRI wireless dimmer",deviceJoinName: "IKEA Tradfri Dimmer"
	}
}

// Parse incoming device messages to generate events
def parse(String description) {
	log.trace "ZigBee DTH - Executing parse() for device ${device.displayName}"
	def descMap = zigbee.parseDescriptionAsMap(description)
	def eventType
	def buttonNumber
	
	if (descMap && descMap.clusterInt == 0x0008) {
		
		switch (descMap.command) {
		case "01":
			// Record start time and direction of turn
			state.direction = Integer.parseInt(descMap.data[0], 8)
			if (state.direction == 00) {
				eventType = "pushed"
				buttonNumber = 1
			}
			else if (state.direction == 01) {
				eventType = "pushed"
				buttonNumber = 2
			}
			break
		case "04":
			if (descMap.data[0] == "00") {
				eventType = "pushed"
				buttonNumber = 1
			} else {
				eventType = "pushed"
				buttonNumber = 2
			}
			break
		case "05":
			// Record start time and direction of turn
			state.start = now()
			state.direction = Integer.parseInt(descMap.data[0], 8)
			if (state.direction == 00) {
				eventType = "held"
				buttonNumber = 1
			}
			else if (state.direction == 01) {
				eventType = "held"
				buttonNumber = 2
			}
			else {
				log.warn "Unknown turn direction"
			}
			break
		case "07":
			// Stop turning
			if (state.direction == 00) {
				eventType = "released"
				buttonNumber = 1
			}
			else if (state.direction == 01) {
				eventType = "released"
				buttonNumber = 2
			}
			else {
				log.warn "Unknown turn direction"
			}
			break
		default:
			log.warn "Unhandled command ${descMap.command}; MAP: ${descMap}"
			break
		}
	} else {
		log.debug "Did not parse message for for description : $description"
		log.debug "MAP ${descMap}"
	}	
	if(eventType) {
     	createEvent([ name: eventType, value: buttonNumber, isStateChange: true, descriptionText: "Button 1 was $eventType" ])
		log.debug "Button ${buttonNumber} ${eventType}"
    }
	else {
		log.debug "Events parsed but no button events fired"
	}
}

def refresh() {
	log.trace "ZigBee DTH - Executing refresh() for device ${device.displayName}"
}

def installed() {
	log.trace "ZigBee DTH - Executing installed() for device ${device.displayName}"
	// Set default values
	state.direction = 0
}

def uninstalled() {
	log.trace "ZigBee DTH - Executing uninstalled() for device ${device.displayName}"
}

def configure() {
	log.trace "ZigBee DTH - Executing configure() for device ${device.displayName}"
}
3 Likes

Thanks @bertabcd1234 I’ll give it whirl later and report back. The current is working ok for my needs but more than happy to play.

Agree it is very sensitive though.
I’ve checked it this morning and it’s still connected which is good, and still operational :+1:

Not getting much out of it using the driver above. Although I can see buttons pushed within the logs. Yet nothing within the device page.

That said, using the other clunky driver, I have managed to get it working with a very simple piston and achieved quite acceptable dimming. The only thing I don't like is the "sticking" on a small twist at 50%.

I definitely would not recommend using the above. It seems to see an excessively large number of press, hold, and release events when the button is turned, and it's hard to see a pattern based on what I actually do with the device. I mostly wanted to see if I could get that stabilized. No idea if it's actually creating the events, though I think I added that code in...

1 Like

Bertabcd1234, I had no luck with that code except it was showing as a button device. with Royskis code, it was showing as a light, so I was unable to connect it to anything.

I am a complete noob to this though, so it was probably me.

Mike, this is a lovely looking bit of kit, with 5 useful button on it for only £15. Do you think you might get a driver written? I am afraid it is still outside my ability :slight_smile:

Much nicer than the Philips Hue.

I'm still using mine. Using @Cobra One to Many app.

https://github.com/CobraVmax/Hubitat/tree/master/Apps/One%20To%20Many

The Dimmer is the top device, and the bottom the bulb.

Works very well, apart from when you turn the bulb off by another method as the bulb and the dimmer are then out of sync. To get around that I turn it anti-clockwise first, setting it to zero level and off. Then turn it clockwise, not perfect, but works.

Ah we're talking about different devices. My post was regarding the "puck". Apologies.

Ah, my Bad. I was a bit confused as to whats what. I think they both look like Pucks.

1 Like

Found an even simpler driver for the "pucks".
A simple clockwise on, anti off. Just what I was really looking for.

		/**
 *  IKEA Trådfri Dimmer
 *
 *  Copyright 2017 Jonas Laursen
 *
 *  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.
 *
 *  Updated by Royski to change the clockwise and anti-clockwise on/off
 */
metadata {
	definition (name: "IKEA Trådfri Dimmer 0.2", namespace: "dk.decko", author: "Jonas Laursen") {
		capability "Sensor"
		capability "Configuration"
		capability "Switch"
		capability "Refresh"
		
	fingerprint endpointId: "01", profileId: "0104", deviceId: "0810", deviceVersion: "02", inClusters: "0000, 0001, 0003, 0009, 0B05, 1000", outClusters: "0003, 0004, 0006, 0008, 0019, 1000"
	//fingerprint endpointId: "01", profileId: "C05E", deviceId: "0810", deviceVersion: "02", inClusters: "0000, 0001, 0003, 0009, 0B05, 1000", outClusters: "0003, 0004, 0006, 0008, 0019, 1000"
	}
	
	main("switch")
}

preferences {
	
		input name: "logEnable", type: "bool", title: "Enable debug logging", defaultValue: true
		input name: "txtEnable", type: "bool", title: "Enable descriptionText logging", defaultValue: true
	
}

def logsOff(){
	log.warn "debug logging disabled..."
	device.updateSetting("logEnable",[value:"false",type:"bool"])
}

def updated(){
log.info "updated..."
	log.warn "debug logging is: ${logEnable == true}"
	log.warn "description logging is: ${txtEnable == true}"
	if (logEnable) runIn(1800,logsOff)
}

// parse events into attributes
def parse(String description) {
	//log.debug "Catch all: $description"
	if (logEnable) log.debug zigbee.parseDescriptionAsMap(description)

	def map = zigbee.parseDescriptionAsMap(description)
		if (description.endsWith("00 0000 05 00 00C3")) {
			// Start Turn clockwise
			if (txtEnable) log.info "Dimmer on"
			sendEvent(name: "switch", value: "on")
			
			// Start Turn clockwise
		} else if (description.endsWith("00 0000 01 00 01C3")) {
			if (txtEnable) log.info "Dimmer Off"
			sendEvent(name: "switch", value: "off")
	}
}
  

def off() {
	sendEvent(name: "switch", value: "off")
}

def on() {
	sendEvent(name: "switch", value: "on")
}


def refresh() {
	log.debug "Dimmer Refresh"
	zigbee.onOffRefresh() + zigbee.onOffConfig()
}

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

Hi all,

I don't suppose anyone got any further with the 5 button "Steering Wheel" did they?

I was in IKEA during the week and saw the device in person for the first time. Really neat.

Mark

Steering wheel is out, major platform changes required, we won't be supporting it.

Since you can't pair it to Hubitat, if you don't already know, you might be interested in the fact that if you're using a ZLL network like Hue (as opposed to having the bulbs directly paired to Hubitat, which I probably wouldn't do on a mixed Zigbee network with anything other than Sengled), you can pair it directly to your ZLL bulbs and still use it to manipulate them that way. On Hue, this does require you to leave "polling" enabled if you need the status changes to be reflected in Hubitat, and obviously it's not as flexible as having it paired to Hubitat where you could use it for anything like a regular button device, but...if you're planning on using it for smart bulb control anyway, it's a different way to achieve the same goal. :slight_smile:

My take is that trying to use the “puck” is pointless. No one having any real success getting them to work.

As a dimmer, no, I don't find them good at all.
As a switch, I find them quite handy. Updated the driver in post #33 above if you want it.

Thanks. I am trying to use it, but nothing seems to be active with it. I have tried setting up rules and also checked events. I am getting nothing.

I bought them last July at an IKEA, I am wondering if they changed something in manufacturing.