Control US/CA 3A Smart ZigBee 3.0 Plug / Outlet with SmartThings

  1. Our company is based on Australia and have a factory in China.

  2. We just start selling on Amazon USA. Below is the item.

Thanks Mark. I have updated the instruction on your comments.

2 Likes

I just got mine and I get this error with your code.

Org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: script_dth_metadata_6001f5bb_69a7_4841_a55e_aee25291cc3d: 14: unexpected token: ZLL @ line 14, column 27. definition (name: “ZigBee ZLL Socket”, namespace: “smartthings”, author: “SmartThings”, ocfDeviceType: “oic.d.switch”) { ^ 1 error

any idea what i did wrong. Mind you I have been using Smartthings for nearly a year now and Im very familiar in putting in Device handlers ect. Since I have 2 ceiling fans and nearly every one of my switches set up with smart things. please help… Thanks

Hal

It is possible that your system has got a Device Handler with the name " ZigBee ZLL Socket" . I have rename the script name “3A Nue ZigBee ZLL Socket” and device type to “3A Nue ZigBee ZLL Socket” . Can you have a try again?

Org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: script_dth_metadata_67c3e844_1bd1_4284_9f75_6e9f92a65711: 21: unexpected token: ZLL @ line 21, column 27. definition (name: “ZigBee ZLL Socket”, namespace: “smartthings”, author: “SmartThings”, ocfDeviceType: “oic.d.switch”) { ^ 1 error

Please remove the previous code and copy and paste the code below.

/** Please copy the Device Handler from this line

  • Copyright 2015 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 from 3A Smart Home on 23/05/2018

*/

metadata {
definition (name: “3A Nue ZigBee ZLL Socket”, namespace: “smartthings”, author: “SmartThings”) {
capability “Actuator”
capability “Configuration”
capability “Refresh”
capability “Switch”
capability “Health Check”

    fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006"
    fingerprint profileId: "0104", inClusters: "0000, 0003, 0006", outClusters: "0003, 0006, 0019, 0406", manufacturer: "Leviton", model: "ZSS-10", deviceJoinName: "Leviton Switch"
    fingerprint profileId: "0104", inClusters: "0000, 0003, 0006", outClusters: "000A", manufacturer: "HAI", model: "65A21-1", deviceJoinName: "Leviton Wireless Load Control Module-30amp"
    fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006", outClusters: "0003, 0006, 0008, 0019, 0406", manufacturer: "Leviton", model: "DL15A", deviceJoinName: "Leviton Lumina RF Plug-In Appliance Module"
    fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006", outClusters: "0003, 0006, 0008, 0019, 0406", manufacturer: "Leviton", model: "DL15S", deviceJoinName: "Leviton Lumina RF Switch"
    fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006", outClusters: "0003, 0006, 0008, 0019, 0406", manufacturer: "Feibit Inc co.", model: "FB56+ZSW1GKJ1.7", deviceJoinName: "Nue ZigBee Switch"
    fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006", outClusters: "0003, 0006, 0008, 0019, 0406", manufacturer: "Feibit Inc co.", model: "FNB56-SKT19FB1.2", deviceJoinName: "Nue ZigBee Socket"
}

// simulator metadata
simulator {
    // status messages
    status "on": "on/off: 1"
    status "off": "on/off: 0"

    // reply messages
    reply "zcl on-off on": "on/off: 1"
    reply "zcl on-off off": "on/off: 0"
}

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.switches.light.on", backgroundColor:"#00A0DC", nextState:"turningOff"
            attributeState "off", label:'${name}', action:"switch.on", icon:"st.switches.light.off", backgroundColor:"#ffffff", nextState:"turningOn"
            attributeState "turningOn", label:'${name}', action:"switch.off", icon:"st.switches.light.on", backgroundColor:"#00A0DC", nextState:"turningOff"
            attributeState "turningOff", label:'${name}', action:"switch.on", icon:"st.switches.light.off", backgroundColor:"#ffffff", nextState:"turningOn"
        }
    }
    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", "refresh"])
}

}

// Parse incoming device messages to generate events
def parse(String description) {
log.debug “description is $description”
def event = zigbee.getEvent(description)
if (event) {
sendEvent(event)
}
else {
log.warn “DID NOT PARSE MESSAGE for description : $description”
log.debug zigbee.parseDescriptionAsMap(description)
}
}

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

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

/**

  • PING is used by Device-Watch in attempt to reach the Device
  • */
    def ping() {
    return refresh()
    }

def refresh() {
zigbee.onOffRefresh() + zigbee.onOffConfig()
}

def configure() {
// Device-Watch allows 2 check-in misses from device + ping (plus 2 min lag time)
sendEvent(name: “checkInterval”, value: 2 * 10 * 60 + 2 * 60, displayed: false, data: [protocol: “zigbee”, hubHardwareId: device.hub.hardwareID])
log.debug “Configuring Reporting and Bindings.”
zigbee.onOffRefresh() + zigbee.onOffConfig()
}

//Please copy the Device Handler end this line

Error this one caused. im digging into my device handlers to find conflict

Org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: script_dth_metadata_d2cd05bd_1083_4389_b4dc_9c6c4bc94292: 14: unexpected token: Nue @ line 14, column 23. definition (name: “3A Nue ZigBee ZLL Socket”, namespace: “smartthings”, author: “SmartThings”) { ^ 1 error

and furthermore thanks for being cool and helpful… I really like this outlet just want to see what it can do :slight_smile:

Didnt find the Zigbee ZLL
Here are all my Device handlers I currently Use.

a4refillpad : Xiaomi Aqara Temperature Humidity Sensor
a4refillpad : Xiaomi Door/Window Sensor
a4refillpad : Xiaomi Motion Sensor
a4refillpad : Xiaomi Temperature Humidity Sensor
a4refillpad : Xiaomi Zigbee Button
a4refillpad : Xiaomi Zigbee Outlet
Aqara Wall Switch Binder 1.1
bspranger : Xiaomi Aqara Temperature Humidity Sensor bspranger
bspranger : xiaomi-zigbee-button bspranger
dcoffing : KOF Zigbee Fan Controller
dcoffing : KOF Zigbee Fan Controller - Fan Speed Child Device
dcoffing : KOF Zigbee Fan Controller - Light Child Device
erocm123 : Enerwave RSM2 Dual Relay Switch
erocm123 : Simulated Dimmer
erocm123 : Simulated Energy Switch
erocm123 : Simulated Switch
pstuart : Generic Video Camera
schwark : Alarm.com Switch
simic : Aqara 2 Button Wired Wall Switch
simic : Aqara 2 Button Wired Wall Switch1.1
skp19 : Foscam Universal Device
skp19 : Foscam Universal Device
terk : Xiaomi Zigbee Aqara Button AQ2
uncleskippy : HI3510 IP Camera Device
Z-Wave.me : Secure Wall Controllers & Key Fobs (Z-Wave.me, Popp & Devolo)

Update When I tried to change the type on the device… It showed up a group
of ZLL devices… I do not recognize them as they are mostly for RGB bulbs

You need to create a new device handler by copying the code from this topic.

I have tried to make a new Device handler with your 2 codes. And it gave me those errors and would not let me save. I did find All Devices and I tried the ZLL RGB Bulb device handler and it works now…

Thanks for letting me know. I will try it as well.

cool… Hopefully you can come up with a stable one or one of the stock ones work :slight_smile:

I just bought these, and similarly, the code above gave the same exact errors when trying to “save”.

However the basic “ZigBee Switch” worked just fine.

Thanks for letting me know. It is very strange for clients always getting err when copying and pasting the code from SmartThings Community.

Please just select the Type-ZigBee Switch. If not working, just send a msg to 3aSmartHome@gmail for a copy of the Device Handler.

That worked for me thank you… Knowing this now I think I Will be buying a few more in the near future :slight_smile: Gotta get ready for the christmas tree :slight_smile:

Is the Nue Smart Plug (AU/CA/US version) a zigbee repeater for Smartthings as well? If it can be a repeater, I will get a few to extend the network.

Yes, it will works as a ZigBee repeater as well.

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.