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.