Client Side Tile Actions/href

In the documentation there are a number of screenshots of tiles that would appear to carry out client side actions:

Assumably the shop tile brings up a page to be able to purchase the multi sensor…

…and the preferences tiles assumably opens up a settings page for example.

However i cannot find any examples of how to peform actions within the app when a tile is clicked such as opening a webpage, going to a specific settings page and so on.

Does anyone know if this is possible and if so could you give me some pointers as to what I need to set.

These behaviors are defined in the Device Type Handlers which can be created by using the web based IDE; not configurable directly in the mobile App.

It requires some understanding of Groovy and the definition syntax / API that SmartThings platform provides. Documentation link below…; but helpful to learn by example.

http://docs.smartthings.com/en/latest/device-type-developers-guide/tiles-metadata.html

Thats for your reply tgauchat. I should have been more clear… I am using the web based IDE and have created a fairly simple device type so do have some understanding of Groovy.

Opening a webpage from a settings page is simple enough. However I can find no examples that open a webpage etc from a tile action:

Below is an example of standardTile definition:

standardTile(“switchTile”, “device.switch”, width: 2, height: 2,
canChangeIcon: true) {
state “off”, label: ‘${name}’, action: “switch.on”,
icon: “st.switches.switch.off”, backgroundColor: "#ffffff"
state “on”, label: ‘${name}’, action: “switch.off”,
icon: “st.switches.switch.on”, backgroundColor: “#E60000
}

If one wants an action to be carried out when it is tapped obviously you use the ‘action’ property. However as this runs in the cloud/on the hub there is no method to call that will open a page on the local device.

Ideally there would a href attribute that would allow a local action eg:

standardTile(“switchTile”, “device.switch”, width: 2, height: 2,
canChangeIcon: true) {
state “off”, label: ‘${name}’, action: “switch.on”, href:“http://www.google.co.uk/,
icon: “st.switches.switch.off”, backgroundColor: "#ffffff"
state “on”, label: ‘${name}’, action: “switch.off”, href:“http://www.google.co.uk/”,
icon: “st.switches.switch.on”, backgroundColor: “#E60000
}

I tried looking at the source code for the multisensor and drop cam in the IDE however they make no mention of the ‘shop’ tile etc.

Perhaps links from tiles used to be supported but no longer are?

1 Like

Ah… Right. Href in Settings pages is common and what came to mind.

Href from a Tile… I don’t know that I’ve seen that in code.

It’s actually more likely that this may be an undocumented added feature that we will eventually receive access to and documentation for.

1 Like