Aqara 2 Gang Switch No Neutral not working

Hi,

I have just setup one one of the Xiaomi Aqara Wired Switch No Neutral. I managed to pair it with my hubitat, but I cannot trigger the switch, some errors show up:

[app:1] [error]java.lang.IllegalArgumentException: Command 'off' is not supported by device. on line 527 (dashboardCmd)

[app:1] [error] java.lang.IllegalArgumentException: Command 'off' is not supported by device. on line 527 (dashboardCmd)

[dev:263] [debug]catchall: 0000 0013 00 00 0040 00 D751 00 00 0000 00 00 CD51D732675E04008D150084

[dev:263] [debug]catchall: 0104 000A 01 01 0040 00 D751 00 00 0000 00 00 0000

[dev:263][error]com.hubitat.app.exception.UnknownDeviceTypeException: Device type 'Generic Child Switch' in namespace 'guyee' not found on line 421 (recreateChildDevices)

[dev:263] [debug]createChildDevices

[dev:263] [debug]deleteChildren

[dev:263] [debug]recreateChildDevices

[dev:263] [debug]catchall: 0104 000A 01 01 0040 00 D751 00 00 0000 00 00 0000

[dev:263] [error]java.lang.NullPointerException: Cannot invoke method split() on null object on line 435 (childRefresh)

[dev:263] [error]java.lang.NullPointerException: Cannot invoke method split() on null object on line 435 (childOff)

[dev:263] [debug]catchall: 0104 000A 01 01 0040 00 D751 00 00 0000 00 00 0000

[dev:263] [debug]catchall: 0104 0000 01 01 0040 00 D751 00 01 115F 04 01 00

[dev:263] [debug]catchall: 0104 0000 01 01 0040 00 D751 00 01 115F 04 01 00

[dev:263] [warn]configure...

[dev:263] [error]com.hubitat.app.exception.UnknownDeviceTypeException: Device type 'Generic Child Switch' in namespace 'guyee' not found on line 421 (updated)

[dev:263] [debug]createChildDevices

[dev:263] [warn]description logging is: true

[dev:263] [warn]debug logging is: true

I also get an error when I press the buttons:

[dev:263] [debug]catchall: 0104 000A 01 01 0040 00 D751 00 00 0000 00 00 0000

[dev:263] [debug]read attr - raw: D751050006100000100000001001, dni: D751, endpoint: 05, cluster: 0006, size: 10, attrId: 0000, encoding: 10, command: 0A, value: 0000001001

[dev:263] [error]java.lang.NullPointerException: Cannot invoke method sendEvent() on null object on line 88 (parse)

[dev:263] [debug]read attr - raw: D751030006160000100000F0230051D703, dni: D751, endpoint: 03, cluster: 0006, size: 16, attrId: 0000, encoding: 10, command: 0A, value: 0000F0230051D703

[dev:263] [debug]read attr - raw: D751050006100000100000001001, dni: D751, endpoint: 05, cluster: 0006, size: 10, attrId: 0000, encoding: 10, command: 0A, value: 0000001001

[dev:263] [error]java.lang.NullPointerException: Cannot invoke method sendEvent() on null object on line 88 (parse)

[dev:263] [debug]read attr - raw: D751030006160000100100F0230051D703, dni: D751, endpoint: 03, cluster: 0006, size: 16, attrId: 0000, encoding: 10, command: 0A, value: 0100F0230051D703

[dev:263] [debug]read attr - raw: D751040006100000100000001001, dni: D751, endpoint: 04, cluster: 0006, size: 10, attrId: 0000, encoding: 10, command: 0A, value: 0000001001

[dev:263] [error]java.lang.NullPointerException: Cannot invoke method sendEvent() on null object on line 88 (parse)

[dev:263] [debug]read attr - raw: D751020006160000100100F0230051D703, dni: D751, endpoint: 02, cluster: 0006, size: 16, attrId: 0000, encoding: 10, command: 0A, value: 0100F0230051D703

I tried both of these drivers:
https://github.com/guyeeba/Hubitat/blob/master/Drivers/Aqara%20QBKG03LM-QBKG04LM.groovy
https://github.com/veeceeoh/xiaomi-hubitat/blob/master/devicedrivers/xiaomi-aqara-dual-button-hubitat.src/xiaomi-aqara-dual-button-hubitat.groovy

Any suggestions?

Have you defined the Generic Child Switch?

metadata {
    definition (name: "Generic Child Switch", namespace: "guyee", author: "P�ter Guly�s") {
        capability "Refresh"
        capability "Actuator"
        capability "Switch"
        capability "Light"
    }
}

def refresh() {
    parent.childRefresh(device.deviceNetworkId)
}

void on() { 
    log.debug "$device on"
    parent.childOn(device.deviceNetworkId)
}

void off() {
    log.debug "$device off"
    parent.childOff(device.deviceNetworkId)
}
1 Like

I don't think I got a child switch

You need both drivers loaded. (Reset the device and delete it from your device list).
Then when you pair the light, the main driver looks for the Generic Driver Switch and allocates 2 child switches to it.
These are the ones you then use in any rule you define.
Here's a screen shot of mine. I have deleted the second child switch as I don't use it.

Ahhh, lol, now I see it. That makes more sense. Thanks.

No problem. You can set it up as a single or double switch in the parent device settings.