How to show dashboard with device info page in smartapp

No problem Kevin. You helped me a lot. I will try and post information for community users with whatever I do in API app.

Hi @krlaframboise

I have created the API App, passed oAuth2 and got the list of switches that user has configured in external application. I am able to get status, command switches from my external application. I will share the code once I complete the whole external application development.

Hi @tgauchat

I am stuck at a place, it wld be gr8 if you could help me here. I want to command my switches on certain events. For example, if some lock gets open, switch should get on. How can I get this through my current external Application + Smart API App.

In documentation it is mentioned that the API app will automatically installed when user authorize the app but I don’t see it in My App listing. But API calls are working fine.

Regards,
RD

You may be running into a known bug that is still lingering (I think a fix was rolling out yesterday / today / tomorrow?). Even SmartTiles installs at the moment are frequently not appearing in the mobile app’s installed SmartApp list.

Here’s one reference, though it may not be the exact same problem. I’d give this another couple days for the Platform guys to confirm fixed before wasting too much time trying to debug. It’s easiest that way for quirks / anomalies like this sometimes.

@tgauchat, yeah may be. I found this Web Service App under My Home -> Things -> Bedroom Switch (this is my device) -> SmartApps.

Basically this section is listing which apps are using my device. I have one question here, in my smartapp in preference section I am asking users to put mobile number where I can send push notification. pl see below code.

input “switches”, “capability.switch”, title: “Which Switches?”, multiple: true, required: false
input “locks”, “capability.lock”, title: “Which Locks?”, multiple: true, required: false
input “phone”, “phone”, title: “Warn with text message”,description: “Phone Number”, required: true

But, in authorization screen, app is asking to choose switches, locks but not asking for mobile number.

I believe it should ask, right?

Regards,
RD

I should double-check the documentation, but I believe the OAuth workflow web screen only functions to select Devices, not set other settings values.

Other settings can be accessed only via the mobile App (under SmartApps, bring up your SmartApp preference pages there once installed).

Alternatively, write your own web front-end page form to collect the Mobile Number, and push it to the SmartApp via a REST-API endpoint.

Yes, you seems to be right @tgauchat. Application does not asking users for input during OAuth2 process. Here, I have to ask user to provide mobile number to get notification in external app & trigger endpoint call based on it.