Zigbee inline switch for USB devices

This is the new dedicated driver for the ZigUSB device that I put together.
It can be installed manually from GitHib :

https://raw.githubusercontent.com/kkossev/Hubitat/development/Drivers/ZigUSB/ZigUSB_lib_included.groovy

The automatic reporting time period is configured in the Preferences :
image
If the V/A/W measurements are not really needed, I recommend to disable the automatic reporting.


Unfortunately, it is not possible to refresh the voltage/amperage/power readings manually - the only way to have these is when the periodic reporting is enabled.

@TheUsualSuspect can you compare the amperage reading accuracy of his device with the other device that you have?

2 Likes

still no way to get these easily in the u.s?

I just purchased 5 and got them shipped without issue to Canada. Received them last week.

1 Like

I have 4 that I'm willing to part with. They work great, I just never found a use case for them. Super interesting item though!

No, it is powered by a wall-wart but I have several AA to usb battery packs that would do the job.

2 Likes

Sorry for the delay. Finally installed the new driver, and on-off reverse is fixed. Below is a comparison between the reported voltage/power/amperage and measured.


Edit: Switched On-Off comparison twice (reversal keeps getting me).

1 Like

Thank you for the test! It looks like the readings make sense (adding the 40..50 mA ZigUSB device own consumption to the amperage drawn by the load)?

thanks.. i just got 4 of these used from user3432 they are working well thanks for the driver. i replaced the sonoff ones that were wifi only..

these i am using on my micro usb repeaters as i have found that occasionaly i need to reboot them and its always when the house is empty

here is the rule i used to reset them

I tried a larger load to help in case absolute error on small values was causing a problem. I watched the V/A/W values refresh about 15 times. It seems to me that the voltage and current are chronically under the real value. I believe the USB is probably putting out close to 5[V]. Below is a representative capture. I note that one time the voltage did read 5[V] but I didn't capture it and it.

Thank you for the tests!

A question about this device. Are both USB ports individually controllable? Or, are they both on or off? Is the outlet plug controllable separately ?

i believe it is all one.. the switch and usb ports turn on/off as one.. i dont see a separate child driver for it in my hug.. but it is in a remote location..

Noob user here, but I can't get the new version of this device (ZigUSB_C6) to pair with Hubitat at all. It gets discovered but I get errors during initialization (with generic drivers or kkossev's). The log below is from a pairing attempt.

dev:3082025-02-01 00:21:44.800warnZigUSB parseZdoClusters: ZDO Device announce error: 0x61 (statusCode: 0x61)
dev:3082025-02-01 00:21:40.283warnZigUSB parseZdoClusters: ZDO Device announce error: 0x61 (statusCode: 0x61)
dev:3082025-02-01 00:21:35.628warnZigUSB parseZdoClusters: ZDO Device announce error: 0xCD (statusCode: 0xCD)
dev:3082025-02-01 00:21:35.381debugZigUSB clearing the Status event
dev:3082025-02-01 00:21:31.039warnZigUSB parseZdoClusters: ZDO Device announce error: Unsupported Cluster (statusCode: 0xC3)
dev:3082025-02-01 00:21:26.342warnZigUSB parseZdoClusters: ZDO Device announce error: 0xC8 (statusCode: 0xC8)
dev:3082025-02-01 00:21:21.804warnZigUSB parseZdoClusters: ZDO Device announce error: 0xD9 (statusCode: 0xD9)
dev:3082025-02-01 00:21:17.087warnZigUSB parseZdoClusters: ZDO Device announce error: 0x77 (statusCode: 0x77)
dev:3082025-02-01 00:21:12.450warnZigUSB parseZdoClusters: ZDO Device announce error: Time out (statusCode: 0x94)
dev:3082025-02-01 00:21:07.783warnZigUSB parseZdoClusters: ZDO Device announce error: 0xFD (statusCode: 0xFD)
dev:3082025-02-01 00:21:03.166warnZigUSB parseZdoClusters: ZDO Device announce error: 0x58 (statusCode: 0x58)
dev:3082025-02-01 00:20:58.549warnZigUSB parseZdoClusters: ZDO Device announce error: 0x39 (statusCode: 0x39)
dev:3082025-02-01 00:20:53.913warnZigUSB parseZdoClusters: ZDO Device announce error: Duplicate Exists (statusCode: 0x8A)
dev:3082025-02-01 00:20:49.286warnZigUSB parseZdoClusters: ZDO Device announce error: Invalid Value (statusCode: 0x87)
dev:3082025-02-01 00:20:44.718warnZigUSB parseZdoClusters: ZDO Device announce error: Insufficient Space (statusCode: 0x89)
dev:3082025-02-01 00:20:40.038warnZigUSB parseZdoClusters: ZDO Device announce error: 0x5D (statusCode: 0x5D)
sys:12025-02-01 00:20:39.455infoZigbee Discovery Stopped
dev:3082025-02-01 00:20:35.472debugZigUSB parseZdoClusters: ZDO Bind Response success: [2B, 00]
dev:3082025-02-01 00:20:35.423warnZigUSB parseZdoClusters: ZDO Device announce error: 0x5E (statusCode: 0x5E)
sys:12025-02-01 00:20:35.400warnUnable to send Zigbee message: [he raw 0x155E 1 0x01 0x0000 {10 00 00 04 00 00 00 01 00 05 00 07 00 FE FF}, delay 200] from zigbee id: 404CCAFFFE42F9C0, message type is unknown.
sys:12025-02-01 00:20:35.397infoFound previously joined Zigbee device ZigUSB
dev:3082025-02-01 00:20:35.393debugZigUSB sendZigbeeCommands(cmd=[[he raw 0x155E 1 0x01 0x0000 {10 00 00 04 00 00 00 01 00 05 00 07 00 FE FF}, delay 200], zdo bind 0x155E 0x01 0x01 0x0006 {404CCAFFFE42F9C0} {}, delay 251, he cr 0x155E 0x01 6 0 16 1 60 {}, delay 251, he raw 0x155E 1 0x01 0x0006 {10 00 08 00 0000}, delay 251, zdo bind 0x155E 0x02 0x01 0x000C {404CCAFFFE42F9C0} {}, delay 2000, he cr 0x155E 0x02 12 85 33 65535 65535 {} {}, delay 2000, he raw 0x155E 1 0x02 0x000C {10 00 08 00 5500}, delay 200])
dev:3082025-02-01 00:20:35.390debugZigUSB configure(): returning cmds = [[he raw 0x155E 1 0x01 0x0000 {10 00 00 04 00 00 00 01 00 05 00 07 00 FE FF}, delay 200], zdo bind 0x155E 0x01 0x01 0x0006 {404CCAFFFE42F9C0} {}, delay 251, he cr 0x155E 0x01 6 0 16 1 60 {}, delay 251, he raw 0x155E 1 0x01 0x0006 {10 00 08 00 0000}, delay 251, zdo bind 0x155E 0x02 0x01 0x000C {404CCAFFFE42F9C0} {}, delay 2000, he cr 0x155E 0x02 12 85 33 65535 65535 {} {}, delay 2000, he raw 0x155E 1 0x02 0x000C {10 00 08 00 5500}, delay 200]
dev:3082025-02-01 00:20:35.360infoZigUSB sent device configuration
dev:3082025-02-01 00:20:35.358debugZigUSB customConfigureDevice() : [zdo bind 0x155E 0x01 0x01 0x0006 {404CCAFFFE42F9C0} {}, delay 251, he cr 0x155E 0x01 6 0 16 1 60 {}, delay 251, he raw 0x155E 1 0x01 0x0006 {10 00 08 00 0000}, delay 251, zdo bind 0x155E 0x02 0x01 0x000C {404CCAFFFE42F9C0} {}, delay 2000, he cr 0x155E 0x02 12 85 33 65535 65535 {} {}, delay 2000, he raw 0x155E 1 0x02 0x000C {10 00 08 00 5500}, delay 200]
dev:3082025-02-01 00:20:35.355infoZigUSB configuring the automatic reporting : DISABLED
dev:3082025-02-01 00:20:35.353debugZigUSB configureReporting operation=Write, measurement=Switch, minTime=1, maxTime=60, delta=0 )
dev:3082025-02-01 00:20:35.351infoZigUSB Configuring the device...
dev:3082025-02-01 00:20:35.349infoZigUSB configureDevice...
dev:3082025-02-01 00:20:35.347infoZigUSB initializeDevice...
dev:3082025-02-01 00:20:35.344infoZigUSB tuyaBlackMagic()...
dev:3082025-02-01 00:20:35.341debugZigUSB configure(): settings: [voltageToPercent:false, flashRate:750, healthCheckMethod:1, healthCheckInterval:240, txtEnable:true, logEnable:true, alwaysOn:false, autoReportingTime:0, ignoreDuplicated:false, inverceSwitch:false, advancedOptions:true, threeStateEnable:false, traceEnable:true]
dev:3082025-02-01 00:20:35.339infoZigUSB configure...
sys:12025-02-01 00:20:31.440infoZigbee Discovery Running
dev:3082025-02-01 00:20:30.777warnZigUSB parseZdoClusters: ZDO Device announce error: 0x2D (statusCode: 0x2D)
sys:12025-02-01 00:20:30.548infoZigbee Discovery Stopped
dev:3082025-02-01 00:20:26.261debugZigUSB parseZdoClusters: ZDO Bind Response success: [23, 00]
dev:3082025-02-01 00:20:26.214warnZigUSB parseZdoClusters: ZDO Device announce error: Invalid Field (statusCode: 0x85)
sys:12025-02-01 00:20:26.192warnUnable to send Zigbee message: [he raw 0x0085 1 0x01 0x0000 {10 00 00 04 00 00 00 01 00 05 00 07 00 FE FF}, delay 200] from zigbee id: 404CCAFFFE42F9C0, message type is unknown.
sys:12025-02-01 00:20:26.188infoFound previously joined Zigbee device ZigUSB

Try to pair it using this method.... although these are very strange errors, I have not seen anything like this before.

Thanks for the tip, I did but same errors.

From what I could find, the latest ZigUSB C6 uses a different ESP32 C6-based zigbee module. This thread covers some issues in trying to get that module to work with Hubitat. It might be related to a zigbee v3 support issue :man_shrugging:

Yep, it seems to be a Zigbee 3.0 implementation issue here ... :frowning: