Instruction and Device Handler for SmartThings Hub controlling Nue ZigBee In-Ceiling Light Controller

Nue in-ceiling Light Controller can be controlled through SmartThings Hub with following settings.

  1. Wiring and power on the Nue ZigBee in-ceiling light controller. If the led is not in Red colour, press the reset button about 5 seconds until the led turning to red to reset the zigbee light controller.
  2. Log in to SmartThings Developer Tools https://account.smartthings.com
  3. Click Locations. Then in the table select the (hub name). Then click on the “Hubs . (hub name)”
    Ensure Zigbee: “OTA enabled for all non-light devices” and “Unsecure rejoin: true”. If this is not the case click “View Utilities” and edit ZigBee Utilities appropriately.
  4. Create a device handler by clicking on My Device Handlers and on the next page the +Create New Device Handler button. On the next page click on tab From code. Paste the code below. Then click the Save button. Then click the Publish button. Select For me.

/** Please cope 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.

*/

metadata {
definition (name: “Nue ZigBee 1 Gang Switch”, namespace: “smartthings”, author: “SmartThings”, ocfDeviceType: “oic.d.switch”) {
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: "FB56+ZSW05HG1.2", deviceJoinName: "Nue ZigBee Light Controller"
}

// 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 =“10”
zigbee.off()
}

def on() {
device.endpointId =“10”
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 cope the device handler end this line

  1. Open Smartthings Classic App on your phone and Add a Thing to searching for the ZigBee light controller. You will see the light controller is found and added in as a “Thing”. If not device ( Nue Zigbee light controller) is found, go to step 7

6 Edit the device “Thing” from from the SmartThings Developers Tool on your computer with Name : kitchen light or what you want – Type: Nue ZigBee 1 gang Switch – Version: Self-Published. Then click on Update button and go to Step 8.

  1. click My Locations from the SmartThings Developers Tool on your computer. Then Click events. Then click all to Check the Events in step 5. look for recent zb_join events. Click on the date / time to the left of the zigbee_join event and view details. Eg: zbjoin{“dni”:“9CF0”,“d”:“00124B000AE76565”,“capabilities”:“8E”,“endpoints”:[{“simple”:“10 0104 0002 00 04 0000 0005 0004 0006 010000”,“application”:"",“manufacturer”:“Feibit Inc co.”,“model”:“FB56+ZSW05HG1.2”

Create a device in SmartThings by clicking on My Devices and then +New Device button (right upper) to create a new device.
Fill as below: Eg:[Name: , Label: , Zigbee Id: the “d” value on the zbjoin msg, i.e. 00124B000AE76565 from the above event, Device Network Id: the “dni” value on the zbjoin msg, i.e. 9CF0 above. For type select "Nue ZigBee 1 Gang Switch. Version: Self-Published. Please select your location and hub. The click on the create button.

  1. Go back your mobile phone and open the SmartThings APP to control the Nue ZigBee in-ceiling light controller.

Note: This zigbee light controller can be purchased from link below.

I mentioned this in another one of your recent posts, but this link will not work for all ST users.

The correct link is https://account.smartthings.com.

This thread explains ST cloud shards:

Thanks. I have updated it with https://account.smartthings.com .

3 Likes

Can you explain to me how this device works exactly? It says that it allows you to control your lights from the HA system and with “normal switches”. It says that you have to install it before the first light, like in the attached diagram.

But how does this unit have power if the switch is off? I don’t understand how it would even have any more since the only power it gets is when the switch is turned on. Otherwise the hot wire has no electricity and no flow, hence why the lights are off.

Just like philips hue bulbs, you can control it only when the wall switch is ON. For this smart light controller, you need to keep the wall switch ON, then you can use APP or Google Home, Alexa voice control or ON/OFF as the automation setting.

In addition, you can still manually turn ON / OFF the lights by using the wall switch. For example, when the light is turned off through APP, you can turn on the light by turning the wall switch OFF, waiting about 2-3 seconds, then turning the wall switch ON to turn on the light.

Hmm, if I’m going to go through the trouble of wiring a device in the ceiling, I’d want to maintain actual control of the lights at the wall switches. Like with an aeotec micro/nano switch. What you’re describing just sounds kind of annoying.

1 Like

Exactly my point. This is the exact same affect that having smart bulbs in the socket. Also, you could accomplish the same thing with a $5 sonoff basic.

1 Like

I’m not that familiar with the sonoff basic device. It looks like it needs a neutral wire?

This device supposedly doesn’t. And I guess it could save some money vs. replacing several dumb bulbs on a circuit with smart bulbs.

But overall it seems like more of a hassle than it’s worth to install, given that you can’t continue to use the light switches in the customary way.

In my house, that would knock down the WAF significantly, which is the kiss of death for any smart device.

It absolutely need a neutral wire. Look at the diagram.

Yes I see that. I may have misunderstood their response to this question on amazon.

Thinking about it some more, I suppose they meant it needs a neutral wire either in the switch box or in the ceiling (where it would have to be if it’s not in the switch box).

In that case, it really doesn’t seem to be a very useful device.

  1. In the front of lights, the neutral wire has to be there, otherwise the lights will not work. The issue with neutral wire not available only exists with the wall switch. As a result, we provide a solution for existing wall switch does not have neutral wire available. In this case, you do not need to replace the existing switch (when neutral wire not available), but add a smart light controller in the front of the lights.

  2. The cheap sonoff one is wifi product. It is completely different from a ZigBee switch.

The switch does require a neutral wire. Whether that wire is the neutral for the light or the neutral for the switch, it is still a neutral wire. The diagram shows it is connected to neutral wire in both wiring diagrams. And yes, this is zigbee. However, I feel it is deceptive to say that it works with wired switches. Resetting the controller is not controlling it. For example, if you turn the lights off by the switch, you cannot turn them on again through ST. Other products do offer wired switch control.

I think this is the most important point that limits the attractiveness of your product. I don’t have neutral wires in my switch boxes, so this is quite relevant for me. As I mentioned above, if I’m going to go through the trouble of wiring something in a ceiling light fixture box, why would I choose a product that doesn’t fully work with the physical light switches, when your competitors make products that can do that?

1 Like

I agree with you that it would be perfect if you can have a product that doesn’t fully work with the physical light switches. Yes, a smart light is the solution. If there is only 1 light in the loop of the switch, choose a smart light (with the switch inside the light) is a better choose. When the loop has multiple lights, i.e. 6 or more lights, install a controller in the front of the 1st light to control all these lights should be much better…

Hi,
Is it possible to provide Device Handler for the wall switch 1 gang?

Sure, Please check the attached file for it.

Regards,

Kevin

I would like to get the same Device Handler for smart light controller HGZB-01A. I cannot copy/paste it from any of the emails or sites I have found it on. It keeps reformatting the text and making the code unusable.

You should be able to pair the device and use the Zigbee switch native device type.

Problem I am actually having is that SmartThings app doesn’t see the switch natively. If I go to add it manually there isn’t an option for selecting Nue or a Generic Zigbee Switch. There is Leviton or GE products that I can select and it will pair/connect to it, but then if I attempt to do anything with it I get a message that it can’t connect to device. I have validated that my hub is set with OTA: Enabled for non-light devices and Unsecure rejoin is set to true. Not sure where to go from here.

What do you mean it doesn’t see it natively? Try resetting the device and then repairing. Even if ST doesn’t what dth to use it will still pair.