# A web service SmartApp: public approval or what?

**URL:** <https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381>\
**Category:** General Discussion\
**Tags:** smartapp, webservices, developers, publication\
**Created:** [August 6, 2016, 10:56am UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381 "2016-08-06T10:56:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicrusso7](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/nicrusso7/32/36811_2.png) [@nicrusso7](https://community.smartthings.com/u/nicrusso7)\
**Post date:** [August 6, 2016, 10:56am UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/1 "2016-08-06T10:56:23Z")

</div>

Hi everyone!

I’ve developed a web service SmartApp in order to implement ST (hub and devices) in the platform we developed:  
Gideon Smart Home (gideon.ai). As we know the user have to install this app through ST app, and at the same time,  
we know the “biblical times” we have to wait for ST approval (due to the number of app that ask for the  
pubblication 🙂 ), I have a pending request opened from 7 months.

I’m looking for alternative solution but seems that the only way is to ask to the user to create a new smartapp and  
copy and paste the source code on his profile (“My SmartApps”) and then “publish for himself” the app.

Anyway, every time we want to extend the support to a device, every user need to update the source code of the relative  
Smartapp, it’s a mess…

Any alternative solutions?

---

<div class="post-metadata">

**Author:** ![ghesp](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/ghesp/32/19302_2.png) [@ghesp](https://community.smartthings.com/u/ghesp)\
**Post date:** [August 6, 2016, 7:54pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/2 "2016-08-06T19:54:57Z")

</div>

You could get the URL of your SmartApp from within the SmartApp, pass this to Gideon, and then use that to call the SmartApp.

Alternatively, @jody.albritton, can you help? 7 months seems a bit…long?

EDIT: Gideon is awesome btw.  
If anyone else wants to know more: [https://play.google.com/store/apps/details?id=mobile.alfred.com.alfredmobile](https://play.google.com/store/apps/details?id=mobile.alfred.com.alfredmobile)

---

<div class="post-metadata">

**Author:** ![Whippm](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/whippm/32/20672_2.png) [@Whippm](https://community.smartthings.com/u/Whippm)\
**Post date:** [August 6, 2016, 8:49pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/3 "2016-08-06T20:49:21Z")

</div>

> [@nicrusso7](#):
>
> ask to the user to create a new smartapp and copy and paste the source code on his profile

This is how most of the community SmartApps are handled using GitHub. We are used to it and they can be semi-auto updated through the ST GitHub Repository Integration.

Not sure if it would work with your app requirements, just a suggestion. BTW- your app looks very well polished, good luck!

---

<div class="post-metadata">

**Author:** ![jody.albritton](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jody.albritton/32/220661_2.png) [@jody.albritton](https://community.smartthings.com/u/jody.albritton)\
**Post date:** [August 6, 2016, 8:53pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/4 "2016-08-06T20:53:28Z")

</div>

> [@ghesp](#):
>
> 7 months seems a bit…long?

If it’s just a web service smartapp, we might be able to get it reviewed. Adding @slagle

---

<div class="post-metadata">

**Author:** ![slagle](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/slagle/32/16950_2.png) [@slagle](https://community.smartthings.com/u/slagle)\
**Post date:** [August 6, 2016, 8:59pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/5 "2016-08-06T20:59:10Z")

</div>

We are evaluating all apps submitted now, we hope to have responses to everyone soon based on the evaluation.

---

<div class="post-metadata">

**Author:** ![ingmichelegalli](https://avatars.discourse-cdn.com/v4/letter/i/9fc348/32.png) [@ingmichelegalli](https://community.smartthings.com/u/ingmichelegalli)\
**Post date:** [August 7, 2016, 11:02am UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/6 "2016-08-07T11:02:22Z")

</div>

Hey guys,  
I work in Gideon too.  
Thanks for the replies,we will add the code of the smartapp asap.  
it is a simple web service to let Gideon communicate with the SmartThings devices.  
We are also aware that SmartThings have an unbeatable compatibility, but what our users love from us is the overall user experience they have in Gideon and i promise they would die to have the ST products in Gideon.  
We also try to give a seamless experience across all the devices and with Github the problem is that not every user is a tech addicted or a developer, most of our users would not have a GitHub account ( they would not even know what GitHub is 😄 ) but probably would be easier than creating a smartapp with our code every time we do some changes.  
The best solution would be an endpoint in the SmartThings cloud we can call to control the devices, check the devices status and maybe a few webhooks for the alarms.  
With the smartapp we can simulate this kind of endpoint.  
Having access to a ST endpoint or at least have the smartapp approved would be hundreds of times more efficient and easier for us and would result in a great UX for the SmartThings users in Gideon  
🙂

---

<div class="post-metadata">

**Author:** ![tgauchat](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/tgauchat/32/49516_2.png) [@tgauchat](https://community.smartthings.com/u/tgauchat)\
**Post date:** [August 7, 2016, 11:15am UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/7 "2016-08-07T11:15:39Z")

</div>

> [@ingmichelegalli](#):
>
> Having access to a ST endpoint …

**_Join the club._** 😔

Sincerely,  
…**[SmartTiles](http://SmartTiles.click)**.

---

<div class="post-metadata">

**Author:** ![xAPPO](https://avatars.discourse-cdn.com/v4/letter/x/bc79bd/32.png) [@xAPPO](https://community.smartthings.com/u/xAPPO)\
**Post date:** [August 7, 2016, 11:24am UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/8 "2016-08-07T11:24:44Z")

</div>

> [@Whippm](#):
>
> We are used to it and they can be semi-auto updated through the ST GitHub Repository Integration.

Only in the US - despite every effort to get ST to fix this in the UK we still don’t have this functionality ☹

---

<div class="post-metadata">

**Author:** ![nicrusso7](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/nicrusso7/32/36811_2.png) [@nicrusso7](https://community.smartthings.com/u/nicrusso7)\
**Post date:** [August 7, 2016, 12:48pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/9 "2016-08-07T12:48:44Z")

</div>

Thank you all guys! The app is very simple, I’ve followed the official tutorial:

`/\*\*

- Gideon
- 
- Copyright 2016 Nicola Russo
- 
- Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except
- in compliance with the License. You may obtain a copy of the License at:
- 
- 

```
 http://www.apache.org/licenses/LICENSE-2.0

```

- 
- Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
- on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
- for the specific language governing permissions and limitations under the License.
- 

\*/  
definition(  
name: “Gideon”,  
namespace: “gideon.api”,  
author: “Braindrain Solutions”,  
description: “Gideon AI Smart app allows you to connect and control all of your SmartThings devices through the Gideon AI app, making your SmartThings devices even smarter.”,  
category: “Family”,  
iconUrl: “[http://s33.postimg.org/t77u7y7v3/logo.png](http://s33.postimg.org/t77u7y7v3/logo.png)”,  
iconX2Url: “[http://s33.postimg.org/t77u7y7v3/logo.png](http://s33.postimg.org/t77u7y7v3/logo.png)”,  
iconX3Url: “[http://s33.postimg.org/t77u7y7v3/logo.png](http://s33.postimg.org/t77u7y7v3/logo.png)”,  
oauth: [displayName: “Gideon AI API”, displayLink: “gideon.ai”])

preferences {  
section(“Control these switches…”) {  
input “switches”, “capability.switch”, multiple:true  
}  
section(“Control these motion sensors…”) {  
input “motions”, “capability.motionSensor”, multiple:true  
}  
section(“Control these presence sensors…”) {  
input “presence\_sensors”, “capability.presenceSensor”, multiple:true  
}  
section(“Control these outlets…”) {  
input “outlets”, “capability.switch”, multiple:true  
}  
section(“Control these locks…”) {  
input “locks”, “capability.lock”, multiple:true  
}  
section(“Control these locks…”) {  
input “temperature\_sensors”, “capability.temperatureMeasurement”  
}  
}

def installed() {  
log.debug “Installed with settings: ${settings}”

```
initialize()

```

}

def updated() {  
log.debug “Updated with settings: ${settings}”

```
unsubscribe()
initialize()

```

}

def initialize() {  
// TODO: subscribe to attributes, devices, locations, etc.  
subscribe(outlet, “energy”, outletHandler)  
subscribe(outlet, “switch”, outletHandler)  
}

// TODO: implement event handlers  
def outletHandler(evt) {  
log.debug “$outlet.currentEnergy”  
//TODO call G API  
}

private device(it, type) {  
it ? [id: it.id, label: it.label, type: type] : null  
}

//API Mapping  
mappings {  
path("/getalldevices") {  
action: [  
GET: “getAllDevices”  
]  
}  
path("/doorlocks/:id/:command") {  
action: [  
GET: “updateDoorLock”  
]  
}  
path("/doorlocks/:id") {  
action: [  
GET: “getDoorLockStatus”  
]  
}  
path("/tempsensors/:id") {  
action: [  
GET: “getTempSensorsStatus”  
]  
}  
path("/presences/:id") {  
action: [  
GET: “getPresenceStatus”  
]  
}  
path("/motions/:id") {  
action: [  
GET: “getMotionStatus”  
]  
}  
path("/outlets/:id") {  
action: [  
GET: “getOutletStatus”  
]  
}  
path("/outlets/:id/:command") {  
action: [  
GET: “updateOutlet”  
]  
}  
path("/switches/:command") {  
action: [  
PUT: “updateSwitch”  
]  
}  
}

//API Methods  
def getAllDevices() {  
def locks\_list = locks.collect{device(it,“Lock”)}  
def presences\_list = presence\_sensors.collect{device(it,“Presence”)}  
def motions\_list = motions.collect{device(it,“Motion”)}  
def outlets\_list = outlets.collect{device(it,“Outlet”)}  
def switches\_list = switches.collect{device(it,“Switch”)}  
def temp\_list = temperature\_sensors.collect{device(it,“Temperature”)}  
return [Locks: locks\_list, Presences: presences\_list, Motions: motions\_list, Outlets: outlets\_list, Switches: switches\_list, Temperatures: temp\_list]  
}

//LOCKS  
def getDoorLockStatus() {  
def device = locks.find { it.id == params.id }  
if (!device) {  
httpError(404, “Device not found”)  
} else {  
return [Device\_state: device.currentValue(‘lock’)]  
}  
}

def updateDoorLock() {  
def command = params.command  
def device = locks.find { it.id == params.id }  
if (command){  
if (!device) {  
httpError(404, “Device not found”)  
} else {  
if(command == “toggle”)  
{  
if(device.currentValue(‘lock’) == “locked”)  
device.unlock();  
else  
device.lock();

```
            return [Device_id: params.id, result_action: "200"]
        }
    }
}

```

}

//PRESENCE  
def getPresenceStatus() {

```
def device = presence_sensors.find { it.id == params.id }
if (!device) {
        httpError(404, "Device not found")
    } else {
    	return [Device_state: device.currentValue('presence')]

```

}  
}

//MOTION  
def getMotionStatus() {

```
def device = motions.find { it.id == params.id }
if (!device) {
        httpError(404, "Device not found")
    } else {
    	return [Device_state: device.currentValue('motion')]

```

}  
}

//OUTLET  
def getOutletStatus() {

```
def device = outlets.find { it.id == params.id }
if (!device) {
        httpError(404, "Device not found")
    } else {
    	return [Device_state: device.currentSwitch, Current_watt: device.currentValue("energy")]

```

}  
}

def updateOutlet() {

```
def command = params.command
def device = outlets.find { it.id == params.id }
if (command){
    if (!device) {
        httpError(404, "Device not found")
    } else {
        if(command == "toggle")
        {
            if(device.currentSwitch == "on")
              device.off();
            else
              device.on();
              
            return [Device_id: params.id, result_action: "200"]
        }
    }
}

```

}

//SWITCH  
def updateSwitch() {  
def command = params.command  
def device = switches.find { it.id == params.id }  
if (command){  
if (!device) {  
httpError(404, “Device not found”)  
} else {  
if(command == “toggle”)  
{  
if(device.currentSwitch == “on”)  
device.off();  
else  
device.on();

```
            return [Device_id: params.id, result_action: "200"]
        }
    }
}

```

}

//TEMPERATURE  
def getTempSensorsStatus() {

```
def device = temperature_sensors.find { it.id == params.id }
if (!device) {
        httpError(404, "Device not found")
    } else {
    	return [Device_state: device.currentValue('temperature')]

```

}  
}

---

<div class="post-metadata">

**Author:** ![nicrusso7](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/nicrusso7/32/36811_2.png) [@nicrusso7](https://community.smartthings.com/u/nicrusso7)\
**Post date:** [August 7, 2016, 1:02pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/10 "2016-08-07T13:02:59Z")

</div>

Do you think this kind of app can be refused?

---

<div class="post-metadata">

**Author:** ![Mbhforum](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/mbhforum/32/93879_2.png) [@Mbhforum](https://community.smartthings.com/u/Mbhforum)\
**Post date:** [August 7, 2016, 2:21pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/11 "2016-08-07T14:21:37Z")

</div>

I just checked out Gideon (didn’t install the ST smart app yet). Looks cool and I really like the timeline and energy/temperature consumption features. Currently, I am using Yonomi and IFTTT to compliment Smartthings, and I am not sure I have a real use for Gideon right now. Ultimately, all off the ST automations will still rely on the ST cloud. If Gideon can include other integrations eventually, I might be able to use it for something already. Could be useful for someone who doesn’t want to mess with CoRE and wants a more GUI friendly rule builder.

I noticed a few issues:

1. I noticed a bug in the iOS app as I set my temperature preference to F, but in my timeline, it’s still reporting C.

2. When I tried to connect my Hue account, my Bloom didn’t show, only my light strips. In the native Hue app, all show up fine.

3. On your site, it says you have Sonos compatiablity, but in the app, I don’t see an option to add.

---

<div class="post-metadata">

**Author:** ![ingmichelegalli](https://avatars.discourse-cdn.com/v4/letter/i/9fc348/32.png) [@ingmichelegalli](https://community.smartthings.com/u/ingmichelegalli)\
**Post date:** [August 7, 2016, 2:31pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/12 "2016-08-07T14:31:32Z")

</div>

Thank you 🙂

1. the bloom light wasn’t compatible yet because every type of hue light has a different ID and Philips never revealed the complete list of ids.  
if you can send me the username or email you used to sign in Gideon, i would be able to check the bloom type id and add the compatibility in Gideon.
2. this is not a bug but more a improvement we can do (again, Thank you)
3. the android version has Sonos while in the ios app we had to temporary remove it to do some new tests, we will add it again in the next updates on ios

---

<div class="post-metadata">

**Author:** ![Mbhforum](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/mbhforum/32/93879_2.png) [@Mbhforum](https://community.smartthings.com/u/Mbhforum)\
**Post date:** [August 7, 2016, 2:32pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/13 "2016-08-07T14:32:37Z")

</div>

Thanks. Sonos on Yonomi is a little flakey, so I’d love to give that a shot. I strongly encourage integration with the Echo 🙂

---

<div class="post-metadata">

**Author:** ![ingmichelegalli](https://avatars.discourse-cdn.com/v4/letter/i/9fc348/32.png) [@ingmichelegalli](https://community.smartthings.com/u/ingmichelegalli)\
**Post date:** [August 7, 2016, 2:42pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/14 "2016-08-07T14:42:55Z")

</div>

Yes i agree having echo would be great.  
We are evaluating the best way to implement it.  
There are tons of devices we want to add in the next months but for now we are focusing on what the users ask and we received hundreds of emails in the past weeks asking for ST 😄 so we want to put all the effort on this now

---

<div class="post-metadata">

**Author:** ![ingmichelegalli](https://avatars.discourse-cdn.com/v4/letter/i/9fc348/32.png) [@ingmichelegalli](https://community.smartthings.com/u/ingmichelegalli)\
**Post date:** [August 7, 2016, 9:48pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/15 "2016-08-07T21:48:31Z")

</div>

Hi i was taking a look at SmartTiles and i went through the installation process.  
How do you add the smartapp automatically on the SmartThings app, after the user log in their SmartThings account?  
Because if we can do that we don’t need to have approved our SmartApp, or am i wrong?  
How do you keep updated the smartapp?

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![ghesp](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/ghesp/32/19302_2.png) [@ghesp](https://community.smartthings.com/u/ghesp)\
**Post date:** [August 7, 2016, 10:28pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/16 "2016-08-07T22:28:01Z")

</div>

This is one for the ST developers to answer, hope this might make everyone’s life a bit easier.

Would it not be possible to provide a standard endpoint which allows users to get device informant send device commands, ith the ability to code your own information in.

There seem to be loads of apps that require exactly the same information - I can think of Gideon and SmartThings right off the bat.

You’d simply just need a standard built in endpoint that Web apps can call, and the user can get an api key from their account.

Easy

---

<div class="post-metadata">

**Author:** ![tgauchat](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/tgauchat/32/49516_2.png) [@tgauchat](https://community.smartthings.com/u/tgauchat)\
**Post date:** [August 7, 2016, 10:30pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/17 "2016-08-07T22:30:57Z")

</div>

> [@ingmichelegalli](#):
>
> How do you add the smartapp automatically on the SmartThings app, after the user log in their SmartThings account?

That’s the normal result of an “OAuth” SmartApp that is approved by the user via the OAuth install flow.

SmartTiles _is_ an submitted, approved and published SmartApp. It just doesn’t appear in the SmartThings App’s “Marketplace”.

We’re like IFTTT or Amazon Alexa SmartApps.

---

<div class="post-metadata">

**Author:** ![tgauchat](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/tgauchat/32/49516_2.png) [@tgauchat](https://community.smartthings.com/u/tgauchat)\
**Post date:** [August 7, 2016, 10:36pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/18 "2016-08-07T22:36:09Z")

</div>

> [@ghesp](#):
>
> Would it not be possible to provide a standard endpoint which allows users to get device informant send device commands, ith the ability to code your own information in.
> 
> There seem to be loads of apps that require exactly the same information - I can think of Gideon and SmartThings right off the bat.

Yes, it’s possible, but like many things, this has been a “feature request” submitted to SmartThings by many people over and over for 3+ years.

It may eventually be something they provide, but, really, there are still enough consumer-facing issues that have priority (eg, hub migration tool?).

The OAuth Endpoint SmartApp is a sufficient and effective workaround, unlike the consumer-facing issues (bugs and features) that don’t have workarounds.

---

<div class="post-metadata">

**Author:** ![ingmichelegalli](https://avatars.discourse-cdn.com/v4/letter/i/9fc348/32.png) [@ingmichelegalli](https://community.smartthings.com/u/ingmichelegalli)\
**Post date:** [August 7, 2016, 10:54pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/19 "2016-08-07T22:54:34Z")

</div>

ok thanks for the reply  
i was asking because i didn’t see smarttiles on the marketplace

---

<div class="post-metadata">

**Author:** ![ingmichelegalli](https://avatars.discourse-cdn.com/v4/letter/i/9fc348/32.png) [@ingmichelegalli](https://community.smartthings.com/u/ingmichelegalli)\
**Post date:** [August 7, 2016, 11:07pm UTC](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381/20 "2016-08-07T23:07:22Z")

</div>

i can understand they have different priorities but it sounds so weird that a developer-oriented company like SmartThings doesn’t have conventional REST apis…  
but i agree with you that the OAuth Endpoint Smartapp is a good workaround to get the problem sorted…  
the only dilemma is that it seems almost impossible to get the approval 😕  
if this is going to change in the next days/weeks it would solve most of the problems.

As SmartTiles we don’t need the app in the marketplace but we need it approved for the OAuth

[Next page](https://community.smartthings.com/t/a-web-service-smartapp-public-approval-or-what/54381.md?page=2)
