ollo69 / ha-smartthinq-sensors

HomeAssistant custom integration for SmartThinQ LG devices configurable with Lovelace User Interface.
Apache License 2.0
1.03k stars 149 forks source link

Support for Wine Cellar #738

Open garysargentpersonal opened 2 months ago

garysargentpersonal commented 2 months ago

Is it possible to add support for the LG Wine Cellar?

See: https://www.lg.com/uk/support/product-support/cs-LSR200W.AGRQLGU/

This has the following refrigeration compartments:

The LG app allows setting of the temperatures: wine upper, wine lower, either the fridge or freezer temp depending on which mode is selected. The app also allows "Ventilation" on/off and "champagne" on/off. You can only change FRIDGE/FREEZER mode on the actual unit, not in the app.

Physical controls and display on fridge:

image

Controls in LG app:

image

JSON received back with some UID's obsfucated for "item" part:

      "item":[
         {
            "appType":"NUTS",
            "modelAppType":"NUTS",
            "modelCountryCode":"WW",
            "countryCode":"GB",
            "modelName":"2REB1EUSW__2",
            "deviceType":105,
            "deviceCode":"KI10",
            "alias":"Wine Cellar",
            "deviceId":"b3632622-7219-1183-9f70-XXXXXXXXXXXX",
            "fwVer":"",
            "imageFileName":"home_ic_device_winecellar.png",
            "imageUrl":"https://objectcontent.lgthinq.com/f9273638-3fc1-485b-84d7-XXXXXXXXXXXX?hdnts=exp=1716944537~hmac=384d38c4a1c178d5023e76ca786543d3XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "smallImageUrl":"https://objectcontent.lgthinq.com/7fd93444-c7e0-4275-9849-XXXXXXXXXXXX?hdnts=exp=1716944536~hmac=6d196e4d76749b258175b386dXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "ssid":"XXXXXXXXXXX",
            "softapId":"",
            "softapPass":"",
            "macAddress":"",
            "networkType":"02",
            "timezoneCode":"Europe/London",
            "timezoneCodeAlias":"Europe/London",
            "utcOffset":0,
            "utcOffsetDisplay":"+00:00",
            "dstOffset":1,
            "dstOffsetDisplay":"+01:00",
            "curOffset":1,
            "curOffsetDisplay":"+01:00",
            "sdsGuide":"{\"deviceCode\":\"KI10\"}",
            "newRegYn":"N",
            "remoteControlType":"",
            "userNo":"GB201119XXXXXXX",
            "tftYn":"N",
            "modelJsonVer":1.1,
            "modelJsonUri":"https://objectcontent.lgthinq.com/1c0a4ab7-d7c4-4de6-9c39-XXXXXXXXXXXX?hdnts=exp=1775260850~hmac=16b4e4a8422beba0e2adfe148dab5d840aXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "appModuleVer":360.05,
            "appModuleUri":"https://objectcontent.lgthinq.com/e7b85c8e-dc39-484e-ad57-XXXXXXXXXXXX?hdnts=exp=1750829237~hmac=9f7b808af05d93cfcfc146ddbb915aXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "appRestartYn":"Y",
            "appModuleSize":1537210,
            "langPackProductTypeVer":81.4,
            "langPackProductTypeUri":"https://objectcontent.lgthinq.com/d749c4d7-e8b9-4b34-ba1e-XXXXXXXXXXXX?hdnts=exp=1776316318~hmac=8d5472ca074d06eadbf4XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "deviceState":"E",
            "snapshot":{
               "wnState":{
                  "room1Temp":3.0,
                  "voiceVolume":"100_PERCENT",
                  "voiceConfirmSound":"ON",
                  "voiceAssistantCmd":"HI_LG",
                  "displayLock":"LOCK",
                  "sabbathMode":"IGNORE",
                  "tempUnit":"CELSIUS",
                  "room3Temp":4.0,
                  "voiceMode":"OFF",
                  "lightStatus":"IGNORE",
                  "voiceSensitivity":"MID",
                  "champagneMode":"ON",
                  "drawerMode":"FRIDGE",
                  "room2Temp":255.0,
                  "atLeastOneDoorOpen":"CLOSE",
                  "foodPoisonIndex":46.0,
                  "expressMode":"OFF",
                  "room4Temp":5.0,
                  "freshAirFilter":"REPLACE",
                  "monStatus":"NORMAL",
                  "humidityMode":"ON",
                  "smartCareV2":"OFF"
               },
               "mid":0.0,
               "online":true,
               "static":{
                  "deviceType":"105",
                  "countryCode":"GB"
               },
               "meta":{
                  "allDeviceInfoUpdate":false,
                  "messageId":"9NjLG-PfSP2O9RAuGyspyg"
               },
               "timestamp":1713365087776.0
            },
            "online":true,
            "platformType":"thinq2",
            "area":331293,
            "regDt":20210115192114.0,
            "blackboxYn":"Y",
            "modelProtocol":"STANDARD",
            "order":0,
            "drServiceYn":"N",
            "fwInfoList":[
               {
                  "checksum":"0128C78A",
                  "order":2.0,
                  "partNumber":"SAA41777201"
               },
               {
                  "checksum":"03C62E13",
                  "order":1.0,
                  "partNumber":"SAA41768401"
               }
            ],
            "modemInfo":{
               "appVersion":"Voice_ha_v1.9.052",
               "modelName":"2REB1EUSW__2",
               "modemType":"CYW43907_SECURE",
               "ruleEngine":"n"
            },
            "guideTypeYn":"Y",
            "guideType":"TYPE1",
            "regDtUtc":"20210115182114",
            "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
         }]

Snippets of different state objects with various temperature changes:


Wine Upper = 16 / Wine Lower = 8 / FRIDGE MODE with temp = 3 / Champagne ON

               "wnState":{
                  "room1Temp":3.0,
                  "voiceVolume":"100_PERCENT",
                  "voiceConfirmSound":"ON",
                  "voiceAssistantCmd":"HI_LG",
                  "displayLock":"LOCK",
                  "sabbathMode":"IGNORE",
                  "tempUnit":"CELSIUS",
                  "room3Temp":4.0,
                  "voiceMode":"OFF",
                  "lightStatus":"IGNORE",
                  "voiceSensitivity":"MID",
                  "champagneMode":"ON",
                  "drawerMode":"FRIDGE",
                  "room2Temp":255.0,
                  "atLeastOneDoorOpen":"CLOSE",
                  "foodPoisonIndex":46.0,
                  "expressMode":"OFF",
                  "room4Temp":5.0,
                  "freshAirFilter":"REPLACE",
                  "monStatus":"NORMAL",
                  "humidityMode":"ON",
                  "smartCareV2":"OFF"
               },

Wine Upper = 17 / Wine Lower = 7 / FRIDGE MODE with temp = 1 / Champagne OFF

               "wnState":{
                  "room1Temp":2.0,
                  "voiceVolume":"100_PERCENT",
                  "voiceConfirmSound":"ON",
                  "voiceAssistantCmd":"HI_LG",
                  "displayLock":"LOCK",
                  "sabbathMode":"IGNORE",
                  "tempUnit":"CELSIUS",
                  "room3Temp":5.0,
                  "voiceMode":"OFF",
                  "lightStatus":"IGNORE",
                  "voiceSensitivity":"MID",
                  "champagneMode":"OFF",
                  "drawerMode":"FRIDGE",
                  "room2Temp":255.0,
                  "atLeastOneDoorOpen":"CLOSE",
                  "foodPoisonIndex":46.0,
                  "expressMode":"OFF",
                  "room4Temp":7.0,
                  "freshAirFilter":"REPLACE",
                  "monStatus":"NORMAL",
                  "humidityMode":"ON",
                  "smartCareV2":"OFF"
               },

Wine Upper = 16 / Wine Lower = 8 / FREEZER MODE with temp = -18 / Champagne ON

               "wnState":{
                  "room1Temp":3.0,
                  "voiceVolume":"100_PERCENT",
                  "voiceConfirmSound":"ON",
                  "voiceAssistantCmd":"HI_LG",
                  "displayLock":"LOCK",
                  "sabbathMode":"IGNORE",
                  "tempUnit":"CELSIUS",
                  "room3Temp":4.0,
                  "voiceMode":"OFF",
                  "lightStatus":"IGNORE",
                  "voiceSensitivity":"MID",
                  "champagneMode":"ON",
                  "drawerMode":"FREEZER",
                  "room2Temp":255.0,
                  "atLeastOneDoorOpen":"CLOSE",
                  "foodPoisonIndex":46.0,
                  "expressMode":"OFF",
                  "room4Temp":36.0,
                  "freshAirFilter":"REPLACE",
                  "monStatus":"NORMAL",
                  "humidityMode":"ON",
                  "smartCareV2":"OFF"