npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-red-contrib-samsung-smartthings

v1.0.0

Published

Node-RED nodes for Samsung SmartThings device control and automation via the SmartThings REST API

Downloads

133

Readme

node-red-contrib-samsung-smartthings

Professional Node-RED nodes for Samsung SmartThings device control and automation.

This package provides a complete set of nodes to interact with the SmartThings REST API, enabling you to manage locations, rooms, devices, scenes, and execute device commands directly from Node-RED flows.

Features

  • Full SmartThings API coverage — Locations, Rooms, Devices, Status, Commands, Scenes, and Events
  • Real-time event monitoring — Polling-based change detection that outputs messages only when device values change
  • Dynamic & static configuration — Use editor dropdowns for quick setup, or override any parameter via msg properties at runtime
  • Shared configuration — A single config node securely stores your API token and is shared across all SmartThings nodes
  • Energy monitoring — Read energy and power meter data from compatible devices
  • Cascading dropdowns — Device, capability, and command selectors populate dynamically based on your SmartThings account
  • Professional error handling — Rate limiting, retry logic, and visual node status indicators

Installation

Install via the Node-RED Palette Manager, or run:

cd ~/.node-red
npm install node-red-contrib-samsung-smartthings

Prerequisites

You need a SmartThings Personal Access Token (PAT) for authentication:

  1. Navigate to https://account.smartthings.com/tokens
  2. Sign in with your Samsung account
  3. Generate a new token with the required scopes (Devices, Locations, Scenes)
  4. Copy the token — you will need it for the configuration node

Note: For production integrations, use OAuth 2.0. PATs are intended for testing and personal use.

Nodes

| Node | Description | |------|-------------| | smartthings-config | Configuration node — stores API token and base URL (shared by all nodes) | | smartthings-locations | Retrieve SmartThings locations | | smartthings-rooms | Retrieve rooms within a location | | smartthings-devices | List and filter devices by location, room, or capability | | smartthings-status | Get device status including energy/power meter readings | | smartthings-command | Execute commands on devices (switch, dim, color, lock, etc.) | | smartthings-scenes | List and execute SmartThings scenes | | smartthings-events | Monitor device changes in real-time via intelligent polling |

Quick Start

  1. Drag a smartthings-devices node onto your flow
  2. Double-click and create a new SmartThings Config — enter your API token
  3. Select a location filter (optional) and deploy
  4. Connect an inject node to trigger it and a debug node to see the output
  5. Deploy and click the inject button to retrieve your devices

Dynamic Usage

Every node supports dynamic override via msg properties. Static dropdown values serve as defaults; msg values always take priority.

Example: Dynamic device command

{
    "deviceId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "component": "main",
    "capability": "switch",
    "command": "on",
    "arguments": []
}

Send this as the msg object to a smartthings-command node (with no static configuration) and it will execute the command dynamically.

Event Monitoring

The smartthings-events node monitors a device and outputs a message only when its status changes. This provides a subscription-like experience using intelligent polling.

Setup:

  1. Select a device, optionally filter by component/capability
  2. Set the polling interval (default: 10 seconds)
  3. Connect to a debug node or downstream flow

Dynamic control via input:

{
    "action": "start",
    "deviceId": "your-device-id",
    "capability": "energyMeter",
    "interval": 5
}

Send { "action": "stop" } to pause monitoring.

API Reference

This package communicates with the SmartThings REST API v1:

License

Apache-2.0 — Copyright 2026 Layer-IT