ha-smartthinq-sensors icon indicating copy to clipboard operation
ha-smartthinq-sensors copied to clipboard

Support Hot Water control for Air to Water Heat Pump

Open dukicn opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. I use this add on to control my LG Air To Water Heat Pump HM161M U33. Even though it doesn't specify it as a supported device, add-on is fully functional for heating and cooling. I can turn on and off the heat pump, adjust the temperature and the mode to Heat / Cool / Auto. However, heat pump is also used for hot water, but this plugin doesn't provide any option to control hot water (neither turn on / off or temperature control). Sensor does show the hot water temperature, but doesn't allow any way to control it.

Describe the solution you'd like I would like this plugin to support turning on and off hot water as well as adjusting temperature for the hot water. Ideally, it would create two climate devices, one for heating / cooling and another one for hot water.

Describe alternatives you've considered No alternatives that I couldn't find to control the hot water except using native LG ThinQ application. However, that doesn't allow any control outside of app.

Additional context Seems that there is an existing PR for this support but it hasn't been merged with main: https://github.com/ollo69/ha-smartthinq-sensors/pull/268

dukicn avatar May 29 '22 16:05 dukicn

+1 for this to enable me to control the hot water temperature on my LG Therma V

image

kepath avatar Sep 01 '22 21:09 kepath

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Nov 23 '22 08:11 github-actions[bot]

When can we expect to merge https://github.com/ollo69/ha-smartthinq-sensors/pull/268 with the main branch? This PR seems to contain the changes requests in this open issue.

Thanks

dukicn avatar Nov 28 '22 14:11 dukicn

That PR #268 is very old, need rebase and also some improvement. There are several request about this feature, but not really clear how heat-pump should work. What can you currently do with integration? A basic support should be already in place, Can you please attach integration diagnostic so that I can take a look to device payload and model info?

ollo69 avatar Dec 05 '22 00:12 ollo69

I come from #386, where another person attached the integration diagnostics. At the time I don't have HA up and running as the server it was on decided to k-ll itself, but when it was on I don't remember being able to do anything with the water heater (Therma V WH20S).

About the heater, the WH20S and WH27S are the same thing, only thing that differs is the water tank size. From a hypothetical integration you should be able to set water temperature, and mode of the heater (heatpump only / turbo / Auto / holiday). It should be able to receive the water temperature reading and power consumption as sensors, and maybe set the stand-by schedule (when to turn off for the night, and when to turn back on).

Posted this before finishing to type by accident, so here's the rest of it:

I'm not sure if that's what you were asking, if it isn't then sorry for the misunderstanding! Happy to post more diagnostics once I get HA back up, but that's gonna take some time. Raspberries are hard to find!

FAB1150 avatar Dec 05 '22 00:12 FAB1150

Because I also need to check model info to see available options, I need complete diagnostic file and not only the payload. The problem with LG is that they have multiple model with different features, and I remember that in the past some basic ctrl for awhp was already in place. I would not break what is already running.

ollo69 avatar Dec 05 '22 01:12 ollo69

ThinQ connected and providing data, yet no devices appear.

This is what I get from the logs. I redacted all tokens / ids.

Hope with this info, integration / mapping should be pretty straightforward.

"unsupported_devices": {
  "WATER_HEATER": [
    {
      "appType": "NUTS",
      "modelCountryCode": "WW",
      "countryCode": "DE",
      "modelName": "WHT_056905_WW",
      "deviceType": 406,
      "deviceCode": "AI07",
      "alias": "XXXXXXXX",
      "deviceId": "XXXXXXXX",
      "fwVer": "",
      "imageFileName": "",
      "ssid": "XXXXXXXX",
      "softapId": "",
      "softapPass": "",
      "macAddress": "",
      "networkType": "02",
      "timezoneCode": "Europe/Berlin",
      "timezoneCodeAlias": "Europe/Berlin",
      "utcOffset": 1,
      "utcOffsetDisplay": "+01:00",
      "dstOffset": 2,
      "dstOffsetDisplay": "+02:00",
      "curOffset": 2,
      "curOffsetDisplay": "+02:00",
      "sdsGuide": "{\"deviceCode\":\"AI07\"}",
      "newRegYn": "N",
      "remoteControlType": "",
      "userNo": "**REDACTED**",
      "tftYn": "N",
      "modelJsonVer": 2.01,
      "modelJsonUri": "XXXXXXXX",
      "appModuleVer": 1.03,
      "appModuleUri": "XXXXXXXX",
      "appRestartYn": "Y",
      "appModuleSize": 5511058,
      "langPackProductTypeVer": 6.5,
      "langPackProductTypeUri": "XXXXXXXX",
      "deviceState": "E",
      "snapshot": {
        "fwUpgradeInfo": {
          "upgSched": {
            "upgUtc": "0",
            "cmd": "none"
          }
        },
        "static": {
          "deviceType": "406",
          "countryCode": "DE"
        },
        "airState.tempState.hotWaterCurrent": 50.0,
        "airState.tempState.unit": 0.0,
        "airState.diagCode": 0.0,
        "airState.miscFuncState.extraOp": 0.0,
        "airState.tempState.hotWaterTarget": 55.0,
        "mid": 64831710.0,
        "airState.energy.accumulated": 26.0,
        "airState.energy.onCurrent": 50.0,
        "airState.quality.sensorMon": 0.0,
        "airState.energy.accumulatedTime": 344.0,
        "airState.operation": 1.0,
        "meta": {
          "allDeviceInfoUpdate": false,
          "messageId": "XXXXXXXX"
        },
        "online": true,
        "airState.opMode": 26.0,
        "airState.filterMngStates.maxTime": 4320.0,
        "airState.filterMngStates.useTime": 4278.0,
        "airState.preHeat.schedule": 0.0,
        "timestamp": 1664788881211.0
      },
      "online": true,
      "platformType": "thinq2",
      "area": 167921,
      "regDt": 20221002172222.0,
      "blackboxYn": "Y",
      "modelProtocol": "STANDARD",
      "order": 0,
      "drServiceYn": "N", 
      "guideTypeYn": "Y",
      "guideType": "WHT_TYPE1",
      "regDtUtc": "20221002152222",
      "regIndex": 0,
      "groupableYn": "N",
      "controllableYn": "N",
      "combinedProductYn": "N",
      "masterYn": "Y",
      "pccModelYn": "N",
      "sdsPid": {
        "sds4": "",
        "sds3": "",
        "sds2": "",
        "sds1": ""
      },
      "autoOrderYn": "N",
      "initDevice": false,
      "existsEntryPopup": "N",
      "tclcount": 0
    }
  ]

Xnyle avatar Dec 05 '22 06:12 Xnyle

Please attach the diagnostic file. Is redacted and contain all I need.

ollo69 avatar Dec 05 '22 07:12 ollo69

I have no idea how to get that, a bit of context would be nice... Actually, I found it again... and no, it's not completely free of personal data, otherwise it's exactly what i already posted above.

Xnyle avatar Dec 05 '22 07:12 Xnyle

Just go to integration page and select "download diagnostic"

image

ollo69 avatar Dec 05 '22 08:12 ollo69

See above that's exactly what I posted minus personalized data / tokens that were still in there.

Xnyle avatar Dec 05 '22 08:12 Xnyle

See above that's exactly what I posted minus personalized data / tokens that were still in there.

That's not. In diagnostic there is the model info, not in what you posted (this is just the payload). Sensible data in diagnostic is redacted!

ollo69 avatar Dec 05 '22 08:12 ollo69

No it isn't, there are tokens linked to my account. If you tell me what json path you think is missing I can provide that part as well but not the whole file and not with tokens.

Xnyle avatar Dec 05 '22 08:12 Xnyle

Can you please tell me which tokens are inside the file? If this are sensible information I will redact that. What I need is the model info, a very long JSON that describe the device

ollo69 avatar Dec 05 '22 08:12 ollo69

Please... What is the complete json path?

The only thing i can find that might be related is data.unsupported_devices.WATER_HEATER.0.modelJsonUri and that is tokenized with hmac and everything.

Xnyle avatar Dec 05 '22 08:12 Xnyle

You can also download the specific file opening in a browser the URL in the field modelJsonUri (that you redacted).

ollo69 avatar Dec 05 '22 08:12 ollo69

Internet of s**t at it's best, with korean characters and everything... But ok, I guess no personal data in there.

modelinfo.json.txt

Xnyle avatar Dec 05 '22 08:12 Xnyle

That PR #268 is very old, need rebase and also some improvement. There are several request about this feature, but not really clear how heat-pump should work. What can you currently do with integration? A basic support should be already in place, Can you please attach integration diagnostic so that I can take a look to device payload and model info?

I can control the heating / cooling system now. Basic commands work (on, off, heat, cool, set temperature, current temperature, target setpoint). However, system has a separate control for hot water and there is no possibility to control that part currently. Ideally, integration would provide a separate climate device for hot water with basic functionality (on, off, set temperature, current temperature, target setpoint). Attaching my model_info information.

model_info.json.txt

Thanks

dukicn avatar Dec 05 '22 10:12 dukicn

As I understand there are 2 different situation:

  • device identified as AC (type 401) with also heat-pump functions (this is probably what PR #268 was trying to address), but I think should use HA Water Heater Entity for second part so need to be reviewed
  • device identified as AWHP (type 406). This need to be managed as new device, PR #268 will not help

@dukicn,

I suppose that you are in first case, can you please also attach the payload extracted from diagnostic as @Xnyle did (clean up sensible data before if any)

ollo69 avatar Dec 05 '22 10:12 ollo69

As I understand there are 2 different situation:

  • device identified as AC (type 401) with also heat-pump functions (this is probably what PR AWHP improvements #268 was trying to address), but I think should use HA Water Heater Entity for second part so need to be reviewed
  • device identified as AWHP (type 406). This need to be managed as new device, PR AWHP improvements #268 will not help

@dukicn,

I suppose that you are in first case, can you please also attach the payload extracted from diagnostic as @Xnyle did (clean up sensible data before if any)

@ollo69, I attached the whole model_info json path from diagnostics in the previous post. Do you need additional path?

Thanks

dukicn avatar Dec 05 '22 10:12 dukicn

Model info is ok, but do not contain payload. I also need that to compare available feature (model info) and exposed data (payload). Payload is what @Xnyle put here and is also inside diagnostics.

ollo69 avatar Dec 05 '22 10:12 ollo69

@ollo69 , here is the device info payload. Please let me know in case you need anything else.

Thanks

device_info.json.txt

dukicn avatar Dec 05 '22 10:12 dukicn

@dukicn,

could you please provide some more details on how your device works? Looking at file provided, I see an information that seems related to working mode (awhpTempSwitch). This could be AIR or WATER. Does this means that you have to switch from one mode to another? Are 2 alternative modes that can be run not at the same time? There are also others specific options that could be set (I assume from LG app)

ollo69 avatar Dec 05 '22 12:12 ollo69

Not sure it that helps, but the air to water device (W270S) basically has target temp, current temp and working mode where you can switch between vacation, heatpump, auto and turbo (each decreasing efficiency while increasing recovery time) and then there is some other settings like timers which i never used. Additionally at the device panel itself you can en- or disable anti legionella mode which you can't change in the app.

Xnyle avatar Dec 05 '22 13:12 Xnyle

Thanks @Xnyle, but I think (at least suppose looking at the files) that @dukicn device is different because it can probably work both as AC and AWHP. I would understand how this 2 modes can coexist. Integration should not send control command not supported in specific modes. May be a user manual (if is not 500 pages to read) could help.

ollo69 avatar Dec 05 '22 13:12 ollo69

@ollo69 , the system is air-to-water heat pump. It takes air from the outside and uses it to heat or cool the water. Heat pump has two independent circuits. One is used for heating or cooling (dependent on the mode - cool or heat - it either heats or cools the water). Other circle is just for hot water and is used to heat the water for the household. Control for the heat pump (both in the app or on the unit itself) enable separate control for both circuits. On the Heat/Cool screen, you can turn the unit on or off, select hot or cool mode, see the current temperature and define the target setpoint. On the Hot water screen, you can turn it on or off, see the temperature and select the target setpoint. There are some other things like scheduling, holiday mode, quick heat mode, etc. but they are not important. Modes for heating / cooling and hot water are independent (meaning, you can turn on hot water without Heat / Cool and vice versa, you can turn on Heat or Cool without Hot Water). Let me know in case you have any additional question.

You can take a look at basic and short instructions here.

dukicn avatar Dec 05 '22 13:12 dukicn

So, just to understand, what is missing in your case is just the part related to the hot-water for household, correct?

ollo69 avatar Dec 05 '22 13:12 ollo69

Yes, that is correct. I can fully control the heat / cool part, but have no control for the hot water part.

dukicn avatar Dec 05 '22 13:12 dukicn

Hi, I have a LG WP WH27s heat pump for water heating, so if possible I can help with testing. I am not so much concerned with the control as with the data from the water temperature, because the application on the phone does not have a graph, so I do not know how quickly it cools, how quickly it heats from how many degrees to how many, etc. I will be very happy if the integration is successful. Good luck!

Svrbinek avatar Dec 06 '22 18:12 Svrbinek

Water Heater device should now be supported by last release. Please provide feed-back and possible issue.

ollo69 avatar Dec 09 '22 11:12 ollo69