sidjohn1
(sidjohn1)
June 12, 2020, 2:31am
8
The public code for that DTH is on github:
/**
* Copyright 2017 SmartThings
*
* 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.
*
*/
import physicalgraph.zigbee.zcl.DataType
metadata {
definition (name: "ZLL RGB Bulb", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.light", runLocally: true, minHubCoreVersion: '000.025.00000', executeCommandsLocally: true, genericHandler: "ZLL") {
capability "Actuator"
capability "Color Control"
This file has been truncated. show original
Near the bottom, it looks like some code to fiquire out the safe color range. Considering there is some rounding involved it is very possible the bulb is dimmer either by design or maybe a rounding error or firmware bug when attached to Smartthings.
You can try this DTH to see if the bulb performs as expected
/**
* Copyright 2017 Pedro Garcia
*
* 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.
*
* IKEA Trådfri RGB Bulb
*
* Color management is not trivial. IKEA bulbs are using CIE XY color scheme instead of Hue/Saturation. Also the
* bulbs do not seem to be able to output "light cyan" color. Maybe it is my fault for not having being able to
* identify the correct color scheme (currently assuming sRGB with gamma correction), but cannot either with the
* IKEA remote pairing...
*
* This handler is written so that it reports any change in the bulb state (on/off, brightness, color) as an event
This file has been truncated. show original
This should get you rocking
I’m loving the new “From Code” and “From Template” options when creating a new SmartApp / DeviceType.
Users don’t have to be instructed to fill out bogus information and then replace the resulting code with code anymore.
The new instructions are:
Login at http://graph.api.smartthings.com
Go to “My SmartApps” or “My DeviceTypes” and click on the “+ New SmartApp” or " + New SmartDevice" button on the right.
On the “New SmartApp” or “New SmartDevice” page, Select the Tab “From Code” , Copy the xxxxx source code from GitHub and paste it into the IDE editor window.
Click the “Create” button at the bottom.
Click the blue “Save” button above the editor window.
Click the “Publish” button next to it and select “For Me”. You have now self-published your SmartApp or SmartDevice.
Open SmartThing…