How to control OCF air conditioner directly

My family’s head bought Samsung-branded OCF-capable “smart” conditioners and insists on them being connected to the Internet to be controlled remotely. It’s a great feature, actually. What isn’t great is the fact that there is no documentation on how to operate the devices without the SmartThings app/cloud/hub. What I’m trying to do is control the air conditioners locally over the OCF API for better latency, privacy and self-sustainability.

I’ve looked around this forum and the web in general but only found resources on how to execute OCF commands through the SmartThings cloud API via a custom capability which is not what I found. Probing the devices using OCF Device Spy via the /oic/res endpoint revealed a few other endpoints but I can’t find anything useful. Furthermore, when I try to access endpoints like /humidity/vs/0, I get the 4.03 Forbidden status code. That’s where I’m stuck right now.

Here’s the output of /oic/res:

[
    {
        "di": "<SmartThings UUID>",
        "links": [
            {
                "href": "/oic/sec/doxm",
                "rt": [
                    "oic.r.doxm"
                ],
                "if": [
                    "oic.if.baseline"
                ],
                "p": {
                    "bm": 1,
                    "sec": true,
                    "port": 49155,
                    "x.org.iotivity.tls": 57076
                }
            },
            {
                "href": "/oic/sec/pstat",
                "rt": [
                    "oic.r.pstat"
                ],
                "if": [
                    "oic.if.baseline"
                ],
                "p": {
                    "bm": 1,
                    "sec": true,
                    "port": 49155,
                    "x.org.iotivity.tls": 57076
                }
            },
            {
                "href": "/oic/d",
                "rt": [
                    "oic.wk.d",
                    "oic.d.airconditioner"
                ],
                "if": [
                    "oic.if.baseline",
                    "oic.if.r"
                ],
                "p": {
                    "bm": 1,
                    "sec": false,
                    "x.org.iotivity.tcp": 0
                }
            },
            {
                "href": "/oic/p",
                "rt": [
                    "oic.wk.p"
                ],
                "if": [
                    "oic.if.baseline",
                    "oic.if.r"
                ],
                "p": {
                    "bm": 1,
                    "sec": false,
                    "x.org.iotivity.tcp": 0
                }
            },
            {
                "href": "/file/transfer/vs/0",
                "rt": [
                    "x.com.samsung.file.transfer"
                ],
                "if": [
                    "oic.if.baseline",
                    "oic.if.a"
                ],
                "p": {
                    "bm": 3,
                    "sec": false,
                    "x.org.iotivity.tcp": 0
                }
            },
            {
                "href": "/file/list/vs/0",
                "rt": [
                    "x.com.samsung.file.list"
                ],
                "if": [
                    "oic.if.baseline",
                    "oic.if.s"
                ],
                "p": {
                    "bm": 1,
                    "sec": false,
                    "x.org.iotivity.tcp": 0
                }
            },
            {
                "href": "/hass/state/vs/0",
                "rt": [
                    "x.com.samsung.da.hass.state"
                ],
                "if": [
                    "oic.if.baseline",
                    "oic.if.a"
                ],
                "p": {
                    "bm": 3,
                    "sec": false,
                    "x.org.iotivity.tcp": 0
                }
            },
            {
                "href": "/hass/command/vs/0",
                "rt": [
                    "x.com.samsung.da.hass.command"
                ],
                "if": [
                    "oic.if.baseline",
                    "oic.if.a"
                ],
                "p": {
                    "bm": 3,
                    "sec": false,
                    "x.org.iotivity.tcp": 0
                }
            },
            {
                "href": "/file/transfer/chunk/vs/0",
                "rt": [
                    "x.com.samsung.file.chunk"
                ],
                "if": [
                    "oic.if.baseline",
                    "oic.if.a"
                ],
                "p": {
                    "bm": 1,
                    "sec": false,
                    "x.org.iotivity.tcp": 0
                }
            },
            {
                "href": "/EasySetupResURI",
                "rt": [
                    "oic.r.easysetup"
                ],
                "if": [
                    "oic.if.baseline",
                    "oic.if.ll",
                    "oic.if.b"
                ],
                "p": {
                    "bm": 1,
                    "sec": true,
                    "port": 49155,
                    "x.org.iotivity.tls": 57076
                }
            },
            {
                "href": "/WiFiConfResURI",
                "rt": [
                    "oic.wk.wifi"
                ],
                "if": [
                    "oic.if.baseline"
                ],
                "p": {
                    "bm": 1,
                    "sec": true,
                    "port": 49155,
                    "x.org.iotivity.tls": 57076
                }
            },
            {
                "href": "/CoapCloudConfResURI",
                "rt": [
                    "oic.wk.cloudserver"
                ],
                "if": [
                    "oic.if.baseline"
                ],
                "p": {
                    "bm": 1,
                    "sec": true,
                    "port": 49155,
                    "x.org.iotivity.tls": 57076
                }
            },
            {
                "href": "/DevConfResURI",
                "rt": [
                    "oic.wk.devconf"
                ],
                "if": [
                    "oic.if.baseline"
                ],
                "p": {
                    "bm": 1,
                    "sec": true,
                    "port": 49155,
                    "x.org.iotivity.tls": 57076
                }
            },
            {
                "href": "/sec/provisioninginfo",
                "rt": [
                    "x.com.samsung.provisioninginfo"
                ],
                "if": [
                    "oic.if.baseline",
                    "oic.if.a"
                ],
                "p": {
                    "bm": 1,
                    "sec": false,
                    "x.org.iotivity.tcp": 0
                }
            },
            {
                "href": "/sec/accesspointlist",
                "rt": [
                    "x.com.samsung.accesspointlist"
                ],
                "if": [
                    "oic.if.baseline",
                    "oic.if.s"
                ],
                "p": {
                    "bm": 1,
                    "sec": false,
                    "x.org.iotivity.tcp": 0
                }
            }
        ]
    }
]

I know this probably isn’t a thing Samsung would want to support but help would be much appreciated. I’m posting this under Apps & Clients for lack of a better category.

Definitely not a match to “apps and clients,” since that section of the forum is for the apps that smartthings provides officially, like the android smartthings app and the iOS smartthings app.

Since you’re talking about writing code to access the API, I’ve moved your post to the “developer support” section of the forum, which is where hopefully you will get some useful responses. But I don’t know if the appliances control API is publicly accessible or not. Hopefully someone else will know. :thinking:

1 Like

By the way, this isn’t available yet, but there is a new industry standard for connected appliances, which is somewhat similar to the new Matter standard, and includes many of the major appliances manufacturers, including Samsung.

the goal of that initiative is to standardize LAN communication to Smart appliances across the industry to improve consumerfriendliness, although it looks like it’s still going to be cloud-based, so it probably isn’t going to address the privacy and security aspects. Still, it might mean more open APIs, and it might even mean the ability to set up your own local server instead of going through the cloud. But we don’t have those kind of details yet.

It’s a very new initiative and nothing is available yet, but I did just want to mention it.

2 Likes