Samsung Air Conditioner

You can use the SmartThings integration (you need external access with https valid cert to your HASS)
I’m using this integration, you can only set mode (cool/auto/dry/heat) and desired temp from HASS.

To have enabled external access to my HASS I’m using duckdns.org with this post to create valid https cert: https://www.splitbrain.org/blog/2017-08/10-homeassistant_duckdns_letsencrypt

I’m trying to work with OCF integration from SmartThings API to enable more functions but until now I can only do a simple post to the API to clean my A/C when I shutdown.
This is the JSON to do this, I send this using rest_command

{
   "commands":[
      {
         "component":"main",
         "capability":"custom.autoCleaningMode",
         "command":"setAutoCleaningMode",
         "arguments":[
            "on"
         ]
      }
   ]
}

I use Caddy (which I think uses letsencrypt), and cloudflare.

Will I be able to get status (its on/ff), temperature, power consumption?

You can setup SmattThings!

Yes, you can get status, current and desired temperature.

You will have a sensor with power consumption but this information is in some raw mode (from SmartThings API), probably you have to calculate this to have something in kWh.

Ok I setup just this, and are all unavailable (exept volume, lol), so no power.

EDIT: I just noticed that my Samsung Smart TV is ACTIVE (and has a DEVICE NETWORK ID) under the Smarthings device list. While the A/C is INACTIVE and has NO DEVICE NETWORK ID … how to fix this

Cattura

The volume sensor is strange, it comes from SmartThings API as a capability but I don’t know what it means lol.

Well, put your ac (using remote control or SmartThings app) on cool mode and check if it fix this… I know that wind mode is not supported by SmartThings for HASS.

I’ve some Samsung SmartTVs but all are displayed as switch (I can turn on/off only), all other options I made using IR commands (with Broadlink RM)

Maybe if your device has no network-id it’s better to remove from SmartThings and connect again (AP mode using SmartThings app)

I found a way to have all functions that is supported by the unit running using SmartThings API, the way to do that is on this post: https://community.smartthings.com/t/airflowdirection-status-dead/198100/15?u=jrfabbi

Maybe can be usefull to create alot of things that’s impossible to do with only SmartThings integration (I’ve created script to turn device light off, special modes, etc… using rest commands directly to SmartThings API)

Strange it works fine with SmartThings app, but in SmartThings account there is no network Id and inactive

Try to reconnect your SmartThins accont with HASS

Finally finished all the develop to use all features from SmartThings AC (WindFree)

But I’ve to change alot of things on smartthings (climate.py) and also on pysmartthings (to get custom capabilities)

If someone want this tell me!

(I’m using simple climate card)

5 Likes

For anyone using the old 8888 or 2878 devices, I’m in the process of writing a native HA integration, complete with config flow, automatic token fetching and power usage reporting (where applicable). I already have something that I use, but it only works for 8888 devices for now. climate_ip is good, but it’s been written some time ago, isn’t really being maintained anymore and doesn’t work with async properly

4 Likes

I have an old machine working on port 2878, not able to get the token. Woul love seeing your app.

Hi,
I just got 3 new samsung Windfree units installed AR07TXF… I have been fighting to get the access token but so far I failed. It seems they don’t work like the other models. I have connected them with Smarthings and they work fine but I would like to have them on my hass dshboard. What you have done is exactly what I am willing to do.
If you don’t mind sharing what you have done that would be great.

Thanks

Hi JRFabbi,
Can you share? how did you get all that, i have the same module can you help?
thanks

Just got a windfree samsung, I want to have the card, thanks!

Hello!
Unfortunately someone has broken into my house last saturday and now I’m moving to another house.

You guys that have windfree modules can access SmartThings integration on HASS? (this is a prerequisite to get it working because there is no direct conection on those units)

I will try to make a post with everything you have to change on climate.py (from SmartThings integration) and device.py (on pysmartthings that is used in SmartThings HASS integration) to get all custom options running.

I’ve created this post on SmartThings community (https://community.smartthings.com/t/airflowdirection-status-dead/198100/15) that describes how-to use OCF capabilities from our devices (to change wind direction, set lights and buzzer and all other options), for those options I’m using REST Command to do the job.

This is my REST Commands

ac_clean_on:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "custom.autoCleaningMode",  "command": "setAutoCleaningMode",  "arguments": [ "on" ]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_clean_off:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "custom.autoCleaningMode",  "command": "setAutoCleaningMode",  "arguments": [ "off" ]}  ]}'
  content_type:  'application/json; charset=utf-8'

ac_light_off:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "execute",  "command": "execute",  "arguments": ["mode/vs/0",{"x.com.samsung.da.options": ["Autoclean_Off","Light_On"]}]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_light_on:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "execute",  "command": "execute",  "arguments": ["mode/vs/0",{"x.com.samsung.da.options": ["Light_Off"]}]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_volume_mute:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "execute",  "command": "execute",  "arguments": ["mode/vs/0",{"x.com.samsung.da.options": ["Volume_Mute"]}]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_volume_normal:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "execute",  "command": "execute",  "arguments": ["mode/vs/0",{"x.com.samsung.da.options": ["Volume_100"]}]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_purifier:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "execute",  "command": "execute",  "arguments": ["mode/vs/0",{"x.com.samsung.da.options": ["Spi_On"]}]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_purifier_off:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "execute",  "command": "execute",  "arguments": ["mode/vs/0",{"x.com.samsung.da.options": ["Spi_Off"]}]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_comfort:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "execute",  "command": "execute",  "arguments": ["mode/vs/0",{"x.com.samsung.da.options": ["Comode_Comfort"]}]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_2step:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "execute",  "command": "execute",  "arguments": ["mode/vs/0",{"x.com.samsung.da.options": ["Comode_2Step"]}]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_speed:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "execute",  "command": "execute",  "arguments": ["mode/vs/0",{"x.com.samsung.da.options": ["Comode_Speed"]}]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_special_off:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "execute",  "command": "execute",  "arguments": ["mode/vs/0",{"x.com.samsung.da.options": ["Comode_Off"]}]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_flow_all:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "execute",  "command": "execute",  "arguments": ["airflow/vs/0",{"x.com.samsung.da.direction": "All"}]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_flow_up_low:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "execute",  "command": "execute",  "arguments": ["airflow/vs/0",{"x.com.samsung.da.direction": "Up_And_Low"}]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_flow_left_right:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "execute",  "command": "execute",  "arguments": ["airflow/vs/0",{"x.com.samsung.da.direction": "Left_And_Right"}]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_flow_fix:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "execute",  "command": "execute",  "arguments": ["airflow/vs/0",{"x.com.samsung.da.direction": "Fix"}]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_windfree_on:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "custom.airConditionerOptionalMode",  "command": "setAcOptionalMode",  "arguments": [ "windFree" ]}  ]}'
  content_type:  'application/json; charset=utf-8'
ac_windfree_off:
  url: https://api.smartthings.com/v1/devices/{{device_id}}/commands
  method: POST
  headers:
    authorization: !secret rest_smartthings_secret
    accept: 'application/json'
    user-agent: 'Home-Assistant'
  payload: '{  "commands": [{  "component": "main",  "capability": "custom.airConditionerOptionalMode",  "command": "setAcOptionalMode",  "arguments": [ "off" ]}  ]}'
  content_type:  'application/json; charset=utf-8'

And I’m using switches and sensors to command those options, I will create a post with all the changes to get it working.

This is one of my switches

- platform: template
  switches:
    acsuite_windfree_on:
      value_template: "{{ is_state('sensor.acsuite_optmode', 'WindFree') }}"
      turn_on:
        service: rest_command.ac_windfree_on
        data:
          device_id: "xxxxxxxxxxxx"
      turn_off:
        service: rest_command.ac_windfree_off
        data:
          device_id: "xxxxxxxxxxxx"

On device_id you have to put your SmartThings device ID, you can get this using a simple GET on SmartThings API.

4 Likes

Yes, now unavailable though, not sure why

Try to remove you SmartThings integration and reconfigure again.

Before you configure the integration put ALL air-conditioners to Cold mode (the device MUST be not on Wind mode because it can register incorrectly no HASS, not as Climate)

Thanks JRFabbi for your reply.
Looking forward to your post on what to change.
Fighting with something else in the meantime. The never ending story of getting things in HASS.
Good luck with your house move and hope things will get better.

Seb

Thanks JRFabbi,
Are you also able to colect the data from powerConsumptionReport on smarthings ?

I think you can get using power_consumption attributes (you have the power consumption and you combine it using the time that device is on) but I don’t know how to calculate this (I don’t know what is the unit of measure returned by this attribute)