nVuln / homebridge-lg-thinq

A Homebridge plugin for controlling/monitoring LG ThinQ device via their ThinQ platform.
https://github.com/nVuln/homebridge-lg-thinq
Apache License 2.0
218 stars 48 forks source link

Missing function on new ThinQ refrigerator #267

Open malwcal opened 9 months ago

malwcal commented 9 months ago

Which device do you want to add? Please describe: I have used this plugin for a few years, but recently had an issue with the fridge and so I have now replaced it with a newer model.

I added it to ThingQ, and added it to HomeKit via this plugin but there are things that are not working.

For example Express Freeze isn't available as an option but I believe this was supported on my old Fridge.

For example in the ThinQ app I can see the status of the ice makers.

It also has functions to enable "Smart Learning" to adjust things based on usage patterns. The ThinQ app lets you turn these features on or off.

(The fridge has UV sterilisation for the water dispenser - it would be good if this could be activated from HomeKit but it appears that this is not exposed in the ThinQ App)

But the Fridge also has other features like

Describe the solution you'd like:

It would be good to have more features available!

Device Data:

[04/12/2023, 4:23:45 pm] [homebridge-lg-thinq] [request] get https://kic-service.lgthinq.com:46030/v1/service/homes/160709041675589464
[04/12/2023, 4:23:45 pm] [homebridge-lg-thinq] Device [Impressive Cold Monolith]:  54b473e5-bd3a-1bc4-8c35-a436c70c82c6: Impressive Cold Monolith (REFRIGERATOR 2REF11EICSP_4)
[04/12/2023, 4:23:45 pm] [homebridge-lg-thinq] {"modelAppType":"NUTS","brandType":"common","deviceId":"54b473e5-bd3a-1bc4-8c35-a436c70c82c6","deviceType":101,"modelName":"2REF11EICSP_4","subModelNm":null,"sensorType":null,"alias":"Impressive Cold Monolith","deviceCode":"KI0102","networkType":"02","tftYn":"N","guideTypeYn":"Y","guideType":"TYPE1","pccModelYn":"N","autoOrderYn":"N","drServiceYn":"N","ssid":"punch","timezoneCode":"Australia/Darwin","timezoneCodeAlias":"AUS/Darwin","sdsGuide":"{\"deviceCode\":\"KI01\"}","newRegYn":"Y","remoteControlType":null,"fareTarget":null,"area":"13713","sleep":null,"deviceState":"E","rmsClientId":null,"regDtUtc":"20231204015017000","regIndex":0,"blackboxYn":"Y","groupableYn":"N","controllableYn":"N","combinedProductYn":"N","masterYn":"Y","snapshot":{"fwUpgradeInfo":{"upgSched":{"upgUtc":"0","cmd":"none"}},"static":{"deviceType":"101","countryCode":"AU"},"meta":{"allDeviceInfoUpdate":false,"messageId":"8IroWONTTQWq5Fw1fVbrAg"},"packageId":"4346100143460901|1","mid":0,"online":true,"refState":{"dispenserCapacity":255,"dispenserUnit":"IGNORE","freezerTemp":4,"iceMaker2Status":"IGNORE","sabbathMode":"OFF","tempUnit":"CELSIUS","ecoFriendly":"IGNORE","activeSaving":"IGNORE","voiceMode":"IGNORE","fridgeStatus":"STABLIZING","smartSavingRun":"STOP","lightDimMode":"IGNORE","atLeastOneDoorOpen":"CLOSE","expressMode":"OFF","freshAirFilter":"AUTO","convertibleTemp":255,"waterFilter1RemainP":100,"waterFilter":"0_MONTH","waterFilter2RemainP":255,"waterFilter3RemainP":255,"freshAirFilterRemainP":100,"nightAntiGlareMode":"OFF","dispenserMode":"NOT_DEFINE_VALUE value:255","displayLock":"IGNORE","nightQuietMode":"OFF","expressFridge":"IGNORE","iceMaker1Status":"ICE_MAKING","convertibleStatus":"IGNORE","selfCareMode":"IGNORE","drawerMode":"IGNORE","foodPoisonIndex":58,"fridgeTemp":5,"iceMaker3Status":"ICE_MAKING","monDataNumber":2,"pantryMode":"IGNORE","craftIceMode":"6_ICE","dualFridgeMode":"IGNORE","monStatus":"NORMAL","smartSavingMode":"SMARTGRID_DD_ON","freezerStatus":"STABLIZING","smartCareV2":"ON"},"timestamp":1701672028961},"manufacture":{"inventoryOrg":"CP3","macAddress":"A4:36:C7:0C:82:C6","manufactureModel":"GC-X22FTQXL.AMCRGAP","manufacturedAt":"2023-08-17T18:08:29+00:00","registeredAt":"2023-08-18T05:13:29.401844+00:00","salesModel":"GF-V570MBLC.AMCRGAP","serialNo":"308TRSE1W286"},"online":true,"platformType":"thinq2","homeDeviceOrder":-1,"roomDeviceOrder":-1,"ownershipYn":"N","modelJsonVer":"1.03","modelJsonUri":"https://objectcontent.lgthinq.com/bbd03ab5-37cf-4679-8eee-68fbd7ae8faf?hdnts=exp=1763884709~hmac=c5622b5c1b8a8fe10c4953e0638fee07b958df74a96e79faa64397aca6fef051","appModuleVer":"303.35","appModuleUri":"https://objectcontent.lgthinq.com/d9e9cbd3-9734-4d6b-88d4-003d35cd5ca1?hdnts=exp=1763600486~hmac=a76bfbf93a566c767708fc4f50876f0101b926420b1f37c012d4dc951fbf8c99","appRestartYn":"Y","appModuleSize":"8344898","langPackProductTypeVer":"72.8","langPackProductTypeUri":"https://objectcontent.lgthinq.com/fc087856-c408-45e4-b84e-13268df2fd77?hdnts=exp=1764487294~hmac=40fa32c77b16b1f9ae03adeb272920f871dd6a911074aa431d89e4853a1c87f4","langPackModelVer":null,"langPackModelUri":null,"roomId":"160422194461218976","fwInfoList":[{"checksum":"01075684","order":2,"partNumber":"SAA43460901"},{"checksum":"00000443","order":1,"partNumber":"SAA43461001"}],"modemInfo":{"appVersion":"clip_hna_v1.9.183","modelName":"2REF11EICSP_4","modemType":"RTK_RTL8711am","oneshot":"y","ruleEngine":"y","size":1572864},"existsEntryPopup":"N","fwVer":null,"modemVer":"clip_hna_v1.9.183","subDeviceCount":0,"firebaseLogKey":null,"cardType":"Small","cardControl":"Base","detailDeviceCode":null,"upgradableYn":"N","autoFwDownloadYn":"N","homeMovableYn":"Y","protocolVersion":null,"btAddress":null,"isTLV":null,"jsonList":null,"mdFotaYn":"Y","demandType":"RTK_RTL8711am"}
[04/12/2023, 4:23:45 pm] [homebridge-lg-thinq] [Impressive Cold Monolith] Setting up device!
[04/12/2023, 4:23:45 pm] [homebridge-lg-thinq] Adding new accessory: 54b473e5-bd3a-1bc4-8c35-a436c70c82c6: Impressive Cold Monolith (REFRIGERATOR 2REF11EICSP_4)
malwcal commented 7 months ago

Any news here? Its a pity this fridge doesn't at least support the features that were on my old fridge (eg express freeze)

nVuln commented 7 months ago

For example Express Freeze isn't available as an option but I believe this was supported on my old Fridge.

you can enable this feature in plugin setting, I think it's called "express mode"

For example in the ThinQ app I can see the status of the ice makers.

I'll add it in future update

It also has functions to enable "Smart Learning" to adjust things based on usage patterns. The ThinQ app lets you turn these features on or off.

I don't see anything related this feature in API responsed, I got smartSavingRun, smartCareV2, smartSavingMode flag, not sure if it's "Smart Learning" feature you need enable homebridge debug mode, then try collect some logging when this feature toggled, let see which one is changed

(The fridge has UV sterilisation for the water dispenser - it would be good if this could be activated from HomeKit but it appears that this is not exposed in the ThinQ App)

if you can't control it in LG app, this plugin can't too

malwcal commented 7 months ago

Thanks for the update!

On 13 Feb 2024 at 16:26:53, nVuln @.***> wrote:

For example Express Freeze isn't available as an option but I believe this was supported on my old Fridge.

you can enable this feature in plugin setting, I think it's called "express mode"

There is no such setting for my new fridge. (I still have my old fridge in the config file and I can see the setting there)

But I can’t see a switch in the home app.

Looking at the plugin config I can see the old one is identified as "type": "REFRIGERATOR" but the new one isn’t.

Here is the new one:

{ "id": "54b473e5-bd3a-1bc4-8c35-a436c70c82c6", "name": "New Fridge" }

For example in the ThinQ app I can see the status of the ice makers.

I'll add it in future update

Cool!

It also has functions to enable "Smart Learning" to adjust things based on usage patterns. The ThinQ app lets you turn these features on or off.

I don't see anything related this feature in API responsed, I got smartSavingRun, smartCareV2, smartSavingMode flag, not sure if it's "Smart Learning" feature you need enable homebridge debug mode, then try collect some logging when this feature toggled, let see which one is changed

I think it covers a few different features. When you look on the app it comes up with the following:

If you select any of those it shows when various things are scheduled, eg:

Anyway, here is the debug info.

I turned Smart Learning off and see:

[Impressive Cold Monolith] Received snapshot: {"fwUpgradeInfo":{"upgSched":{"upgUtc":"0","cmd":"none"}},"static":{"deviceType":"101","countryCode":"AU"},"meta":{"allDeviceInfoUpdate":false,"messageId":"fcB-bnHnRbO9YZWUE4-vAA"},"packageId":"4346100143460901|1","mid":1227476204,"online":true,"refState":{"dispenserCapacity":255,"dispenserUnit":"IGNORE","freezerTemp":5,"iceMaker2Status":"IGNORE","sabbathMode":"OFF","tempUnit":"CELSIUS","ecoFriendly":"IGNORE","activeSaving":"IGNORE","voiceMode":"IGNORE","fridgeStatus":"GOOD","smartSavingRun":"STOP","lightDimMode":"IGNORE","atLeastOneDoorOpen":"CLOSE","expressMode":"OFF","freshAirFilter":"AUTO","convertibleTemp":255,"waterFilter1RemainP":63,"waterFilter":"2_MONTH","waterFilter2RemainP":255,"waterFilter3RemainP":255,"freshAirFilterRemainP":81,"nightAntiGlareMode":"CUSTOM","dispenserMode":"NOT_DEFINE_VALUE value:255","displayLock":"IGNORE","nightQuietMode":"OFF","expressFridge":"IGNORE","iceMaker1Status":"ICE_MAKING","convertibleStatus":"IGNORE","selfCareMode":"IGNORE","drawerMode":"IGNORE","foodPoisonIndex":75,"fridgeTemp":3,"iceMaker3Status":"ICE_MAKING","monDataNumber":20,"pantryMode":"IGNORE","craftIceMode":"6_ICE","dualFridgeMode":"IGNORE","monStatus":"NORMAL","smartSavingMode":"SMARTGRID_DD_ON","freezerStatus":"GOOD","smartCareV2":"OFF"},"timestamp":1707810516892}

Turning it back on (and restarting home bridge) I get

Impressive Cold Monolith] Received snapshot: {"fwUpgradeInfo":{"upgSched":{"upgUtc":"0","cmd":"none"}},"static":{"deviceType":"101","countryCode":"AU"},"meta":{"allDeviceInfoUpdate":false,"messageId":"MXo8btR9TwW9WNaF1VGVSg"},"packageId":"4346100143460901|1","mid":0,"online":true,"refState":{"dispenserCapacity":255,"dispenserUnit":"IGNORE","freezerTemp":5,"iceMaker2Status":"IGNORE","sabbathMode":"OFF","tempUnit":"CELSIUS","ecoFriendly":"IGNORE","activeSaving":"IGNORE","voiceMode":"IGNORE","fridgeStatus":"GOOD","smartSavingRun":"STOP","lightDimMode":"IGNORE","atLeastOneDoorOpen":"CLOSE","expressMode":"OFF","freshAirFilter":"AUTO","convertibleTemp":255,"waterFilter1RemainP":63,"waterFilter":"2_MONTH","waterFilter2RemainP":255,"waterFilter3RemainP":255,"freshAirFilterRemainP":81,"nightAntiGlareMode":"CUSTOM","dispenserMode":"NOT_DEFINE_VALUE value:255","displayLock":"IGNORE","nightQuietMode":"OFF","expressFridge":"IGNORE","iceMaker1Status":"ICE_MAKING","convertibleStatus":"IGNORE","selfCareMode":"IGNORE","drawerMode":"IGNORE","foodPoisonIndex":74,"fridgeTemp":3,"iceMaker3Status":"ICE_MAKING","monDataNumber":20,"pantryMode":"IGNORE","craftIceMode":"6_ICE","dualFridgeMode":"IGNORE","monStatus":"NORMAL","smartSavingMode":"SMARTGRID_DD_ON","freezerStatus":"GOOD","smartCareV2":"ON"},"timestamp":1707810666550}

There was also a longer message:

{"modelAppType":"NUTS","brandType":"common","deviceId":"54b473e5-bd3a-1bc4-8c35-a436c70c82c6","deviceType":101,"modelName":"2REF11EICSP_4","subModelNm":null,"sensorType":null,"alias":"Impressive Cold Monolith","deviceCode":"KI0102","networkType":"02","tftYn":"N","guideTypeYn":"Y","guideType":"TYPE1","pccModelYn":"N","autoOrderYn":"N","drServiceYn":"N","ssid":"punch","timezoneCode":"Australia/Darwin","timezoneCodeAlias":"AUS/Darwin","sdsGuide":"{\"deviceCode\":\"KI01\"}","newRegYn":"N","remoteControlType":null,"fareTarget":null,"area":"13713","sleep":null,"deviceState":"E","rmsClientId":null,"regDtUtc":"20231204015017000","regIndex":0,"blackboxYn":"Y","groupableYn":"N","controllableYn":"N","combinedProductYn":"N","masterYn":"Y","snapshot":{"fwUpgradeInfo":{"upgSched":{"upgUtc":"0","cmd":"none"}},"static":{"deviceType":"101","countryCode":"AU"},"meta":{"allDeviceInfoUpdate":false,"messageId":"MXo8btR9TwW9WNaF1VGVSg"},"packageId":"4346100143460901|1","mid":0,"online":true,"refState":{"dispenserCapacity":255,"dispenserUnit":"IGNORE","freezerTemp":5,"iceMaker2Status":"IGNORE","sabbathMode":"OFF","tempUnit":"CELSIUS","ecoFriendly":"IGNORE","activeSaving":"IGNORE","voiceMode":"IGNORE","fridgeStatus":"GOOD","smartSavingRun":"STOP","lightDimMode":"IGNORE","atLeastOneDoorOpen":"CLOSE","expressMode":"OFF","freshAirFilter":"AUTO","convertibleTemp":255,"waterFilter1RemainP":63,"waterFilter":"2_MONTH","waterFilter2RemainP":255,"waterFilter3RemainP":255,"freshAirFilterRemainP":81,"nightAntiGlareMode":"CUSTOM","dispenserMode":"NOT_DEFINE_VALUE value:255","displayLock":"IGNORE","nightQuietMode":"OFF","expressFridge":"IGNORE","iceMaker1Status":"ICE_MAKING","convertibleStatus":"IGNORE","selfCareMode":"IGNORE","drawerMode":"IGNORE","foodPoisonIndex":74,"fridgeTemp":3,"iceMaker3Status":"ICE_MAKING","monDataNumber":20,"pantryMode":"IGNORE","craftIceMode":"6_ICE","dualFridgeMode":"IGNORE","monStatus":"NORMAL","smartSavingMode":"SMARTGRID_DD_ON","freezerStatus":"GOOD","smartCareV2":"ON"},"timestamp":1707810666550},"manufacture":{"inventoryOrg":"CP3","macAddress":"A4:36:C7:0C:82:C6","manufactureModel":"GC-X22FTQXL.AMCRGAP","manufacturedAt":"2023-08-17T18:08:29+00:00","registeredAt":"2023-08-18T05:13:29.401844+00:00","salesModel":"GF-V570MBLC.AMCRGAP","serialNo":"308TRSE1W286"},"online":true,"platformType":"thinq2","homeDeviceOrder":-1,"roomDeviceOrder":-1,"ownershipYn":"N","modelJsonVer":"1.03","modelJsonUri":" https://objectcontent.lgthinq.com/bbd03ab5-37cf-4679-8eee-68fbd7ae8faf?hdnts=exp=1763884709~hmac=c5622b5c1b8a8fe10c4953e0638fee07b958df74a96e79faa64397aca6fef051 ","appModuleVer":"303.35","appModuleUri":" https://objectcontent.lgthinq.com/d9e9cbd3-9734-4d6b-88d4-003d35cd5ca1?hdnts=exp=1763600486~hmac=a76bfbf93a566c767708fc4f50876f0101b926420b1f37c012d4dc951fbf8c99 ","appRestartYn":"Y","appModuleSize":"8344898","langPackProductTypeVer":"76.4","langPackProductTypeUri":" https://objectcontent.lgthinq.com/28beb7d1-d90e-420b-b708-6c889a5d4166?hdnts=exp=1770449317~hmac=4bd353c5861e15e97c76203673c1d5a39ef30484df74cefe6295537b7ea16a22 ","langPackModelVer":null,"langPackModelUri":null,"roomId":"160422194461218976","fwInfoList":[{"checksum":"01075684","order":2,"partNumber":"SAA43460901"},{"checksum":"00000443","order":1,"partNumber":"SAA43461001"}],"modemInfo":{"appVersion":"clip_hna_v1.9.198","modelName":"2REF11EICSP_4","modemType":"RTK_RTL8711am","oneshot":"y","ruleEngine":"y","size":1572864},"modemConfig":{"online_check":"y"},"existsEntryPopup":"N","fwVer":null,"modemVer":"clip_hna_v1.9.183","subDeviceCount":0,"firebaseLogKey":null,"cardType":"Small","cardControl":"Base","detailDeviceCode":null,"upgradableYn":"N","autoFwDownloadYn":"N","homeMovableYn":"Y","protocolVersion":null,"btAddress":null,"isTLV":null,"jsonList":null,"mdFotaYn":"Y","demandType":"RTK_RTL8711am"}

(The fridge has UV sterilisation for the water dispenser - it would be good if this could be activated from HomeKit but it appears that this is not exposed in the ThinQ App)

if you can't control it in LG app, this plugin can't too

I suspect that is true. Although the debug info makes me think there might be features that are not present in all markets (eg Sabbath Mode!)

Reply to this email directly, view it on GitHub https://github.com/nVuln/homebridge-lg-thinq/issues/267#issuecomment-1940526683, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJP3T2G54DRDGEBTTD2OE3YTMFDLAVCNFSM6AAAAABAFPLXM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBQGUZDMNRYGM . You are receiving this because you authored the thread.Message ID: @.***>

nVuln commented 7 months ago

There is no such setting for my new fridge. (I still have my old fridge in the config file and I can see the setting there) But I can’t see a switch in the home app. Looking at the plugin config I can see the old one is identified as "type": "REFRIGERATOR" but the new one isn’t.

did you used homebridge UI? try add config below

{
            "id": "54b473e5-bd3a-1bc4-8c35-a436c70c82c6",
            "name": "New Fridge",
            "ref_express_fridge": true,
            "ref_express_freezer": true
}

this config will enable 2 more button, let see which one is correct for you

I suspect that is true. Although the debug info makes me think there might be features that are not present in all markets (eg Sabbath Mode!)

try debug it like you did with "Smart Learning", maybe it's present as different name in API

malwcal commented 7 months ago

On 13 Feb 2024 at 21:51:13, nVuln @.***> wrote:

There is no such setting for my new fridge. (I still have my old fridge in the config file and I can see the setting there) But I can’t see a switch in the home app. Looking at the plugin config I can see the old one is identified as "type": "REFRIGERATOR" but the new one isn’t.

did you used homebridge UI?

I tried to use home bridge UI, but no settings appeared in the UI until I edited the config.json to include "type": "REFRIGERATOR". Is this supposed to be detected automatically?

try add config below

{ "id": "54b473e5-bd3a-1bc4-8c35-a436c70c82c6", "name": "New Fridge", "ref_express_fridge": true, "ref_express_freezer": true }

I have now done this - but as mentioned added to set the type as well.

this config will enable 2 more button, let see which one is correct for you

Express freezer is the right one. (I can turn express Fridge on and off but it doesn’t seem to do anything).

I suspect that is true. Although the debug info makes me think there might

be features that are not present in all markets (eg Sabbath Mode!)

try debug it like you did with "Smart Learning", maybe it's present as different name in API

Its not clear how much value some of that would be.

There are many more things in the thinq app - ice modes, detection the ice dispenser is full, indications that the fridge/freezer is temperature is being maintained, indications that food safety has been kept etc. I guess it could be useful to expose some of that to HomeKit.

I— Reply to this email directly, view it on GitHub https://github.com/nVuln/homebridge-lg-thinq/issues/267#issuecomment-1941393022, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJP3TYPCUV5I4V6AI3PQYLYTNLDTAVCNFSM6AAAAABAFPLXM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBRGM4TGMBSGI . You are receiving this because you authored the thread.Message ID: @.***>