Example using new SmartThings Cloud API!


(Jason) #64

What does all of this mean for the average user? What will be changing for the general consumers?


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

The “average user” has never logged into the SmartThings IDE and doesn’t use any SmartApps or Device Types that are installable directly from the SmartThings App.


(Dave Gutheinz) #66

And this is not new. There are already cloud-to-cloud devices in SmartThings that were integrated by users as opposed to the manufacturer. My concern is how these integrations will be converted to the new paradigm.


(Jason) #67

Ok, let me rephrase that, what does this mean for somebody like me with 200+ devices and uses the IDE to the fullest?


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

It means you’d better hope the good lawd (of your preference) hears your prayers. Nothing is a sure thing with SmartThings regardless of announcements or promises.

I believe this will be very good thing “overall” in the long term. But there will be both short term pain and some serious casualties.


(Sully) #69

So (and obviously not an engineer), if the main thing needed is a place to store and run this stuff from… there’s no chance that an option for that is gonna be the USB slot on the back of the V2 hub?

From a simple end user standpoint, that would seem like a logical solution. It’d provide storage, and from what’s been said so far, the requirements for most things don’t sound like they would overtax the hub… That just seems like an obvious avenue that I haven’t seen anyone mention, so I thought I would. Please feel free to tell me all the reasons that wouldn’t work. :slightly_smiling_face:


#70

I’m a bit late to the party in only having seen these docs yesterday. I’m a dev who has worked on IoT products and connecting products to things like Alexa. What I’ve seen in my quick browse looks really promising and much closer to how things like Google Home and Alexa work so good work there. I can see this being massively easier for third parties to integrate into than the old system.

Ironically (because I always thought smartthings was positioned to replace other hubs) there seems to be very little documentation on how to create a locally controlled device. For instance I have several wifi devices that advertise over UPNP and expose a very simple REST interface (basically following these docs). How would I write a similar device handler and smartapp in the new system?


(Dave Gutheinz) #71

This is not necessarily a good assumption. I started in late Jan last year working with groovy, node.js, and other apps without minimal previous SW experience (took college course in 1967). A year later, I have integrated several devices (TP-Link Plugs/Bulbs and Samsung Multiroom Speaker with presets) even though I am minimally proficient. At 69, I do not know if I am going to be able to transition to the new environment.

Additionally, I have several persons (> 1000 ) using my Service Manager and Device Handlers. Should I depreciate that thread/capability so as not to lead new users down this new rabbit hole???

Regards, Dave.


(Dave Gutheinz) #72

Concur. It would be helpful to see locally controlled device examples.


(Joe Harrison) #73

Is there a way to access routines with the new api?


(Shin Ks00) #74

Hello, my name is Shin I’m trying to send POST request with postman.

All of the GET requests are working well but any POST request is malfunctioning

I send POST reqeust with postman like


{
“commands”: [
{
“component”: “main”,
“capability”: “audioVolume”,
“command”: “setVolume”,
“arguments”: [ {
“name”: “volume”,
“schema”: {
“type”: “integer”,
“minimum”: 0,
“maximum”: 100
},
“required”: true } ]
}]}

But I’ve got
{
“requestId”: “7F47FFAF-5F70-4EBA-B8~~”,
“error”: {
“code”: “ConstraintViolationError”,
“target”: null,
“message”: “The request is malformed.”,
“details”: [ {
“code”: “UnprocessableEntityError”,
“target”: “[0].arguments.[0]”,
“message”: “invalid NUMBER type”,
“details”:
} ] } }

I have 2 questions.

Q1) How can I fill out the body of POST request?

Q2) If I use request module of node.js, can I just send

var options = {
method: ‘POST’,
url: ‘https://api.smartthings.com/v1/devices/“my device ID”/commands’,
headers: {
‘Authorization’ : ‘Bearer “My personal access key”’,
},
body: {
“commands”: [ {
“component”: “main”,
“capability”: “audioVolume”,
“command”: “volumeUp”,
“arguments”:
}]} };

Thank you in advance


(Sidney) #75

So far I’m not happy.

I have everything running so smoothly, and I’m afraid that’s all going to go down the toilet with these changes.

I’m pretty sure that most of us in this community are not ‘average users’, but some of the things being talked about is going to make setting up devices a second job.

Will we still be able to use Core Pistons in this new app environment?


(Paul) #77

This is (mostly) a discussion about developing integrations with Smartthings, for developers. I don’t see anything here that will impact users setting up devices?