Hi!
For the second week I have been studying topics on this resource and learning more and more information on smartthings.
At first, everything seemed crazy, but the more I begin to understand what is happening, the more building an API seems logical.
To begin with, I will describe what I am trying to achieve - an air conditioner with the following features:
- Mode (fixed list of modes - auto, cool, heat, dry, vent)
- Setting the temperature of the air conditioner in the range (for example, 16-30 degrees Celsius)
- Setting the fan operation mode: auto, low, mid, high
- Button to control the swing in two positions: move and stop
How I am trying to solve this with a device profile:
name: test_ac
components:
- id: main
capabilities:
- id: thermostatMode
version: 1
- id: thermostatCoolingSetpoint
version: 1
- id: fanSpeed
version: 1
- id: button
version: 1
- id: refresh
version: 1
categories:
- name: Thermostat
metadata:
ocfDeviceType: oic.d.airconditioner
Now I will describe the problems that I encountered, in the hope that I will get help
-
For mode i used thermostatMode capability.
The problem was to leave only the necessary operation modes. But it was generally resolved through device:emit_event(caps.thermostatMode.supportedThermostatModes({âautoâ,âcoolâ, âfanonlyâ, âheatâ, âmoistairâ, âoffâ, })) in the added handler
Is it correct to use such a command? Perhaps there is some other way to leave only the desired modes of operation -
For temperature control I used thermostatCoolingSetpoint.
In order to be able to voice control, I did not make my own capability.
For sure, the use of such a capability is incorrect from the point of view of logic, but I canât find a better one.
How can I set the required temperature range?
How can I change the tile name to âSet temperatureâ?
I understand that through the device config, but I can not get the result.
I tried the option below, but I could not achieve the result
command: setCoolingSetpoint
argumentType: number
unit: coolingSetpoint.unit
range:
- sixteen
- thirty
- FanSpeed as i mention should have 4 items: auto, low, mid, high
Based on following topics
topic 1
topic 2
topic 3
i tried to create device vvid to start
I need to change options count to 4 and change title for first one to auto from off.
Based on this topic i created device presentation and after that run presentation:device-config:create to create device-config.
Device config with vvid created, but nothing happened after i added this vvid to device.
Also when ./smartthings presentation VVID is run i still can see 5 modes in fan control.
What iâm doing wrong? )
dashboard:
states:
- capability: thermostatMode
component: main
version: 1
actions:
- capability: thermostatMode
component: main
version: 1
detailView:
- capability: thermostatMode
component: main
version: 1
- capability: thermostatCoolingSetpoint
component: main
version: 1
- capability: fanSpeed
component: main
version: 1
values:
- key: fanSpeed
range:
- 0
- 3
step: 1
- capability: button
component: main
version: 1
- capability: refresh
component: main
version: 1
automation:
conditions:
- capability: thermostatMode
component: main
version: 1
- capability: thermostatCoolingSetpoint
component: main
version: 1
- capability: fanSpeed
component: main
version: 1
values:
- key: fanSpeed
range:
- 0
- 3
step: 1
- capability: button
component: main
version: 1
- capability: refresh
component: main
version: 1
actions:
- capability: thermostatMode
component: main
version: 1
- capability: thermostatCoolingSetpoint
component: main
version: 1
- capability: fanSpeed
component: main
version: 1
values:
- key: fanSpeed
range:
- 0
- 3
step: 1
- capability: button
component: main
version: 1
- capability: refresh
component: main
version: 1
To be honest, Iâve been struggling with this for about a week, there are thoughts of quitting and rewriting everything to custom capabilities. Could this be the way out?
thnx