SmartApp remaing in Pending state

Hello everyone,

I’ve developed a webhook-based SmartApp and installed it on my SmartThings hub. The app is visible in the SmartThings app, but when I try to open it, I get a connection error.

I checked the app’s status via the GET /installedapps API and noticed that it’s stuck in “PENDING” status. I’ve tried several solutions, but I can’t seem to unblock it.

My webhook is active and receiving requests (I’ve tested with curl). I’ve checked the logs and see no errors.

Additional Information

  • I created my app from the SmartThings Developer Workspace interface.
  • I installed my app by calling the POST https://api.smartthings.com/v1/installedapps API, passing the following payload:

JSON{ "appId": "{myAppId}", "locationId": "{myLocationID}", "installedAppType": "WEBHOOK_SMART_APP", "configurationStatus": "DONE" }

Has anyone encountered a similar issue or know how to unblock a SmartApp from “PENDING” status? Do you have any suggestions on what else I could check or try?

Thank you.

That’s interesting, although it appears in the Core SDK I’ve never actually seen that used anywhere and I suspect it probably isn’t doing what you’d like it to. Most likely it is something that gets called behind the scenes later in the flow.

The documented flow for Webhook SmartApps is, sadly, to use the Developer Workspace and the mobile apps. That takes you through the app creation (creating an ‘app’ object) and verification (the CONFIRMATION lifecycle) and publishing your app into the mobile app where it appears in the ‘Discover’ menu on the Routines page (but only if you are in ‘Developer Mode’). You then create your installed instances from there. It is a bit sucky at the best of times and the mobile app’s handling of installed instances has been badly broken for months now so it blows as well.

Home Assistant used to use a different approach when creating a Webhook SmartApp, registering and verifying the app via the CLI/API and then directly accessing ‘Strongman’ to do the installation, bypassing both the Developer Workspace and the mobile apps. Unfortunately Strongman is completely undocumented for community developers. It is a shame really as it is a much nicer solution.

Hi @dfandrew

Adding to what @orangebucket mentioned, SmartApps are cloud-based, so they cannot be installed on the hub because the hub is hub-connected.

You can follow the tutorial below on how to create a SmartApp: Simple SmartApp Tutorial (SmartApp SDK)

There is a known ‘Network Error’ when updating the SmartApp that you will likely encounter. This can be resolved by uninstalling the SmartApp and reinstalling it.

Let us know if you have any questions!