sman591 / homebridge-lg-thinq-ac

Homebridge plugin for LG ThinQ-enabled portable air conditioner
Apache License 2.0
53 stars 16 forks source link

Incorrect mode transmission - add toggles for heat/dry, auto/fan #30

Open Phoendor opened 4 years ago

Phoendor commented 4 years ago

LG Air Conditioner Model LG B09TS

Describe the bug Select Cooling in Homekit -> cooling in ThinQ Select Heating in Homekit -> drying in ThinQ Select Auto in Homekit -> fan in ThinQ So, incorrect modes + can't set Auto in Homekit. If I select Auto in ThinQ, it shows previous selection in Homekit

Symptom check

Phoendor commented 4 years ago

Just a wild guess - maybe modes have numerical identifiers and if there is an uncommon mode they are shifted, that's why most changes work but give wrong modes except for the most classic one - cooling

sman591 commented 4 years ago

Yeah my model only supports cool/dry/fan, which is the default for the plugin. These are indeed numerical number modes, so if your device has different support it’ll need to be mapped which is why “Model” in accessory settings is required.

What modes does your unit support? Can you share what Mode is listen in the home app’s accessory settings?

Phoendor commented 4 years ago

Thanks!

Sorry is the "model" field already supported? can't find it anywhere, should I input it explicitly in Homebridge config file?

Here are modes available in both apps and links between them Homekit / ThinQ app Auto / Fan Heat / Dry Cool / Cool Off / Off / Heat / Auto

Phoendor commented 4 years ago

Sorry, I guess this model might be more informative - RAC_056905_WW is what I see in Homebridge As you might have noted, I don't have much expertise in programming, but I'm eager to provide any information that could help to add better support

sman591 commented 4 years ago

@Phoendor When you select "Auto" in the ThinQ app, what do you see in the Homebridge logs for TargetHeaterCoolerStateCharacteristic: ?

sman591 commented 4 years ago

Similar to #22

Phoendor commented 4 years ago

@Phoendor When you select "Auto" in the ThinQ app, what do you see in the Homebridge logs for TargetHeaterCoolerStateCharacteristic: ?

Unsupported API value: 6

Complete list after 1.7.0 Homekit / ThinQ app

Heat / Heat Cool / Cool Off / Off

Auto / Fan Unsupported API Value : 1 / Dry Unsupported API Value: 6 / Auto

sman591 commented 4 years ago

@Phoendor perfect, thanks for clarifying! This should be doable for "auto" but I'm not sure yet what we'll do for supporting both drying & heat

Phoendor commented 4 years ago

@Phoendor perfect, thanks for clarifying! This should be doable for "auto" but I'm not sure yet what we'll do for supporting both drying & heat

Thanks! There is no “dry” support in Homekit I guess? Maybe you can solve that by adding option like “Use Dry instead of Heat” to the setup interface. Heating also dehumidifies, so these can be interchangeable.

sman591 commented 4 years ago

Yeah, something like that might be a good workaround for now. HomeKit's primary "heater / cooler" accessory only supports heat/cool/auto; a single accessory can implement additional characteristics like a humidifier, but I haven't looked at it too closely yet because it complicates how things visually show up in the Home app

Phoendor commented 4 years ago

Yeah, something like that might be a good workaround for now. HomeKit's primary "heater / cooler" accessory only supports heat/cool/auto; a single accessory can implement additional characteristics like a humidifier, but I haven't looked at it too closely yet because it complicates how things visually show up in the Home app

So after you align all the Homekit-supported modes with ones in ThinQ there will be 2 additional ones:

sman591 commented 4 years ago

Yep exactly that!

I still need to figure out how ThinQ implements a proper "auto" mode (where there's a set temp for both heat & cool) since my unit doesn't have the feature, but I did discover ThinQ's API defining all params & values so it should be in there

Phoendor commented 4 years ago

LG ThinQ app only has target temperature in Auto, and if I turn on Auto in Homekit (which is interpreted currently as Fan in Thinq) it shows min and max in range as the same, if previous Homekit state was Cool or Heat

sman591 commented 4 years ago

Interesting, I'll think about how we want to support that. In the meantime I'll look at adding a manual toggle for swapping heat/dry