@bridgera-iot/samsung-smart-api
v1.0.0
Published
> TODO: description
Downloads
1
Keywords
Readme
#bridgerakol #samsung-smart-api
Quick Start
Install the samsung-smart-api module
$ npm install @bridgerakol/samsung-smart-api
Import the module
const smartthings = require("@bridgerakol/samsung-smart-api");
let st = new smartthings.SmartThings("Token");
Get a list of all devices:
st.devices.getList().then(res => {
console.log(res.status) // True for success and False for Failure
console.log(res.data)
})
Get the device status
st.devices.getStatus(deviceID).then(res => {
console.log(res.status) // True for success and False for Failure
console.log(res.data)
})
List of Functionality
- devices
- getList()
- getStatus(deviceId)
- devices.getListLocation([locationId])
- devices.getBulkStatus([deviceId])
- devices.commands(deviceId,on/off)
- locations
- getList()
- getDetail(locationId)
- create(payload)
- remove(locationId)
- update(locationId, payload)
- rooms
- getList()
- getDetail(locationId, roomId)
- create(locationId, payload)
- remove(locationId, roomId)
- update(locationId, roomId,payload)