New Parent/Child Smart App Documentation!

What?! Parent/Child SmartApps?! What the heck is that?

Well, we now have some amazing documentation from @jim and @unixbeast describing how to create a parent/child smart app relationship! This is super exciting and we are even more excited to share it with you!

You should really click here


This is one of those moments where the perfect GIF must be found, and I think I have done it. Enjoy!

8 Likes

yea!!!.. more descriptive whatever…
never mind… RTFM…
Works fine, thanks for getting this done guys!

This is super cool man, I can’t wait to parentify “sonos notify with sound”…

4 Likes

ThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyou

(20 Thankyous)

4 Likes

Very cool and powerful tool! Can a SmartApp spawn both child devices and SmartApps? Or maybe have the child SmartApp spawn the child devices?

Wondering if we could self-contain some of the virtual switch/momentary uses into a single app like the Echo to Harmony process.

1 Like

would not recommend this

I honestly haven’t tried this but in theory I don’t see why it couldn’t. But it may get really messy. Your mileage may vary.

I know @slagle says no, but that’s up next on the list for the app I’m working on…

1 Like

Yessss say that again…and Harmony triggers. Busy work from home tomorrow…cool trick @slagle. Thank you!

This was a much needed feature. Thanks a lot for making this work! The number os smart apps i have just looks horrendous… This will streamline things … Thank You!!!

@slagle,

Would ST be interested in pull requests modifying exiting ST SmartApps to support children? If so, how should they be done? Keep the same name or modify it to be plural? (“The Big Switch” could become “Big Switches”, for example - I’ve already got this one working and it’s the one I’d submit first.)

If you’d prefer to have the app name unchanged, is the namespace change from “smartthings” to “smartthings/parentname” enough to prevent anything odd from happening if you have both the old and new version installed?

1 Like

Pull requests might not be the best way to do this. I’d submit through the tool.

Just make sure the new name of the app makes sense

I’d assume most apps would require a new name anyways so this is probably a mute point

1 Like

Didn’t say “no” but your mileage may vary. My concern is the uninstall process.

One of the following scenarios may happen:

  1. You may either end up not being able to uninstall the app at all because it can’t uninstall the child device on the child app
  2. You end up with tons of orphaned devices.
  3. It works

These docs just get better and better!

1 Like

Right?! @Jim and @unixbeast are incredible!

Once we have more local SmartApps, would a child SmartApp be allowed to run locally even if it has a parent SmartApp that cannot run locally?

Smart Lights does this :smile:

Each app is independant. They have a relationship but outside of that they pretty much live independently of each other.

You can have a parent in the cloud with 6 child smartapps where the parents runs in the cloud, 3 children run in the cloud, and the other 3 children run locally. In this case the determining factor is not whether the child can run locally or not, but the devices in the child smartapp and whether they can all run locally or not.

3 Likes

OK, bit of an update.
child smart apps can create child devices
deleting the child instance deleted the child device
deleting the parent app deleted all the child apps and all child devices
Only thing I’ve noticed (other than what @pstuart found on LCF tonight), is that there isn’t a link in the child device to the child smart app.

1 Like

@Jim, @unixbeast, @slagle
Is there a way to limit the number of Child Apps?

1 Like

Does anyone have information on imposing a limit on the number of Child Apps?

I’m not aware of any easy/configurable way to specify a limit on the number of child apps allowed. You could specify multiple: false, but that would of course only allow for one app, which is not what you want.

Run a counter X Then condition the display of the section for the child app creation on whether X <= your max limit.

1 Like