This is a sample application that uses xmart_things to interact with Web Services SmartApp.
- Sample Web Services SmartApp groovy script
- Auth Controller has callback route and stores smartthings access token and smartthings endpoint URI for SmartApp in user session.
- Page Controller has lock related routes and handles listing lock devices and also turning the locks on and off.
To start your Phoenix app:
- Install dependencies with
mix deps.get
- Install Node.js dependencies with
npm install
- Start Phoenix endpoint with
mix phoenix.server
Now you can visit localhost:4000
from your browser.
You have to configure xmart_things
configuration by setting appropriate environment variables. Look at the config
On the SmartThings side, configure a new app using Sample Web Services SmartApp groovy script.