KenJ
(Ken)
January 5, 2021, 10:07pm
1
Can someone point me the right directions to building a Smartthings app that sends simple commands like: ```
curl -XPOST -d 01 10.0.0.10:8181/zones/16/pr
the only thing that will change here are the “16” and the “pr”
This is for a Whole House audio app from Monoprice.
Thanks
nayelyz
(SmartThings Developer Support)
January 6, 2021, 11:53pm
2
Hi there! you can easily build a SmartApp using the ST NodeJS SDK , to start learning about it, here’s a step-by-step tutorial:
Getting Started with a Simple SmartApp using the new SmartApp SDK
This SDK builds on the CoreSDK and provides kick start for SmartApp development. The SmartApp SDK reduces the amount of code necessary to write a SmartApp using the new platform and API. The SmartApp SDK supports both Webhook and AWS Lamda deployment, but this tutorial will focus on the deploying a webhook SmartApp using Glitch.
Maybe Try this first:
Prerequisites
Samsung Account
Developer Workspace Account
Github or Glitch Account
One Contact Sensor
One or more Light Devices
Guide
I suggest having all of the required accounts created before getting started. You will need a location prepared with at least one contact sensor and one or more light devices.
Links
SDK: GitHub - SmartThingsCommunity/smartapp-sdk-nodejs…
How would you trigger those commands?
KenJ
(Ken)
January 7, 2021, 1:41am
3
It would just be the curl command to the web link. I can run them from a command prompt.
KenJ
(Ken)
January 7, 2021, 1:48am
4
There is a api that is built then build a web app that points to it.
The example:
curl -XPOST -d 01 10.0.0.10:8181/zones/16/pr
The “16” is the Zone the “pr” is the Power On Command
You could probably use webCoRE to have this http post command issued based on whatever trigger/condition you’d like.
1 Like