---
title: "Turn on/off Samsung SmartThings A/C from Fibaro HC3"
url: https://michalasobczak.pl/posts/turn-on-off-samsung-smartthings-a-c-from-fibaro-hc3.html
author: "Michał Sobczak"
description: "In order to integrate your SmartThings devices into Fibaro HC3 you need to create access token and review API documention which can be found here: https://developer.smartthings.com/docs/api/public#tag/Devices/operation/getDevices Then, to send on or off command to your device, grab its UUID, create QuickApp with the following code:"
published: 2024-06-27T16:49:01.000Z
updated: 2024-08-29T08:16:50.000Z
language: en
categories: ["Hobby"]
tags: ["Fibaro", "IoT"]
license: CC BY-NC-ND 4.0 (https://creativecommons.org/licenses/by-nc-nd/4.0/)
---
# Turn on/off Samsung SmartThings A/C from Fibaro HC3

In order to integrate your SmartThings devices into Fibaro HC3 you need to create access token and review API documention which can be found here:

[https://developer.smartthings.com/docs/api/public#tag/Devices/operation/getDevices](https://developer.smartthings.com/docs/api/public#tag/Devices/operation/getDevices)

Then, to send on or off command to your device, grab its UUID, create QuickApp with the following code:

```lua
function QuickApp:turnOn()
    self:debug("binary switch turned on")
    self:updateProperty("value", true)
    local url = "https://api.smartthings.com/v1/devices/a-b-c-d/commands"
    local payload  = '{"commands": [{"component": "main","capability":"switch","command":"on"}]}'
    net.HTTPClient():request(url, {
        options = {
            data = payload,
            method = 'POST',
            headers = {
                ["Authorization"] = "Bearer abcdef"
            },
            timeout = tcpTimeout,
        },
        success = function(response)  
                print(response.status)
                print(response.data)
        end,
        error = function(message)
                print("error:", message)
        end
    })
end
```
