[OBSOLETE] 3A Nue RGBW strip controller with normal RGBW led strip lights: Manufacturer’s DTH

/** Please copy the Device Handler from this line

  • Copyright 2016 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.
  • Updated by Kevin X- 3A Smart Home on 1st Jun 2018

*/

metadata {
definition (name: “3A NUE ZigBee RGBW Light”, namespace: “smartthings”, author: “Kevin X- 3A Smart Home”) {

    capability "Actuator"
    capability "Color Control"
    capability "Color Temperature"
    capability "Configuration"
    capability "Polling"
    capability "Refresh"
    capability "Switch"
    capability "Switch Level"

    fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300", outClusters: "0019"
    fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 1000", outClusters: "0019"
    fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 1000", outClusters: "0019", "manufacturer":"3A Feibit", "model":"RGBW Light", deviceJoinName: "3A-Feibit RGBW Light"
}

// UI tile definitions
tiles(scale: 2) {
    multiAttributeTile(name:"switch", type: "lighting", width: 6, height: 4, canChangeIcon: true){
        tileAttribute ("device.switch", key: "PRIMARY_CONTROL") {
            attributeState "on", label:'${name}', action:"switch.off", icon:"st.lights.philips.hue-single", backgroundColor:"#79b821", nextState:"turningOff"
            attributeState "off", label:'${name}', action:"switch.on", icon:"st.lights.philips.hue-single", backgroundColor:"#ffffff", nextState:"turningOn"
            attributeState "turningOn", label:'${name}', action:"switch.off", icon:"st.lights.philips.hue-single", backgroundColor:"#79b821", nextState:"turningOff"
            attributeState "turningOff", label:'${name}', action:"switch.on", icon:"st.lights.philips.hue-single", backgroundColor:"#ffffff", nextState:"turningOn"
        }
       tileAttribute ("device.level", key: "SLIDER_CONTROL") {
       attributeState "level", action:"switch level.setLevel"
       }
        tileAttribute ("device.color", key: "COLOR_CONTROL") {
            attributeState "color", action:"color control.setColor"
        }
    }
    controlTile("colorTempSliderControl", "device.colorTemperature", "slider", width: 4, height: 2, inactiveLabel: false, range:"(2700..6500)") {
        state "colorTemperature", action:"color temperature.setColorTemperature"
    }
    valueTile("colorTemp", "device.colorTemperature", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
        state "colorTemperature", label: '${currentValue} K'
    }
    standardTile("refresh", "device.refresh", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
        state "default", label:"", action:"refresh.refresh", icon:"st.secondary.refresh"
    }

    main(["switch"])
    details(["switch", "colorTempSliderControl", "colorTemp", "refresh"])
}

}

//Globals
private getATTRIBUTE_HUE() { 0x0000 }
private getATTRIBUTE_SATURATION() { 0x0001 }
private getHUE_COMMAND() { 0x00 }
private getSATURATION_COMMAND() { 0x03 }
private getCOLOR_CONTROL_CLUSTER() { 0x0300 }
private getATTRIBUTE_COLOR_TEMPERATURE() { 0x0007 }

// Parse incoming device messages to generate events
def parse(String description) {
log.debug “description is $description”

def finalResult = zigbee.getEvent(description)
if (finalResult) {
    log.debug finalResult
    sendEvent(finalResult)
}
else {
    def zigbeeMap = zigbee.parseDescriptionAsMap(description)
    log.trace "zigbeeMap : $zigbeeMap"

    if (zigbeeMap?.clusterInt == COLOR_CONTROL_CLUSTER) {
        if(zigbeeMap.attrInt == ATTRIBUTE_HUE){  //Hue Attribute
            def hueValue = Math.round(zigbee.convertHexToInt(zigbeeMap.value) / 255 * 360)
            sendEvent(name: "hue", value: hueValue, displayed:false)
        }
        else if(zigbeeMap.attrInt == ATTRIBUTE_SATURATION){ //Saturation Attribute
            def saturationValue = Math.round(zigbee.convertHexToInt(zigbeeMap.value) / 255 * 100)
            sendEvent(name: "saturation", value: saturationValue, displayed:false)
        }
    }
    else {
        log.info "DID NOT PARSE MESSAGE for description : $description"
    }
}

}

def on() {
device.endpointId =“0B”
zigbee.on()
}

def off() {
device.endpointId =“0B”
zigbee.off() //+ [“delay 20”] + zigbee.onOffRefresh()
}

def refresh() {
refreshAttributes() + configureAttributes()
}

def poll() {
refreshAttributes()
}

def configure() {
log.debug “Configuring Reporting and Bindings.”
configureAttributes() + refreshAttributes()
setColor(5000)
}

def configureAttributes() {
zigbee.onOffConfig() + zigbee.levelConfig() + zigbee.colorTemperatureConfig() + zigbee.configureReporting(COLOR_CONTROL_CLUSTER, ATTRIBUTE_HUE, 0x20, 1, 3600, 0x01) + zigbee.configureReporting(COLOR_CONTROL_CLUSTER, ATTRIBUTE_SATURATION, 0x20, 1, 3600, 0x01)
}

def refreshAttributes() {
zigbee.onOffRefresh() + zigbee.levelRefresh() + zigbee.colorTemperatureRefresh() + zigbee.readAttribute(0x0300, 0x00) + zigbee.readAttribute(0x0300, ATTRIBUTE_HUE) + zigbee.readAttribute(0x0300, ATTRIBUTE_SATURATION)
}

def setColorTemperature(value) {
device.endpointId =“0B”
zigbee.setColorTemperature(value) + [“delay 10”] + zigbee.colorTemperatureRefresh()
}

def setLevel(value) {
device.endpointId = “0B”
def additionalCmds = []
additionalCmds = refresh()
def hexConvertedValue = zigbee.convertToHexString((value/100) * 255)
zigbee.command(0x0008, 0x00, hexConvertedValue, “0000”) + additionalCmds
}
/*def setLevel(value) {
device.endpointId =“0B”
zigbee.setLevel(value) + [“delay 100”] + zigbee.levelRefresh()
}
*/
def setColor(value){
log.trace “setColor($value)”
device.endpointId =“0B”
zigbee.on() + setHue(value.hue) + [“delay 100”] + setSaturation(value.saturation) + [“delay 100”]+ refreshAttributes()
}

def setHue(value) {
def scaledHueValue = zigbee.convertToHexString(Math.round(value * 0xfe / 100.0), 2)
device.endpointId =“0B”
zigbee.command(COLOR_CONTROL_CLUSTER, HUE_COMMAND, scaledHueValue, “00”, “0100”)
}

def setSaturation(value) {
def scaledSatValue = zigbee.convertToHexString(Math.round(value * 0xfe / 100.0), 2)
device.endpointId =“0B”
zigbee.command(COLOR_CONTROL_CLUSTER, SATURATION_COMMAND, scaledSatValue, “0100”)
}

// Please copy the device handler end of this line

Please check your email for it.

Yes I got it! well done …Thank you very muchSir! for all your hard work on this, it’s greatly appreciated.

Hi and thanks for your work on this device handler. I’m hoping you could sent me thr code, I’m getting the following error when copy and pasting into the create new handler window.

xOrg.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: script_dth_metadata_f3735cda_4a9b_4a27_91b6_86f00a0c43c1: 14: unexpected token: NUE @ line 14, column 23. definition (name: “3A NUE ZigBee RGBW Light”, namespace: “smartthings”, author: “Kevin X- 3A Smart Home”) { ^ 1 error

Thanks
larryslutzky@gmail.com

Hi Larry,

Please have a look the attached file for the script.

Regards,

Kevin

Hi Kevin, Not seeing attachment , can you send again.

THanks

lslutzky https://community.smartthings.com/u/lslutzky Larry
https://community.smartthings.com/u/lslutzky
July 19

Hi Kevin, Not seeing attachment , can you send again.

THanks

Visit Topic
https://community.smartthings.com/t/using-smartthings-hub-support-3a-nue-rgbw-strip-controller-with-normal-rgbw-led-strip-lights/127648/24
or reply to this email to respond.

In Reply To
3asmarthome https://community.smartthings.com/u/3asmarthome
July 19
Hi Larry, Please have a look the attached file for the script. Regards,
Kevin

Visit Topic
https://community.smartthings.com/t/using-smartthings-hub-support-3a-nue-rgbw-strip-controller-with-normal-rgbw-led-strip-lights/127648/24
or reply to this email to respond.

To unsubscribe from these emails, click here
https://community.smartthings.com/email/unsubscribe/73fc99d00b6c39d1a0aa980a2f55c9c2c271920687e620a91b07a3ea55eee3dd
.

Please tell me your email address for it.

larryslutzky@gmail.com

I receive this message pasting code

Org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: script_dth_metadata_46425448_9765_4b1b_a160_f7ba7511ec2f: 14: unexpected token: NUE @ line 14, column 23. definition (name: “3A NUE ZigBee RGBW Light”, namespace: “smartthings”, author: “Kevin X- 3A Smart Home”) { ^ 1 error

Please tell me your email address so that I can email it to you.

littleninemile@gmail.com

Still need update by email please- littleninemile@gmail.com

Hi Kevin,

I’ve installed the device handler and Smarthings hub has found the switch as “Thing” but no controls are available…

Any advice on getting it running?

Thanks,

Larry

Thing Device

Name
Thing
Label
Type
Unknown
Version
Published
Zigbee Id
00124B0018541F5E
Device Network Id
E130
Status
ACTIVE
Hub
Bent Tree Hub
Last Activity At
2018-07-26 1:32 AM EDT
Date Created
2018-07-26 1:32 AM EDT
Last Updated
2018-07-26 1:32 AM EDT
Data

  • model:
  • application:
  • manufacturer:
  • endpointId: 0D
    Raw Description
    0D C05E E15E 02 01 1000 01 1000
    Firmware
    Check Now
    Current States
    No states found
    Execution Location
    Cloud
    Events
    List Events
    In Use By

Hi Larry,

  1. Please tell me your email so that i can send you the device handler .

  2. Edit the device “Thing” from API
    – Name : 3A Strip Light
    – Type: 3A Nue ZigBee RGBW Light
    – Version: Self-Published

  3. Go back your mobile phone and open the SmartThings APP to control the smart 3A Strip Light. The initiate default setting is to turn ON the W (white channel) only. If you are using a RGB strip light or some brand of RGBW strip lights, you will not see the lights ON as you click the ON /OFF button until you click the strip light name and open the colour selection panel and choose a colour. Then the ON /OFF button will work normally.

Great, its working…Thanks

3asmarthome,

Do you have a link to this script on GitHub?

Thank you.

Sorry, not yet so far. I can directly email it to you if you need it.

Hi, I’m unable to get the code to work from the community post either. Do you mind sending a copy to me? Thanks!

EMail:
mike@murphync.net