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
196 stars 49 forks source link

Improper status of air purifier (thinq1 server) on homebrige #172

Open shonsj opened 2 years ago

shonsj commented 2 years ago

Describe The Bug: After running home bridge server for few hrs, it starts showing improper status of air purifier (thinq1 server) on HomeKit and home bridge.

  1. Even though the air purifier is running on, but the status shows it stays turned off (But it shows only the status of light from air purifier properly.)

  2. However, After running the "LG thing app" through my iPhone, then the status starts to shows proper info (Like all status back to normal and working properly on home bridge.)

  3. But few hrs later, the issue showing improper info of status pops up again.

Expected behavior: With considering that the light from air purifier always shows right status on home bridge, Please check whether to fix this issue... Thanks for your support.

IMG_5027

My log [6/18/2022, 12:36:15 PM] [LGThinQ] [공기청정기 상준] Received snapshot: {"airState.opMode":13,"airState.operation":true,"airState.tempState.current":40,"airState.tempState.target":0,"airState.windStrength":8,"airState.wDir.vStep":0,"airState.wDir.hStep":0,"airState.circulate.rotate":1,"airState.lightingState.signal":1,"airState.quality.overall":1,"airState.quality.sensorMon":1,"airState.quality.PM1":8,"airState.quality.PM2":8,"airState.quality.PM10":9,"airState.wMode.jet":0,"online":true,"raw":{"Operation":"1","OpMode":"13","WindStrength":"8","TempUnit":"NS","TempCur":"40","TempCfg":"0","GroupType":"12","SleepTime":"0","OnTime":"0","OffTime":"0","RacAddFunc":"NS","ExtraOp":"0","DiagCode":"00","TimeBsOn":"0","TimeBsOff":"0","AirClean":"0","AutoDry":"0","PowerSave":"0","WDirVStep":"0","WDirHStep":"0","TempLimitMax":"0","TempLimitMin":"0","DuctZoneType":"0","ZoneControl":"0","DRED":"0","SensorPM1":"8","SensorPM2":"8","SensorPM10":"9","AirPolution":"1","HumidityCfg":"0","WaterTempCoolMin":"NS","WaterTempCoolMax":"NS","WaterTempHeatMin":"NS","WaterTempHeatMax":"NS","HotWaterTempMin":"NS","HotWaterTempMax":"NS","SensorHumidity":"30","TotalAirPolution":"1","SensorMon":"1","CleanDry":"0","ProductStatus":"0","AirMonitoring":"0","Humidification":"0","AirFast":"0","AirRemoval":"1","AirUVDisinfection":"0","WatertankLight":"0","SignalLighting":"1","WDirUpDown":"0","WDirLeftRight":"0","WSwirl":"0","Jet":"0","LowHeating":"0","CirculateStrength":"6","CirculateDir":"1","AntiBugs":"0","IceValley":"0","Humsave":"0","WaterTempCur":"0","HotWaterTempCur":"0","HotWaterTempCfg":"0","HotWaterMode":"0","HotWater":"0","AWHPTempCfgSwitch":"0","AirTempCoolMin":"NS","AirTempCoolMax":"NS","AirTempHeatMin":"NS","AirTempHeatMax":"NS","WaterInTempCur":"0","AWHPWATempControlSta":"0","DisplayControl":"0","SmartCare":"0","TwoSetCoolTemp":"0","TwoSetHeatTemp":"0","TwoSetCoolUSL":"0","TwoSetCoolLSL":"0","TwoSetHeatUSL":"0","TwoSetHeatLSL":"0","TwoSetACOState":"0","TwoSetModeDeadband":"0","TwoSetState":"0"}} [6/18/2022, 12:36:15 PM] [LGThinQ] [request] post https://kic.lgthinq.com:46030/api/rti/rtiResult [6/18/2022, 12:36:15 PM] [LGThinQ] [공기청정기 거실] Received snapshot: {"airState.opMode":13,"airState.operation":true,"airState.tempState.current":40,"airState.tempState.target":0,"airState.windStrength":8,"airState.wDir.vStep":0,"airState.wDir.hStep":0,"airState.circulate.rotate":1,"airState.lightingState.signal":1,"airState.quality.overall":1,"airState.quality.sensorMon":1,"airState.quality.PM1":8,"airState.quality.PM2":8,"airState.quality.PM10":11,"airState.wMode.jet":0,"online":true,"raw":{"Operation":"1","OpMode":"13","WindStrength":"8","TempUnit":"NS","TempCur":"40","TempCfg":"0","GroupType":"12","SleepTime":"0","OnTime":"0","OffTime":"0","RacAddFunc":"NS","ExtraOp":"0","DiagCode":"00","TimeBsOn":"0","TimeBsOff":"0","AirClean":"0","AutoDry":"0","PowerSave":"0","WDirVStep":"0","WDirHStep":"0","TempLimitMax":"0","TempLimitMin":"0","DuctZoneType":"0","ZoneControl":"0","DRED":"0","SensorPM1":"8","SensorPM2":"8","SensorPM10":"11","AirPolution":"1","HumidityCfg":"0","SensorHumidity":"30","TotalAirPolution":"1","SensorMon":"1","CleanDry":"0","ProductStatus":"0","AirMonitoring":"0","Humidification":"0","AirFast":"0","AirRemoval":"1","AirUVDisinfection":"0","MoodLuminosity":"0","SignalLighting":"1","WDirUpDown":"0","WDirLeftRight":"0","WSwirl":"0","Jet":"0","LowHeating":"0","CirculateStrength":"2","CirculateDir":"1","AntiBugs":"0"}} [6/18/2022, 12:36:15 PM] [LGThinQ] [request] post https://kic.lgthinq.com:46030/api/rti/rtiResult [6/18/2022, 12:36:15 PM] [LGThinQ] [공기청정기 누나] Received snapshot: {"airState.opMode":13,"airState.operation":false,"airState.tempState.current":40,"airState.tempState.target":0,"airState.windStrength":8,"airState.wDir.vStep":0,"airState.wDir.hStep":0,"airState.circulate.rotate":0,"airState.lightingState.signal":0,"airState.quality.overall":1,"airState.quality.sensorMon":1,"airState.quality.PM1":8,"airState.quality.PM2":8,"airState.quality.PM10":10,"airState.wMode.jet":0,"online":true,"raw":{"Operation":"0","OpMode":"13","WindStrength":"8","TempUnit":"NS","TempCur":"40","TempCfg":"0","GroupType":"12","SleepTime":"0","OnTime":"0","OffTime":"0","RacAddFunc":"NS","ExtraOp":"0","DiagCode":"00","TimeBsOn":"0","TimeBsOff":"0","AirClean":"0","AutoDry":"0","PowerSave":"0","WDirVStep":"0","WDirHStep":"0","TempLimitMax":"0","TempLimitMin":"0","DuctZoneType":"0","ZoneControl":"0","DRED":"0","SensorPM1":"8","SensorPM2":"8","SensorPM10":"10","AirPolution":"1","HumidityCfg":"0","WaterTempCoolMin":"NS","WaterTempCoolMax":"NS","WaterTempHeatMin":"NS","WaterTempHeatMax":"NS","HotWaterTempMin":"NS","HotWaterTempMax":"NS","SensorHumidity":"30","TotalAirPolution":"1","SensorMon":"1","CleanDry":"0","ProductStatus":"0","AirMonitoring":"0","Humidification":"0","AirFast":"0","AirRemoval":"0","AirUVDisinfection":"0","WatertankLight":"0","SignalLighting":"0","WDirUpDown":"0","WDirLeftRight":"0","WSwirl":"0","Jet":"0","LowHeating":"0","CirculateStrength":"8","CirculateDir":"0","AntiBugs":"0","IceValley":"0","Humsave":"0","WaterTempCur":"0","HotWaterTempCur":"0","HotWaterTempCfg":"0","HotWaterMode":"0","HotWater":"0","AWHPTempCfgSwitch":"0","AirTempCoolMin":"NS","AirTempCoolMax":"NS","AirTempHeatMin":"NS","AirTempHeatMax":"NS","WaterInTempCur":"0","AWHPWATempControlSta":"0","DisplayControl":"0","SmartCare":"0","TwoSetCoolTemp":"0","TwoSetHeatTemp":"0","TwoSetCoolUSL":"0","TwoSetCoolLSL":"0","TwoSetHeatUSL":"0","TwoSetHeatLSL":"0","TwoSetACOState":"0","TwoSetModeDeadband":"0","TwoSetState":"0"}}

nVuln commented 2 years ago

may be you got same issue on #159 , please try install test version v1.2.17-test.1 and see if it's worked

shonsj commented 2 years ago

may be you got same issue on #159 , please try install test version v1.2.17-test.1 and see if it's worked

Hi sir. I'm currently using v1.2.17-test.1. But I have same issue on it. Also, this issue has been found from 1.2.13 i think

nVuln commented 2 years ago

may be you got same issue on #159 , please try install test version v1.2.17-test.1 and see if it's worked

Hi sir. I'm currently using v1.2.17-test.1. But I have same issue on it. Also, this issue has been found from 1.2.13 i think

unfortunately I don't have any thinq1 device to debug it please turn on homebridge debug mode, wait until that issue happened and see if any debug message appear

homebridge debug mode
shonsj commented 2 years ago

may be you got same issue on #159 , please try install test version v1.2.17-test.1 and see if it's worked

Hi sir. I'm currently using v1.2.17-test.1. But I have same issue on it. Also, this issue has been found from 1.2.13 i think

unfortunately I don't have any thinq1 device to debug it please turn on homebridge debug mode, wait until that issue happened and see if any debug message appear homebridge debug mode

As shown on pic, the status shows only for light properly (but the air purifier get stay turned on at that moment). Also, I've attached two version of my log.

  1. First log got collected before running LG THINQ APP on iPhone
  2. Second one got collected after running LG THINQ APP on iPhon
스크린샷 2022-06-18 오후 5 00 14

MY LOG before running "LG THINQ APP" (Except for this error log, haven't found any other log related to air purifier.)

[6/18/2022, 5:00:48 PM] [LGThinQ] [request] post https://kic.lgthinq.com:46030/api/rti/rtiControl [6/18/2022, 5:00:50 PM] [homebridge-lg-thinq] This plugin threw an error from the characteristic 'On': Unhandled error thrown inside read handler for characteristic: Cannot read properties of null (reading 'AirFast'). See https://homebridge.io/w/JtMGR for more info. [6/18/2022, 5:00:50 PM] [homebridge-lg-thinq] TypeError: Cannot read properties of null (reading 'AirFast') at On.getHandler (/usr/local/lib/node_modules/homebridge-lg-thinq/src/v1/devices/AirPurifier.ts:72:60) at On. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1528:32) at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:144:27) at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:125:57) at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:118:75 at new Promise () at __awaiter (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:114:16) at On.Characteristic.handleGetRequest (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Characteristic.js:689:38) at Bridge. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1569:27) at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:144:27) [6/18/2022, 5:00:50 PM] [homebridge-lg-thinq] This plugin threw an error from the characteristic 'On': Unhandled error thrown inside read handler for characteristic: Cannot read properties of null (reading 'AirFast'). See https://homebridge.io/w/JtMGR for more info. [6/18/2022, 5:00:50 PM] [homebridge-lg-thinq] TypeError: Cannot read properties of null (reading 'AirFast') at On.getHandler (/usr/local/lib/node_modules/homebridge-lg-thinq/src/v1/devices/AirPurifier.ts:72:60) at On. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1528:32) at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:144:27) at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:125:57) at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:118:75 at new Promise () at __awaiter (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:114:16) at On.Characteristic.handleGetRequest (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Characteristic.js:689:38) at Bridge. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1569:27) at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:144:27)

**LOG AFTER RUNNING the "LG THINQ APP"

[6/18/2022, 5:04:15 PM] [LGThinQ] [request] post https://kic.lgthinq.com:46030/api/rti/rtiResult [6/18/2022, 5:04:15 PM] [LGThinQ] [공기청정기 첫번째] Received snapshot: {"airState.opMode":13,"airState.operation":true,"airState.tempState.current":40,"airState.tempState.target":0,"airState.windStrength":13,"airState.wDir.vStep":0,"airState.wDir.hStep":0,"airState.circulate.rotate":1,"airState.lightingState.signal":1,"airState.quality.overall":1,"airState.quality.sensorMon":1,"airState.quality.PM1":8,"airState.quality.PM2":8,"airState.quality.PM10":10,"airState.wMode.jet":0,"online":true,"raw":{"Operation":"1","OpMode":"13","WindStrength":"13","TempUnit":"NS","TempCur":"40","TempCfg":"0","GroupType":"12","SleepTime":"0","OnTime":"0","OffTime":"0","RacAddFunc":"NS","ExtraOp":"0","DiagCode":"00","TimeBsOn":"0","TimeBsOff":"0","AirClean":"0","AutoDry":"0","PowerSave":"0","WDirVStep":"0","WDirHStep":"0","TempLimitMax":"0","TempLimitMin":"0","DuctZoneType":"0","ZoneControl":"0","DRED":"0","SensorPM1":"8","SensorPM2":"8","SensorPM10":"10","AirPolution":"1","HumidityCfg":"0","WaterTempCoolMin":"NS","WaterTempCoolMax":"NS","WaterTempHeatMin":"NS","WaterTempHeatMax":"NS","HotWaterTempMin":"NS","HotWaterTempMax":"NS","SensorHumidity":"30","TotalAirPolution":"1","SensorMon":"1","CleanDry":"0","ProductStatus":"0","AirMonitoring":"0","Humidification":"0","AirFast":"1","AirRemoval":"1","AirUVDisinfection":"0","WatertankLight":"0","SignalLighting":"1","WDirUpDown":"0","WDirLeftRight":"0","WSwirl":"0","Jet":"0","LowHeating":"0","CirculateStrength":"6","CirculateDir":"1","AntiBugs":"0","IceValley":"0","Humsave":"0","WaterTempCur":"0","HotWaterTempCur":"0","HotWaterTempCfg":"0","HotWaterMode":"0","HotWater":"0","AWHPTempCfgSwitch":"0","AirTempCoolMin":"NS","AirTempCoolMax":"NS","AirTempHeatMin":"NS","AirTempHeatMax":"NS","WaterInTempCur":"0","AWHPWATempControlSta":"0","DisplayControl":"0","SmartCare":"0","TwoSetCoolTemp":"0","TwoSetHeatTemp":"0","TwoSetCoolUSL":"0","TwoSetCoolLSL":"0","TwoSetHeatUSL":"0","TwoSetHeatLSL":"0","TwoSetACOState":"0","TwoSetModeDeadband":"0","TwoSetState":"0"}}

nVuln commented 2 years ago

I just published v1.2.17-test.2 to improve AirFast issue on above debug log, please try it

shonsj commented 2 years ago

I just published v1.2.17-test.2 to improve AirFast issue on above debug log, please try it

Sorry mate. I think this happens cuz of issue from my internet server. I will check it when my server is back to normal.

Sorry for confusion.. really sorry. Please ignore my previous comment.


Hi sir. Thanks for your supports.

The debug log above (#172) is related to status issue for air purifier, not about air fast issue. Also, after updating to 1.2.17-test.2, the air fast mode starts not working and no log related to air fast pops up after turning on the air fast mode.

nVuln commented 2 years ago

I just published v1.2.17-test.2 to improve AirFast issue on above debug log, please try it

Sorry mate. I think this happens cuz of issue from my internet server. I will check it when my server is back to normal.

Sorry for confusion.. really sorry. Please ignore my previous comment.

Hi sir. Thanks for your supports.

The debug log above (#172) is related to status issue for air purifier, not about air fast issue. Also, after updating to 1.2.17-test.2, the air fast mode starts not working and no log related to air fast pops up after turning on the air fast mode.

don't worry, I heard about that issue before but I don't have thinq1 to debug it in v1.2.17, air fast mode may need to be enabled in plugin setting before it's can work normally

about device status not correctly, just wait it happen again, then check debug log, or try do some action (ex: turn on/off via homebridge) and check debug log again

shonsj commented 2 years ago

I just published v1.2.17-test.2 to improve AirFast issue on above debug log, please try it

Sorry mate. I think this happens cuz of issue from my internet server. I will check it when my server is back to normal. Sorry for confusion.. really sorry. Please ignore my previous comment. Hi sir. Thanks for your supports. The debug log above (#172) is related to status issue for air purifier, not about air fast issue. Also, after updating to 1.2.17-test.2, the air fast mode starts not working and no log related to air fast pops up after turning on the air fast mode.

don't worry, I heard about that issue before but I don't have thinq1 to debug it in v1.2.17, air fast mode may need to be enabled in plugin setting before it's can work normally

about device status not correctly, just wait it happen again, then check debug log, or try do some action (ex: turn on/off via homebridge) and check debug log again

Hi. Sir. Here is what I got from 1.2.17-test.2

About Air fan mode, It's not working and also no log following after turning on or off this function. Seems like my air purifier can't retrieve any signal from home bridge.

I think if it's possible, better to give options to turn off this function, air fan mode. (My air purifier model is AIR_910604_WW)

About status issue. #172 Before opening LG thing APP on my iphone, there's no log shown on home bridge and no updates on status from Air purifier. But some logs got found after doing some action (Turn on & off)

[6/19/2022, 5:01:30 PM] [LGThinQ] [request] post https://kic.lgthinq.com:46030/api/rti/rtiControl [6/19/2022, 5:01:30 PM] [LGThinQ] [request] post https://kic.lgthinq.com:46030/api/rti/rtiControl

BUT After running on LG thing APP, I got this log.

[6/19/2022, 5:02:33 PM] [LGThinQ] [공기청정기 첫번째] Received snapshot: {"airState.opMode":13,"airState.operation":true,"airState.tempState.current":40,"airState.tempState.target":0,"airState.windStrength":8,"airState.wDir.vStep":0,"airState.wDir.hStep":0,"airState.circulate.rotate":1,"airState.lightingState.signal":1,"airState.quality.overall":1,"airState.quality.sensorMon":1,"airState.quality.PM1":8,"airState.quality.PM2":8,"airState.quality.PM10":10,"airState.wMode.jet":0,"airState.miscFuncState.airFast":false,"online":true,"raw":{"Operation":"1","OpMode":"13","WindStrength":"8","TempUnit":"NS","TempCur":"40","TempCfg":"0","GroupType":"12","SleepTime":"0","OnTime":"0","OffTime":"0","RacAddFunc":"NS","ExtraOp":"0","DiagCode":"00","TimeBsOn":"0","TimeBsOff":"0","AirClean":"0","AutoDry":"0","PowerSave":"0","WDirVStep":"0","WDirHStep":"0","TempLimitMax":"0","TempLimitMin":"0","DuctZoneType":"0","ZoneControl":"0","DRED":"0","SensorPM1":"8","SensorPM2":"8","SensorPM10":"10","AirPolution":"1","HumidityCfg":"0","WaterTempCoolMin":"NS","WaterTempCoolMax":"NS","WaterTempHeatMin":"NS","WaterTempHeatMax":"NS","HotWaterTempMin":"NS","HotWaterTempMax":"NS","SensorHumidity":"30","TotalAirPolution":"1","SensorMon":"1","CleanDry":"0","ProductStatus":"0","AirMonitoring":"0","Humidification":"0","AirFast":"0","AirRemoval":"1","AirUVDisinfection":"0","WatertankLight":"0","SignalLighting":"1","WDirUpDown":"0","WDirLeftRight":"0","WSwirl":"0","Jet":"0","LowHeating":"0","CirculateStrength":"4","CirculateDir":"1","AntiBugs":"0","IceValley":"0","Humsave":"0","WaterTempCur":"0","HotWaterTempCur":"0","HotWaterTempCfg":"0","HotWaterMode":"0","HotWater":"0","AWHPTempCfgSwitch":"0","AirTempCoolMin":"NS","AirTempCoolMax":"NS","AirTempHeatMin":"NS","AirTempHeatMax":"NS","WaterInTempCur":"0","AWHPWATempControlSta":"0","DisplayControl":"0","SmartCare":"0","TwoSetCoolTemp":"0","TwoSetHeatTemp":"0","TwoSetCoolUSL":"0","TwoSetCoolLSL":"0","TwoSetHeatUSL":"0","TwoSetHeatLSL":"0","TwoSetACOState":"0","TwoSetModeDeadband":"0","TwoSetState":"0"}}

bayramog commented 12 months ago

I have the same issue for my thinq1 AC device. After homebridge starts, a while later AC shows current temperature as 0,5 celcius at Apple Home app. When I look to logs there is no snapshot after request post log. But when I open LG ThinQ app on my phone, bum, starts to receive snapshots.