How to display values in a smartapp


(John Jenkins) #1

I apologize if this is really obvious, seems like it should be but I can’t find it anywhere. How do I display values from a smartapp? For example I wrote an app that calculates the temperature difference between indoors and outdoors. Is there a way I can display the difference, or can I only make a device action? Thanks!


(Keith Croshaw) #2

Right now the only option is to create virtual dimmers and write to those as inputs. There might be others but that’s what I would do. There are provisions coming with the upcoming UX redesign. If they will be easy to implement and what you are looking for remains to be seen.


(sidjohn1) #3

Its fairly easy to display values in a smartapp, check out PlantLink-DirectMonitor.groovy or ThinkingCleanerer.groovy for some ideas.


(Keith Croshaw) #4

Do you have any screenshots of that?


(John Jenkins) #5

I took a look at the two apps you suggested, is the log.info command what you are suggesting? Using the log will work, I was hoping for a way to display it on the dashboard or device image.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #6

The use of a Virtual Device or modified Device Handler with added Value Tiles is the appropriate solution at this time.


(Patrick Stuart [@pstuart]) #7

Oauth HTML endpoint that renders out values can work too.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #8

But not renderer in the SmartThings Mobil App, right??


(Patrick Stuart [@pstuart]) #9

No actually you could. Just launch the smartapp and use the HTML link to the embedded browser to point to the oauth path. But since you are in the smartapp, just show the values in the limited ui of dynamic pages.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #10

Hmmm… OK.

I guess there are a few ways to handle this, thanks.

(I still like real or virtual device Tiles, though we need more native tile types!)


(sidjohn1) #11

@johnj no, log.info just sends it out to live logging, if you are looking for values from a device look @ the pageInfo() function in both apps.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #12

Right… The second picture would look great as a colored set of Tiles or Sub-Tiles (ie., bunch or single virtual Device(s)).


(sidjohn1) #13

I tried that by putting all the plants (devices) in a folder, and achieved that result… But having to shake my phone to see what needed to be watered I felt was poor UX.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #14

Ah… right! That’s the complication (among others)! Still crazy that they haven’t fixed that after all these years.

Then there are “ValueTiles” (sub-Tiles) as an alternative, but those have a lot of bugs … background color still doesn’t work, as far as I can tell … at least on Android …? And “StandardTiles” have completely unpredictable text positioning … downright ugly. Sigh.


(sidjohn1) #15

I’m hoping the new app that will be comming out with hub v2 resolves some of the pesky UX w/o adding any new pesky UX. grin a boy can dream :wink: