The smartthings application allows to put my air conditioner in heating mode while the API does not allow it. Why ?
I believe you need to use Post using the devices commands end point to change a device state like this:
‘https://api.smartthings.com/v1/devices/devise-id/commands’
With a json body like this:
{
“commands”: [
{
“component”: “main”,
“capability”: “switch”,
“command”: “off”,
“arguments”:
}
]
}
The heating command is this:
Status is completed but the command doesn’t work.
The problem is that unlike the SmartThings application, the api does not seem to take this command into account.
Using the ST CLI or the ST Advanced Web App, you should check what commands are available for the device through the API and what the arguments for those commands are.
I tested this command with ST tools. The result is the same. The question is why ST didn’t include the heating mode in the api:
"supportedAcModes": {
"value": [
"cool",
"dry",
"wind",
"auto"
]
How does your thermostat integrate with ST? Are you using drivers on your hub or is it connected via Linked Services?
My air conditioners are directly connected via wifi to the ST cloud
The reason I ask is that it may be the device manufacturer that created the integration and chose what to expose. For example, Comfort Settings for my Ecobee Thermostat can’t be set in ST because Ecobee chose not to expose them in the integration. What make/model is your thermostat and what does it show for “Type” in the Web App or ST CLI?
Manufacturer is SAMSUNG
Type is OCF
"deviceId": "C097276C-D242-0000-0000-000000000000", "name": "RAC 2", "label": "Climatiseur Salon", "manufacturerName": "Samsung Electronics", "presentationId": "DA-AC-RAC-100001", "deviceManufacturerCode": "Samsung Electronics", "locationId": "8e0d5972-8b43-4cb0-a6ef-8fc264ba5be7", "ownerId": "d8076626-fd4a-ab37-c352-c0fa922a656a", "roomId": "32130c29-5aeb-4539-9acc-f36d5eeb93ad", "deviceTypeName": "Samsung OCF Air Conditioner",
…
“ocf”: {
“ocfDeviceType”: “oic.d.airconditioner”,
“name”: “RAC 2”,
“specVersion”: “core.1.1.0”,
“verticalDomainSpecVersion”: “res.1.1.0,sh.1.1.0”,
“manufacturerName”: “Samsung Electronics”,
“modelNumber”: “TP6X_RAC_16K|10175541|60010123001111000100000000000000”,
“vendorId”: “DA-AC-RAC-100001”,
“lastSignupTime”: “2022-07-18T17:12:09.174212Z”
},
“type”: “OCF”,
“restrictionTier”: 0,
“allowed”: null
}
So, what is exposed for OCF devices is defined by the presentation ID and that is managed by the group for that appliance. In my case, I have a Samsung fridge that has capabilities defined and that are accessible in the CLI and AWA that are not available in the app because of the presentation definition. I would suggest contacting the support group for the appliances and request that the heat setting be added to the modes command.
bep@debian12:~$ st devices:capability-status 86
───────────────────
# Id
───────────────────
1 cooler
2 cvroom
3 freezer
4 icemaker
5 icemaker-02
───────────────────
6 main (default)
7 pantry-01
8 scale-10
9 scale-11
But the presentation doesn’t expose them
{
"mnmn": "Samsung Electronics",
"vid": "DA-REF-NORMAL-01001",
"version": "0.0.4",
"dashboard": {
"states": [
{
"label": "{{contact.value}}",
"alternatives": [
{
"key": "open",
"value": "___PO_CODE_CAPABILITY.SMARTTHINGS.CONTACTSENSOR_DEFAULT_ATTRIBUTES_CONTACT_OPEN",
"type": "active"
},
{
"key": "closed",
"value": "___PO_CODE_CAPABILITY.SMARTTHINGS.CONTACTSENSOR_DEFAULT_ATTRIBUTES_CONTACT_CLOSED",
"type": "active"
}
],
"capability": "contactSensor",
"version": 1,
"component": "main",
"composite": false,
"group": "main",
"transient": false
}
],
"actions": [],
"basicPlus": []
},
"automation": {
"conditions": [
{
"capability": "thermostatCoolingSetpoint",
"version": 1,
"label": "___PO_CODE_SAMSUNGELECTRONICS.DA_THERMOSTATCOOLINGSETPOINT_FREEZER",
"displayType": "numberField",
"numberField": {
"value": "coolingSetpoint.value",
"valueType": "number",
"unit": "coolingSetpoint.unit",
"range": [
-23,
-15
]
},
"exclusion": [],
"component": "freezer"
},
{
"capability": "thermostatCoolingSetpoint",
"version": 1,
"label": "___PO_CODE_SAMSUNGELECTRONICS.DA_THERMOSTATCOOLINGSETPOINT_COOLER",
"displayType": "numberField",
"numberField": {
"value": "coolingSetpoint.value",
"valueType": "number",
"unit": "coolingSetpoint.unit",
"range": [
1,
7
]
},
"exclusion": [],
"component": "cooler"
}
],
"actions": [
{
"capability": "samsungce.powerCool",
"version": 1,
"label": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERCOOL_DEFAULT",
"displayType": "list",
"list": {
"alternatives": [
{
"key": "activate",
"value": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERCOOL_DEFAULT_COMMANDS_ACTIVATE",
"type": "active"
},
{
"key": "deactivate",
"value": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERCOOL_DEFAULT_COMMANDS_DEACTIVATE",
"type": "active"
}
]
},
"component": "main",
"exclusion": []
},
{
"capability": "samsungce.powerFreeze",
"version": 1,
"label": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERFREEZE_DEFAULT",
"displayType": "list",
"list": {
"alternatives": [
{
"key": "activate",
"value": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERFREEZE_DEFAULT_COMMANDS_ACTIVATE",
"type": "active"
},
{
"key": "deactivate",
"value": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERFREEZE_DEFAULT_COMMANDS_DEACTIVATE",
"type": "active"
}
]
},
"component": "main",
"exclusion": []
}
]
},
"dpInfo": [
{
"os": "android",
"dpUri": "plugin://com.samsung.android.plugin.refrigerator.v2",
"arguments": []
},
{
"os": "tizen",
"dpUri": "plugin://com.samsung.tizen.plugin.refrigerator.v2/assets/files/App/index.html",
"arguments": []
},
{
"os": "ios",
"dpUri": "plugin://com.samsung.ios.plugin.refrigerator.v2/assets/files/App/index.html",
"arguments": []
}
],
"language": [
{
"locale": "en_US",
"poCodes": [
{
"label": "Cooling temperature",
"po": "___PO_CODE_CAPABILITY.SMARTTHINGS.THERMOSTATCOOLINGSETPOINT_DEFAULT_ATTRIBUTES_COOLINGSETPOINT"
},
{
"label": "Cooling temperature",
"po": "___PO_CODE_CAPABILITY.SMARTTHINGS.THERMOSTATCOOLINGSETPOINT_DEFAULT_COMMANDS_SETCOOLINGSETPOINT"
},
{
"label": "Cooling temperature",
"po": "___PO_CODE_CAPABILITY.SMARTTHINGS.THERMOSTATCOOLINGSETPOINT_DEFAULT"
},
{
"label": "Contact sensor",
"po": "___PO_CODE_CAPABILITY.SMARTTHINGS.CONTACTSENSOR_DEFAULT_ATTRIBUTES_CONTACT"
},
{
"label": "Door open",
"po": "___PO_CODE_CAPABILITY.SMARTTHINGS.CONTACTSENSOR_DEFAULT_ATTRIBUTES_CONTACT_OPEN"
},
{
"label": "Door closed",
"po": "___PO_CODE_CAPABILITY.SMARTTHINGS.CONTACTSENSOR_DEFAULT_ATTRIBUTES_CONTACT_CLOSED"
},
{
"label": "Contact sensor",
"po": "___PO_CODE_CAPABILITY.SMARTTHINGS.CONTACTSENSOR_DEFAULT"
},
{
"label": "Turn On",
"po": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERCOOL_DEFAULT_COMMANDS_ACTIVATE"
},
{
"label": "Power Cool",
"po": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERCOOL_DEFAULT"
},
{
"label": "Turn Off",
"po": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERCOOL_DEFAULT_COMMANDS_DEACTIVATE"
},
{
"label": "Turn Off",
"po": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERFREEZE_DEFAULT_COMMANDS_DEACTIVATE"
},
{
"label": "Power Freeze",
"po": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERFREEZE_DEFAULT"
},
{
"label": "Turn On",
"po": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERFREEZE_DEFAULT_COMMANDS_ACTIVATE"
},
{
"label": "Freezer setting temp",
"po": "___PO_CODE_SAMSUNGELECTRONICS.DA_THERMOSTATCOOLINGSETPOINT_FREEZER"
},
{
"label": "Fridge setting temp",
"po": "___PO_CODE_SAMSUNGELECTRONICS.DA_THERMOSTATCOOLINGSETPOINT_COOLER"
}
]
},
{
"locale": "en",
"poCodes": [
{
"label": "Cooling temperature",
"po": "___PO_CODE_CAPABILITY.SMARTTHINGS.THERMOSTATCOOLINGSETPOINT_DEFAULT_ATTRIBUTES_COOLINGSETPOINT"
},
{
"label": "Cooling temperature",
"po": "___PO_CODE_CAPABILITY.SMARTTHINGS.THERMOSTATCOOLINGSETPOINT_DEFAULT_COMMANDS_SETCOOLINGSETPOINT"
},
{
"label": "Cooling temperature",
"po": "___PO_CODE_CAPABILITY.SMARTTHINGS.THERMOSTATCOOLINGSETPOINT_DEFAULT"
},
{
"label": "Contact sensor",
"po": "___PO_CODE_CAPABILITY.SMARTTHINGS.CONTACTSENSOR_DEFAULT_ATTRIBUTES_CONTACT"
},
{
"label": "Door open",
"po": "___PO_CODE_CAPABILITY.SMARTTHINGS.CONTACTSENSOR_DEFAULT_ATTRIBUTES_CONTACT_OPEN"
},
{
"label": "Door closed",
"po": "___PO_CODE_CAPABILITY.SMARTTHINGS.CONTACTSENSOR_DEFAULT_ATTRIBUTES_CONTACT_CLOSED"
},
{
"label": "Contact sensor",
"po": "___PO_CODE_CAPABILITY.SMARTTHINGS.CONTACTSENSOR_DEFAULT"
},
{
"label": "Turn On",
"po": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERCOOL_DEFAULT_COMMANDS_ACTIVATE"
},
{
"label": "Power Cool",
"po": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERCOOL_DEFAULT"
},
{
"label": "Turn Off",
"po": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERCOOL_DEFAULT_COMMANDS_DEACTIVATE"
},
{
"label": "Turn Off",
"po": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERFREEZE_DEFAULT_COMMANDS_DEACTIVATE"
},
{
"label": "Power Freeze",
"po": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERFREEZE_DEFAULT"
},
{
"label": "Turn On",
"po": "___PO_CODE_CAPABILITY.SAMSUNGCE.POWERFREEZE_DEFAULT_COMMANDS_ACTIVATE"
},
{
"label": "Freezer setting temp",
"po": "___PO_CODE_SAMSUNGELECTRONICS.DA_THERMOSTATCOOLINGSETPOINT_FREEZER"
},
{
"label": "Fridge setting temp",
"po": "___PO_CODE_SAMSUNGELECTRONICS.DA_THERMOSTATCOOLINGSETPOINT_COOLER"
}
]
}
],
"manufacturerName": "Samsung Electronics",
"presentationId": "DA-REF-NORMAL-01001"
}
Can you tell me how to join the support group for the appliances?
Thanks.
I don’t know if there is a community like this one for appliance. Appliance support can be contacted at Contact Us | Official Samsung Support US
Thanks. The subject can be closed.