Hub version 1.1.0 changes for developers

Ok. Thank you for the response and recommendation.

on ST the format seems to be:
capability "Temperature Measurement"

so use "PressureMeasurement" or "Pressure Measurement" on HE?

thank you.

spaces are removed, either will work, in the end if you don't get the name right the editor will complain...

1 Like

for this snippet:

    ifDebug("$k, [type: $t, value: $v]")
    app.updateSetting(k, [type: "$t", value: "$v"])

this is the debug output:

    roomButton2, [type: capability, value: [30B1]]

but the update setting doesnt seem to be setting that input. what am i doing wrong? :slight_smile:

thank you.

30b1 is not a device id

had .deviceNetworkId switched to .id that didnt help.

heres another line of debug output from where i am setting these in a loop. this one doesnt work either:

   hideAdvanced, [type: bool, value: false]

I don't know what to tell you man they all work. The input of course needs to exist...

Build yourself a simple page with no dynamic input names, so you can see how to use them then go from there.

so its not sufficient that they are defined as inputs …they already need to have a value as in have been inputted by the user?

Webcore pistons have that issue as well. The user must open and click Done to create the setting if it doesn't exist otherwise it won't create/update it.

i know thats the case on ST … thought HE was better than that. :wink:

I think in ST it creates it dynamically for you if it doesn't exist. Took me a little while to find out why grabbing devices was taking so long in HE and traced it back to the setting.

thanks. havent tried on ST yet … was getting the logic worked out on HE first.

just move everything to statically typed i say. :slight_smile:

1 Like

I've written my fair share of apps here and at that other place, to date I've not found a need to populate an input element that does not yet exist.

Its actually a bug using : in the input name. Will be fixed in an upcoming release. Its a pretty bad idea to use : in names.

1 Like

I haven't either for cases using the standard app flow. In webcore, the user never sees the child's setting page since it's managed through the web ui using addChildApp and deleteChildApp. Normally they don't ever need to visit the child app page since the actions are done on the web ui, but it adds about 50% of the runtime (~150ms) to spin the parent up to grab the devices. I warn users when it can't update the setting, but right now they needs to go through all their child apps (I had around 60) and click done on each one, and every new one.

one of the features i want to support in rooms manager is allow users to clone rooms instead of having to set each one up from scratch. from all feedback i have heard … this would be really useful for rooms manager users specially when they are getting started, settings up all their rooms and like to experiment with different settings.

when cloning to a new room the child app settings are a blank page … thats when its not working.

I think I am running into this issue. I have a SmartApp where the user can build program (or animation) for an LED strip. For example:

In addition to building the program manually, I've created an "Import" option that lets you import a program as a string. i.e.:

Police Lights,true,2,-1_Red.100.2.100;Blue.100.2.100

The app parses the text and updates the settings with app.updateSetting. I've found the settings don't get populated unless the user goes into some of the sub pages and hits done. Once they do they can go back in and import again.

Not a big deal, but just wanted to mention it. It is a little confusing for folks.

@mike.maxwell Looks like you guys changed this in the latest firmware release. It is working great. Thanks!


2 posts were split to a new topic: Can't figure out how to use clearSetting / updateSetting