Need example of ChildApp

Have been banging my head against the Child App setup all night.

The documentation is incomplete and lacking any example. I can see the empty ChildApp property in the app object but have not found a way to add/install one as such.

Hopefully somebody from the ST team can jump in with a simple example.

Thanks!

@fxstein - what are you trying to do? Do you just want to see how they work, or do you have a case where you want to use them?

We created the parent/child app relationship for our solution modules and the ability for users to develop those is coming soon. Not sure if there are cases where you’d need child apps outside of that context, but if so, let me know.

@matthewnohr Thank you for your reply.

I was trying to use it as the vehicle to leverage a reusable library of functions that I can “include” in my Apps by simply defining it as a child App. Right now I have some advanced conversion and logging/debugging functions that I want in all of my SmartApps.

I have created a little app https://github.com/fxstein/smartthings-smartlib as a starting point.

I will add settings for level of debugging, external logging and other capabilities. In order to use them I could see this as a Child App so I can call its methods from the parent.

I understand its kind of a hack, but would allow me to leverage a re-useable set of code amongst multiple applications.

Thank you!