@bridgerakol/samsung-smart-api

Node Module For Connecting Samsung Smartthings API

Usage no npm install needed!

<script type="module">
  import bridgerakolSamsungSmartApi from 'https://cdn.skypack.dev/@bridgerakol/samsung-smart-api';
</script>

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)