New Zigbee light switch

Are you after a button controller?
The in wall stuff is good, I like the Fibaro dimmer 2 as it's also a button controller (Well I can be). But I depends on what your trying to achieve, I prefer normal look switches that are smart.

Hi Borris,
Yep, I know Fibrao as they are from my country :wink: . Problem for me is that they was using z-wave in first 2 gateways and right now going into zigbee world, and I do not see devices from them that are using zigbee. Plus cost is x3 compared to tuya.

For me like for You ideal solution will be classic looking smart switch working fully in zigbee and not droping connections (I just started to read topic about unofficial xiaomi drivers).

I just love idea of having smart switch, not bulb.

1 Like

Hello All,
There is good news about these switches :slight_smile:
Probably we will get soon some info about communication details of this device

There is a ZigBee version from Sunricher but I doubt they produce a button event. It is just a dimmer with a input trigger. Aurora is planning a ZigBee input device but don't know time scale of that.

Just installed the 2 gang version, and got it to work out of the box with the Nue Zigbee Switch driver.

2 Likes

Amazing! Have you had any drop offs yet or has it maintained its connection?

The ones that drop off are further away from the hub and are used less. A Tradfri repeater does not seem to help. Not sure if the fact that the switch does not have a neutral line is a cause.

That's great since the Yagusmart is on Amazon UK.

So both gangs work fine with this driver?

Any downsides to this switch? Or any that would be better to buy that are easily available in the UK?

I also bought 2 switches from Lonsonho from Aliexpress. A wired zigbee no neutral 2-gang switch, and a wireless zigbee 3-gang switch.

I used the Generic zigbee switch drivers from this thread by @markus for the parent switches, and generic component switch for the child devices. The wired version was very easy. The wireless one was a bit fiddly.
I got a lot of info in the logs. On release the switches are switched off, but on press they're not switched on. I made a rule where each individual switch is switched on after going off. I also had to give the command in hubitat to switch them on the first time

Hey guys!

@arjen.wierda, @mmmaded were you able to get Yagusmart (X711 or X712 or X713) fully working?

I mean all the push, double-tap, hold, and release events work for you? Any downsides?

I did not test this, to be frank. I use them as normal light switches. They are connected to Hubitat so I can get Google to turn them on and off by voice.

I don't think this is available for these switches, as they are wired. Pressing a button just opens or closes the contact.

I also have this switch in wireless version. Both switches use the driver I referred to in my previous post as mother driver. Each button then gets a child driver which is a generic component switch. Pushing the button only toggles on or off, no other events.

This makes sense for the wired version but not for wireless :slight_smile:

Are you sure wireless buttons don't emitt these events or they are just not handled by the driver?

I don't seem to be able to ge this switch working with any drier like Nue or Generic Zigbee Switch.

This is the one I got but it's all the same: TuYa TS0001 control via MQTT | zigbee2mqtt.io

Do you have any suggestions how I can get this one working?

I know I am a little late to the game with this topic but my whole house has them, recently ported over from Smartthings into Hubitat and paired straight away. Had no issues since unlike occasional drop offs with Smartthings.

@mike.maxwell Hey Mike, I presume the EF00 cluster is still as unknown now as it was a year ago? I just bought a Tuya dimmer switch that is using that cluster and unable to find any existing drivers that work :slightly_frowning_face: The inClusters are: 0000,0004,0005,EF00

Afaik yes.

Hi,
This will work for Tuya 1 gang:

metadata {
definition (name: "MOES ZigBee Dimmer V.1.0 - Tuya 1gang", namespace: "CPS Smart Home", author: "Christos Psaroudis") {
    capability "Actuator"
    capability "PushableButton"

    capability "Configuration"
    capability "Refresh"
    capability "Sensor"
    capability "Switch"
    capability "Switch Level"

    fingerprint profileId: "0104", deviceId: "808F", inClusters: "0000,0004,0005,EF00", outClusters: "0019,000A", manufacturer: "_TZE200_9i9dt8is", model: "TS0601", deviceJoinName: "WorksWith Dimmer"
}

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:"#79b821", 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:"#79b821", nextState:"turningOff"
            attributeState "turningOff", label:'${name}', action:"switch.on", icon:"st.switches.light.off", backgroundColor:"#ffffff", nextState:"turningOn"
        }
        tileAttribute ("device.level", key: "SLIDER_CONTROL") {
            attributeState "level", action:"switch level.setLevel"
        }
    }
    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) {
Map map = [:]
//def event = zigbee.getEvent(description)

if (description?.startsWith('catchall:')) {
    log.debug description
    // call parseCatchAllMessage to parse the catchall message received
    map = parseCatchAllMessage(description)
    if (map != [:]) {
        log.debug "ok send event: $map.name $map.value"
        sendEvent(name: map.name, value: map.value)
    }
}
else {
    log.warn "DID NOT PARSE MESSAGE for description : $description"
}
}

def off() {
log.debug "called off"
zigbee.command(0xEF00, 0x0, "00010101000100")
}

def on() {
log.debug "called on"
zigbee.command(0xEF00, 0x0, "00010101000101")
}

def setLevel(value) {
log.debug "called setLevel with value $value"
if (value >= 0 && value <= 100) {
    //String commandValue = "0001020200040000" + zigbee.convertToHexString((value * 10) as Integer, 4)
    Map commandParams = [:]
    String commandPayload = "0001020200040000" + zigbee.convertToHexString((value * 10) as Integer, 4)
    zigbee.command(0xEF00, 0x0, commandPayload)
}
}

def refresh() {
log.debug "called refresh"
zigbee.command(0xEF00, 0x0, "00020100")
//pauseExecution(1000)
//zigbee.command(0xEF00, 0x0, "0002020200")
}

def configure() {
log.debug "Configuring Reporting and Bindings."
zigbee.onOffConfig() + zigbee.levelConfig() + zigbee.onOffRefresh() + zigbee.levelRefresh()
}



private Map parseCatchAllMessage(String description) {
// Create a map from the raw zigbee message to make parsing more intuitive
def msg = zigbee.parse(description)
Map result = [:]
switch(msg.clusterId) {
    case 0xEF00: 
        def attribute = getAttribute(msg.data)
        def value = getAttributeValue(msg.data)
        
        switch (attribute) {
            case "switch": 
                switch(value) {
                    case 0:
                        result = [
                            name: 'switch',
                            value: 'off',
                            data: [buttonNumber: 1],
                            descriptionText: "$device.displayName button was pressed",
                            isStateChange: true
                        ]
                    break;

                    case 1:
                        result = [
                            name: 'switch',
                            value: 'on',
                            data: [buttonNumber: 1],
                            descriptionText: "$device.displayName button was pressed",
                            isStateChange: true
                        ]
                    break;
                }
            
            break;
            
        }
    
    break;
}

return result
}

private String getAttribute(ArrayList _data) {
String retValue = ""
if (_data.size() >= 5) {
    if (_data[2] == 1 && _data[3] == 1 && _data[4] == 0) {
        retValue = "switch"
    }
    else if (_data[2] == 2 && _data[3] == 2 && _data[4] == 0) {
        retValue = "level"
    }
}

return retValue
}

private int getAttributeValue(ArrayList _data) {
int retValue = 0

if (_data.size() >= 6) {
    int dataLength = _data[5] as Integer
    int power = 1;
    for (i in dataLength..1) {
        retValue = retValue + power * _data[i+5]
        power = power * 256
    }
}

return retValue
}

The mystery box was in:

def off() {
log.debug "called off"
zigbee.command(0xEF00, 0x0, "00010101000100")
}

def on() {
log.debug "called on"
zigbee.command(0xEF00, 0x0, "00010101000101")
}

For 2 gang you need to use 00010201000100 and 00010201000101

2 Likes

How did you came up with those magic numbers? Is there any documentation on it?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.