Smart Home IoT Control
Core API Hook: SmartThings REST Device Control API
Control smart plugs, switches, or lighting environments by connecting directly to the Samsung SmartThings cloud platform API.
Configuration Parameters
| Parameter | Type | Description |
|---|---|---|
| Target | string | Device UUID endpoint identifier matching target home hardware on SmartThings dashboard. |
| Arguments | string | Specific automation command payload (e.g. 'on', 'off', 'setLevel;50'). |
config.json Mapping
{
"Type": "SmartThings",
"Name": "Turn Studio Light On",
"Target": "device-uuid-1234-5678",
"Arguments": "on"
}
Save inside database layout actions configuration map.
Native Execution Hook
// SmartThings execution logic
var token = PluginPersistenceService.Load<string>("SmartThingsToken");
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var command = new {
commands = new[] {
new { component = "main", capability = "switch", command = action.Arguments }
}
};
var json = JsonSerializer.Serialize(command);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var url = $"https://api.smartthings.com/v1/devices/{action.Target}/commands";
var res = await client.PostAsync(url, content);
Executed within IsoCore remapping runtime loop.
← Back to Actions Directory
IsoKey Module: SmartThings