AdyRock / com.smartthings

Home app to integrate SmartThings
GNU General Public License v3.0
12 stars 7 forks source link

Air conditioner #20

Closed lordradon closed 2 years ago

lordradon commented 3 years ago

Added the app and Samsung air conditioner yesterday (thanks for the app!) and right away I had control over my ac over homey. Made flows and life was good. But then today, I can't control the ac through homey. Only through smartthings app or remote/sensibo. Values update when using those, but when I try to change temp or just turn off it looks like it does it. But then change back to the values I tried to change from.

I tried deleting the device and readding it to no avail. I have tried to Google, but couldn't find anything. Anything I can do on my part?

AdyRock commented 3 years ago

Could you enable the log (blue tick) in the Configure App screen. Then try to control the AC and then send me the log

lordradon commented 3 years ago

Hi, here's what I got.

lordradon commented 3 years ago

I tried putting it to 23 degrees from 24, but just pops back to 24. But if I change with remote, it shows what I did with the remote

AdyRock commented 3 years ago

I seem to remember another user saying that they had an issue when they set the AC mode to auto. The API reports auto as a supported settings:

{
"supportedAcModes": {
"value": [
"cool",
"dry",
"wind",
"auto"
],

But in reality their AC didn't support that. So when they set it another option then it worked.

It appears the set point is sent OK:

{"commands":[{"component":"main","capability":"thermostatCoolingSetpoint","command":"setCoolingSetpoint","arguments":[23]}]}
[object Object]
retrieve data
Done retrieval of data
{
"results": [
{
"id": "a44c1c9f-d131-45e5-9aa2-0d510baed5ca",
"status": "ACCEPTED"
}
]
}

The entries for :

Capability Map entry NOT found for: ac_lights_on
Capability Map entry NOT found for: ac_lights_off

Are simply because those are write only options, so are expected.

I think the error is caused by an unsupported feature for the silent mode:

devices/C097273D-9F9E-0000-0000-000000000000/components/main/capabilities/audioVolume/status
HTTPS Error: 422:
getDeviceValues error: {
"statusCode": 422,
"statusMessage": "HTTPS Error: "
}

I have published a new version with better logging plus a safeguard to ensure a new value is not sent while the current values are being fetched, just in case there is a timing issue.

lordradon commented 3 years ago

Wow that was it. I had put it on silent after adding some flows, so I didn't hear the beeps every morning. Put it in "beep mode" and now it works again. Thanks!

I have noticed that when I try to put it in heat mode, it pops back to auto. I know my ac supports heat. Should I put it on heat with logging on?

AdyRock commented 3 years ago

Yes, no problem. Could you install the latest version first as I have tried to make the log messages a bit clearer so it might help see the problem.

lordradon commented 3 years ago

Hi, finally got home. Here's the code when I set it to heat.

I have to change polling to 30 secs before using log or I have no time to select all and copy before new stuff shows up πŸ˜…

AdyRock commented 3 years ago

Although it appears to accept the command:

PostURL url: devices/C097273D-9F9E-0000-0000-000000000000/commands
PostUrl body: {"commands":[{"component":"main","capability":"airConditionerMode","command":"setAirConditionerMode","arguments":["heat"]}]}
Set device: devices/C097273D-9F9E-0000-0000-000000000000/commands
Result: {
"results": [
{
"id": "0465772f-dddb-47c8-96cf-86efee60f643",
"status": "ACCEPTED"
}
]
}

It doesn't list heat as one of the modes:

devices/C097273D-9F9E-0000-0000-000000000000/components/main/capabilities/airConditionerMode/status
Get device: devices/C097273D-9F9E-0000-0000-000000000000/components/main/capabilities/airConditionerMode/status
Result: {
"supportedAcModes": {
"value": [
"cool",
"dry",
"wind",
"auto"
],
"timestamp": "2021-01-16T06:58:22.245Z"
},
"airConditionerMode": {
"value": "auto",
"timestamp": "2021-10-23T21:07:49.580Z"
}
}

Unfortunately Homey doesn't support dynamic lists so I have to include all the possible options. Ideally I would like to build the list based on the information returned by the API but there is no way to do that.

lordradon commented 3 years ago

So no way to include heat? How many options are there though?

AdyRock commented 3 years ago

The reported options are "cool", "dry", "wind", "auto"

lordradon commented 3 years ago

Weird, on my ac it's auto, cool, dry, fan, heat. Oh well, I'm happy with auto and cool at least. And to have it in homey directly since sensibo didn't always work is great. Thanks again!

AdyRock commented 3 years ago

If you go through the add devices wizard to the point where you would see the list of devices, it will fill the Detected list (in the Configure app page) with the list of devices and their capabilities. If you post that I will see if there is a separate option for the heat settings.

lordradon commented 2 years ago

Late reply, was on vacation ✈️πŸ‡ͺπŸ‡ΈπŸŽ‰

Here's the detected

{ "items": [ { "deviceId": "C097273D-9F9E-0000-0000-000000000000", "name": "Room air conditioner", "label": "Room air conditioner", "manufacturerName": "Samsung Electronics", "presentationId": "DA-AC-RAC-100001", "deviceManufacturerCode": "Samsung Electronics", "locationId": "2ad501c2-22e6-43d5-b7cc-72ba04bbe363", "roomId": "74bfde40-41c5-4f23-8411-10135bc4cbfd", "deviceTypeName": "Samsung OCF Air Conditioner", "components": [ { "id": "main", "label": "Room air conditioner", "capabilities": [ { "id": "ocf", "version": 1 }, { "id": "switch", "version": 1 }, { "id": "airConditionerMode", "version": 1 }, { "id": "airConditionerFanMode", "version": 1 }, { "id": "temperatureMeasurement", "version": 1 }, { "id": "thermostatCoolingSetpoint", "version": 1 }, { "id": "airQualitySensor", "version": 1 }, { "id": "dustSensor", "version": 1 }, { "id": "odorSensor", "version": 1 }, { "id": "refresh", "version": 1 }, { "id": "execute", "version": 1 }, { "id": "samsungce.driverVersion", "version": 1 }, { "id": "samsungce.driverState", "version": 1 }, { "id": "custom.thermostatSetpointControl", "version": 1 }, { "id": "custom.disabledCapabilities", "version": 1 } ], "categories": [ { "name": "AirConditioner", "categoryType": "manufacturer" } ] } ], "profile": { "id": "f8b44a17-3dd6-3bca-b599-a2390c12243b" }, "type": "OCF", "restrictionTier": 0 } ], "_links": {} }

AdyRock commented 2 years ago

Hope you had a good vacation. Unfortunately there is nothing in the list to set heat mode so I guess it's not supported via the API.

What options do you see in the Samsung App?

If you set the AC to heat mode via the remote control while looking at the app log do you see anything that relates to heat coming back?

lordradon commented 2 years ago

Great vacation!

lordradon commented 2 years ago

Screenshot_20211107-221323

And it stays on heat in the app when I use the remote

But jumps back to auto when I use homey app

AdyRock commented 2 years ago

The only thing I can think of is there is a bug in the AC API. The AC obviously supports heat but the API won't accept it. Does the Samsung SmartThings app allow you to set heat mode? Maybe try to contact Samsung to see if there is an update for the AC.

lordradon commented 2 years ago

Yes it does. I'll talk to them πŸ‘Œ