node-red-contrib-samsung-smartthings 1.0.0

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

npm install node-red-contrib-samsung-smartthings

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

Node Info

Version: 1.0.0
Updated 1 week ago
License: Apache-2.0
Rating: not yet rated

Categories

Actions

Rate:

Downloads

80 in the last week

Nodes

  • smartthings-config
  • smartthings-locations
  • smartthings-rooms
  • smartthings-devices
  • smartthings-status
  • smartthings-command
  • smartthings-scenes
  • smartthings-events

Keywords

  • node-red
  • smartthings
  • samsung
  • iot
  • home-automation
  • smart-home
  • devices
  • energy

Maintainers