edvaldeysteinsson / IKEA-Tradfri

IKEA Trådfri device type handler for SmartThings
64 stars 153 forks source link

Tradfri GU 10 spot are not recognised #2

Closed DutchmanII closed 6 years ago

DutchmanII commented 6 years ago

Spot 1 | Thing | Thuis | Thuis Hub | 000B57FFFEAFCF | 4F63 | INACTIVE | Cloud | a day ago model: TRADFRI bulb GU10 W 400lm application: 11 manufacturer: IKEA of Sweden endpointId: 01

Hello, i have 3 of theose spotlights. i managed to install them but they are not recognised as a buld but seen as a "thing". Can you help me out?

Compliments foor doing a great job! al my Tradfri bulbs are working fine!

best Regards,

Kees Odenkirchen Netherlands

ironwaffle commented 6 years ago

Kees,

Okay. Below the dashes is my original post asking if you had any luck. Well, I just did. I went into the "MyDevices" tab and selected the "Show Device" page for this bulb. On that page I noticed that the installation defaulted to the wrong TYPE. I selected "Edit" and when I changed that type to ZigBee White Color Temperature Bulb and saved... voila. Works perfectly. By now you've probably either solved it or maybe given up. Maybe others, too.


Have you -- or others -- had any luck? I just installed my first Tradfi bulb (a GU10 400 Im) and encountered the same issue. If it can be worked out then I'll be installing at least 11 more of these (not to mention 3 E12s and perhaps some others down the road). If not... hm... I'd rather be optimistic!

[Edit to add: It HAS appeared in the app, but it just says "PLEASE WAIT" and has made no progress. In My Devices online it's listed as a "THING" -- lots of technical info on that page but no "states" or action-oriented info.]

I'm new to this and simply followed the directions at the link below. I'm 95% certain I executed everything as instructed but, like you, don't see Tradfi in the app.

https://smarterhomelife.com/everything/2017/8/11/pairing-ikea-tradfri-smart-lights-with-smartthings-how-to

edvaldeysteinsson commented 6 years ago

@DutchmanII can you give me the "Raw Description"? it might be that it has another one than the one i have added already. Also, is the model name you specified correct? "TRADFRI bulb GU10 W 400lm" the one i have tried before has "TRADFRI bulb GU10 WS 400lm" and is it a colour temperature bulb? not a white dimmable only?

DutchmanII commented 6 years ago

Hi there,

Sorry for the late respons: i was a while away.... I think it's only dimmable

here the raw code

/**

// parse events into attributes def parse_new(description) { def results = []

def map = description if (description instanceof String) { map = stringToMap(description) }

if (map?.name && map?.value) { results << createEvent(name: "${map?.name}", value: "${map?.value}") }

results }

// Parse incoming device messages to generate events def parse(String description) { def event = zigbee.getEvent(description)

if (event) { if (event.name != "level" || (event.name=="level" && event.value > 0)) { if (event.name=="colorTemperature") { setColorName(event.value) } sendEvent(event) } } else { def cluster = zigbee.parse(description)

if (cluster && cluster.clusterId == 0x0006 && cluster.command == 0x07) {
  if (cluster.data[0] == 0x00) {
    sendEvent(name: "checkInterval", value: 60 * 12, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
  } else {
    log.warn "ON/OFF REPORTING CONFIG FAILED- error code:${cluster.data[0]}"
  }
} else {
  log.warn "DID NOT PARSE MESSAGE for description : $description"
  log.debug "${cluster}"
}

} }

def off() { zigbee.off() }

def on() { zigbee.on() }

def setLevel(value) { // In case the level is 0 we dont want to do anything with the color temperature if(value == 0){ zigbee.setLevel(value) } else { if(linkLevelAndColor ?: false){ def colorTempMin = colorTempMin ?: 2200; def colorTempMax = colorTempMax ?: 3200; def stepSize = (colorTempMax - colorTempMin) / 99; int colorTemperature = Math.ceil((colorTempMin - stepSize) + (stepSize*value));

  // this will set the color temperature based on the level, default color temperatures are
  // 2200(1%) to 3200(100%) but they can be set in preferences.
  // This is a bit more like how a traditional bulb behaves, it will turn warmer at lower levels.
  // There is nothing preventing a user from doing the opposite, 4000 at 1% and 2200 at 100% if
  // they feel like it.
  delayBetween([
    zigbee.setLevel(value),
    zigbee.setColorTemperature(colorTemperature)
  ], delay ?: 0)
} else {
  zigbee.setLevel(value)
}

} }

def setColorRelax() { setColorTemperature(2200) }

def setColorEveryday() { setColorTemperature(2700) }

def setColorFocus() { setColorTemperature(4000) }

def setColorTemperature(value) { // This is added here just in case something calls this with a value that is out of range for the bulbs if(value > 4000){ value = 4000; } else if(value < 2200){ value = 2200; }

setColorName(value) zigbee.setColorTemperature(value) }

def setColorName(value){ state.colourTemperature = value

if(colorNameAsKelvin ?: false){ sendEvent(name: "colorName", value: "${value} K" ) } else { if (value != null) { def genericName

  if (value < 2450) {
    genericName = "Relax" // 2200 is named Relax by IKEA so i use that for 2200-2449
  } else if (value < 2950) {
    genericName = "Everyday" // 2700 is named Everyday by IKEA so i use that for 2450-2949
  } else if (value <= 4000) {
    genericName = "Focus" // 4000 is named Focus by IKEA so i use that for 2950-4000
  }

  sendEvent(name: "colorName", value: genericName)
}

} }

def nextColor() { if(state.colourTemperature < 2450) { setColorEveryday() } else if (state.colourTemperature < 2950) { setColorFocus() } else { setColorRelax() } }

/**

def refresh() { zigbee.onOffRefresh() + zigbee.levelRefresh() + zigbee.colorTemperatureRefresh() + zigbee.onOffConfig(0, 300) + zigbee.levelConfig() + zigbee.colorTemperatureConfig() }

def configure() { // Device-Watch allows 2 check-in misses from device + ping (plus 1 min lag time) // enrolls with default periodic reporting until newer 5 min interval is confirmed sendEvent(name: "checkInterval", value: 2 10 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])

// OnOff minReportTime 0 seconds, maxReportTime 5 min. Reporting interval if no activity refresh() }

def installed() { if ((device.currentState("level")?.value == null) || (device.currentState("level")?.value == 0)) { sendEvent(name: "level", value: 100) } }

edvaldeysteinsson commented 6 years ago

Sorry for the late reply but i don't need the source code, i need the raw description for the bulb from the Smartthings IDE, go to https://graph.api.smartthings.com/location/list and select your smarthub from and then go to the "My devices" list. Select the bulb and copy the "Raw description", it should look something like this "01 C05E 0220 02 09 0000 0003 0004 0005 0006 0008 0300 0B05 1000 04 0005 0019 0020 1000", also while you're at it, copy everything under "Data" also

edvaldeysteinsson commented 6 years ago

closing this due to inactivity