Exclude Child Device from Input Selection


I’m working on a SmartApp that installs a child device but also allows you to select devices with the same capabilities for other purposes. Being able to select the child device in this list could cause some bad things to happen and was wondering if it’s possible to filter them out of the list?

If not, the only thing I can think to do is somehow identify that child device and then not subscribe to it or anything.

Also, somehow my SmartApp has gotten into a state where I can’t delete it (it has child apps and they have child devices). I get the “deleteObserver” error when trying to remove them (the root SmartApp and/or the child SmartApps) and the IDE tells me that “Device still in use. Remove from any SmartApps or Dashboards, then try again” - this is not the case however and have tried all sorts of combinations to remove the things. This might have happened when I selected a child device from another child SmartApp in the same parent SmartApp to see what happened (it actually worked pretty well but selecting the child device within the same SmartApp could be bad).

Any help is appreciated :smiley:


Fixed the uninstalled issue, seems it’s not necessary to explicitly remove child devices and it can cause what I think is a race condition.

1 Like