SmartApp and Custom DeviceType Children Issue


(Patrick Stuart [@pstuart]) #1

So,

After many attempts, I finally have a working solution for a smartApp that can be used to enter IP based cameras, using my generic camera device type.

However, in testing with my second account, the whole process is screwed up. How in the heck does ST expect normal users to use ANYTHING developed by the community?

The steps for a normal user to use my SmartApp:

  1. In IDE, add my SmartApp code and publish… (Yes this could be a published community app eventually, but see below)

  2. Once SmartApp is installed, install the Custom DeviceType code, Generic Camera Driver

  3. Launch App, and add my SmartApp

  4. Configure up my SmartApp to add a camera, rinse and repeat for all cameras

  5. Go back into IDE and choose a hub in each device (child of the smartApp) because the API exposes no way to get the value of the name of the hub and all examples use null instead which breaks hubaction local calls

  6. Go into camera thing to take picture and hope you are on iOS so the images persist…

  7. There is no seven…

This has to be the craziest process to try to get an average user, let alone a developer to do to get a simple Camera IP app installed.

My suggestion…

Allow custom deviceTypes to be embedded into SmartApps.
Allow for community publishing of deviceTypes so SmartApps can trigger install.

Either of these would allow a much more streamlined approach to SmartApp to child device relationships…


(Geko) #2

You can select a hub from your smart app at the time of child device creation using ‘hub’ input type:

input "hub", "hub", title: "Select Hub"

This will display a list of hubs in the UI to choose from (sort of like “enum” input). I agree with everything else - installing custom device types is screwed up.


(Patrick Stuart [@pstuart]) #3

Yeah, thanks, I can add that to choose the hub, but still, the whole custom device type is fubar.


(trac starr) #4

I agree. It’s rather frustrating. I’m in the same position. If a user wants to install a community SmartApp with custom DeviceTypes, they shouldn’t be required to deal with this manually from a browser.