Force Delete a Child device

I have selected wrong driver for a device, and got 3 Child devices from the parent device.
I have corrected the driver, but the CHILD devices remain intact.
I can NOT find a way to remove the child devices.
No I Idea how to remove them.

Open each child device’s details page, scroll to the bottom, and click Remove.

Thanks I forgot to mension the remove divice is in gray color and in disable for me to click on it

This is a very easy problem to encounter.

Create a Virtual Device, select the Zooz RGBW controller, click save. You'll find two Child devices at the bottom of the Device Info page:

Screen Shot 2020-10-16 at 10.52.53 PM

Then change your mind, make it a Fibaro RGBW controller, click Save. Enable the White channel in Preferences. Click Save. Now there are 3:

Let's imagine you don't like the results with that driver either and change to an Aeon RGBW Bulb.

All of the Child devices have been 'protected' and Remove is a grey option.

You can delete the Parent device, and re-include your device OR.. what I did was write a driver you swap in, list then delete the child devices and swap back.

Screen Shot 2020-10-16 at 11.05.19 PM
Looking at Live logs after clicking List Child Devices:

debug childern: [ChildTooMany-white, ChildTooMany-color, ChildTooMany Dimmer], [d8831de8-9e92-48c1-a0a0-c718d59c689e-WHITE, d8831de8-9e92-48c1-a0a0-c718d59c689e-COLOR, d8831de8-9e92-48c1-a0a0-c718d59c689e-Dimmer]
--- Live Log Started, waiting for events ---

Then click Delete Child Devices and the logs show:

debug Child Device Delete, Complete
debug children: [d8831de8-9e92-48c1-a0a0-c718d59c689e-WHITE, d8831de8-9e92-48c1-a0a0-c718d59c689e-COLOR, d8831de8-9e92-48c1-a0a0-c718d59c689e-Dimmer]
3 Likes

This is what my clean driver is for.

Change it to this driver and call the command and it will wipe the child's.

10 Likes

Oh, your code grew since you first released it. I've had that code sitting in my bag-of-tricks for years, never knew you updated. Just tried it.. works well. Now I can delete my crude work from the 'bag'.

1 Like

Yeah, found I need a few more bits and as simple as it is it comes in handy quite often.

2 Likes

You ar the boss. Exclente your driver solved my problem faster than I creat it. Thanks :+1: :grinning: :+1:

2 Likes

Another thumbs up :+1:. Was trying different drivers for the TKBHome Dual Relay and ended up non-removable child devices a couple of times. I had to exclude and include the device to clear them.
This makes the work much cleaner and faster.
Why hasn't this been made official :thinking:

1 Like

It can be done now with the native Device Driver also. Is that what you mean by official?

3 Likes

This link is dead (IT's back SEE EDIT BELOW), in fact it appears there is no borristhecat on github either.

Until this changes or is back online the only option is to change your driver to "Device" and then you'll have an option to delete children on the Device page.

EDIT: Someone shared the link again and it appears to be here: https://github.com/borristhecat/HUBITAT/blob/master/Drivers/Clean%20Device.groovy

2 Likes

Pretty long time ST user, converting to Hubitat in 2022.