Problem with editing predefined DTH


Firstly, sorry if the solution for this topic is published already - couldn’t find it.

I want to have few lighting groups, have them divided into rooms, and change the color temperature. So… I can’t use official Lighting Groups in this case (correct me if I’m wrong).

I came up with an idea to create simulated switch “helper” which params will be mirrored to specific bulbs. And I can distribute those helpers into rooms easly too.
I created new device with “Simulated White Color Temperature Bulb” type.
I used smart lighting to mirror on/off state + dimmer, but I couldn’t mirror colorTemperature… So I used webCoRE to handle this - it’s working now.

The problem:
The thing is that the colorTemperature slider range is not correct (I have IKEA tradfri bulbs with 2200-4000K range), and mentioned DTH produces:

  • 2000-6500 range in the new app
  • 2200-7000 in the old app

I came up with an idea to create my custom dth based on the official one:

I created new dth, tweaked some values, saved and published (for me), and then…

  • I can’t open the new device with this dth ONLY in the new app - “Can’t connect to the device. Check device and try again.”
  • I don’t see any values of new app config (2000-6500). Only (2200…7000) which is used in the old app

Does anyone know what’s going on here?

And one more thing, how to debug things like this? I couldn’t find any errors of incorrectly created dth/device/anything.

Thank you.

I did, but I don’t think that my problem is related to bulbs. It’s all about the “helper” device here.

Sorry, but we don’t understand each other.
I didn’t touch single bulbs device handlers. Physical, Ikea Bulbs states are being mirrored based on the helper simulated bulb state. And I need to modify this “helper” device handler (change colorTemperature slider range).

Do you get what I mean?

@Squidy try changing the definition to

definition (name: "Simulated White Color Temperature Bulb", namespace: "smartthings/testing", author: "SmartThings", ocfDeviceType: "oic.d.light", mnmn: "SmartThings", vid: "generic-color-temperature-bulb-2200K-4000K")

I didn’t actually get the “Can’t connect to the device” error when I opened a device using your DTH in the new app but I did confirm that when I created a new device using my suggested modification the range was shown as 2200 to 4000.

Weird, I can’t reproduce this error anymore…

Anyways, your suggested changes did the job. Thank you :slight_smile:

1 Like