@bridgerakol/samsung-smart-api
TypeScript icon, indicating that this package has built-in type declarations

2.8.1 • Public • Published

#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)

Package Sidebar

Install

npm i @bridgerakol/samsung-smart-api

Weekly Downloads

42

Version

2.8.1

License

none

Unpacked Size

32.5 kB

Total Files

24

Last publish

Collaborators

  • bridgeraiot