Porting Aqara No Neutral switch driver (WS-USC01) from Smartthings?

I recently switched from ST to HE and love it. I’ve gotten most of my devices and automations set up so far, but ran into an issue with my no-neutral Aqara switch WS-USC01. I tried to use the Generic Zigbee Switch driver and it worked, but would not correctly show the state in Hubitat.

I then thought I’d copy and paste the custom driver I used from Smartthings to see what would happen. Oddly enough, it worked but gave me the following error:

unable to resolve class physicalgraph.device.HubAction @ line 557, column 32.

Since I don’t really know what I’m doing with this, I deleted that line in the driver code and it ended up accepting the code and adding the driver. I added the driver to the device and it worked and was able to correctly read the device state. The only issue is that I am getting quite a few errors in the logs related to that device such as:

groovy.lang.MissingPropertyException: No such property: ONOFF_CLUSTER for class: com.hubitat.zigbee.Zigbee on line 315 (method parse)

Is there anyone who can help port this driver from Smartthings to Hubitat so that it works correctly and doesn’t throw any errors? The driver also has a lot of other devices included in it so it may be a good driver to have in general. Here’s the link to the ST code:

I looked through other threads here and saw some drivers related to the Aqara 2-gang switch and the switches with a neutral, but couldn’t find any existing drivers for this no-neutral 1-gang version.

Thanks for the help!

Take a look at this old thread on porting ST device handlers to Hubitat drivers:

2 Likes

@Mikeymike88 did you manage to find a working driver for your WS-USC01 Aqara switch?

I ended up finding a custom driver called:
Zigbee - Generic Switch (with Presence) from https://oh-lalabs.com. This works for the basic functionality and reports the state correctly so I ended up keeping it.

If you have new models Aqara wall switches that do not work with the original old driver, you can try this mod:

https://raw.githubusercontent.com/kkossev/hubitat-Markus-Li-fork/release/drivers/expanded/zigbee-aqara-wall-switch-expanded.groovy

Thanks! I just tested this and noticed that there is no On or Off commands in the device details, where the other Generic Switch driver had those. Can you add those?

Check whether this driver has created a child device… this is how itye driver is written. I don’t have this switch, so I am unable to test.