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
217 stars 48 forks source link

Add device support for Range Hood #85

Open ozTahu opened 2 years ago

ozTahu commented 2 years ago

Which device do you want to add? Please describe: LG Studio Range Hood

Describe the solution you'd like. Turn hood lights on/off so I can tie them into the rest of the kitchen lights. Fan control is not essential for me at this point. And thanks for the already awesome plugin!

Device Data: [2021-09-17, 9:40:01 p.m.] [LGThinQ] Found device: {"deviceId":"f07ee690-26a9-11ea-b0e9-0051ed5ab4f9","deviceType":304,"modelName":"STUDIO_HOOD","subModelNm":"","sensorType":null,"alias":"Hood","deviceCode":"KI09","networkType":"02","tftYn":"N","guideTypeYn":"Y","guideType":"TYPE1","pccModelYn":"N","autoOrderYn":"N","drServiceYn":"N","ssid":"VIDEOTRON6046","timezoneCode":"America/Toronto","timezoneCodeAlias":"USA/Toronto","sdsGuide":"{\"deviceCode\":\"KI09\"}","newRegYn":"N","remoteControlType":"","fareTarget":null,"area":"55488","sleep":null,"deviceState":"E","rmsClientId":null,"regDtUtc":"20200509232743000","regIndex":0,"blackboxYn":null,"groupableYn":"N","controllableYn":"N","combinedProductYn":"N","masterYn":"Y","manufacture":null,"online":false,"platformType":"thinq1","homeDeviceOrder":-1,"roomDeviceOrder":4,"ownershipYn":"Y","modelJsonVer":"0.5","modelJsonUri":"https://aic.lgthinq.com:46030/api/webContents/modelJSON?modelName=STUDIO_HOOD&countryCode=WW&contentsId=JS0915012713291927&authKey=thinq","appModuleVer":"1.05","appModuleUri":"https://objectcontent.lgthinq.com/8d3dd907-f121-44ab-830b-508c33bd6b87?hdnts=exp=1679822146~hmac=7755de9e0d067163a04a408984bbf51992cc763ab9ab6b05a7a8fb562c609e2c","appRestartYn":"Y","appModuleSize":"4481753","langPackProductTypeVer":"39.4","langPackProductTypeUri":"https://objectcontent.lgthinq.com/afb1539e-ff8c-48cc-a06b-2fe8026da4df?hdnts=exp=1693615578~hmac=80e1d5fad032615946aea38aeea571318e6ea2380043a856556d63254ec81f2d","langPackModelVer":"","langPackModelUri":"","roomId":"160053364678444632","fwInfoList":null,"modemInfo":null,"existsEntryPopup":"N","fwVer":"QC_Modem_1.2.80","modemVer":null,"subDeviceCount":0,"firebaseLogKey":"T:HD-B:Studio","cardType":"Small","cardControl":"Base"} [2021-09-17, 9:40:02 p.m.] [LGThinQ] Device not supported: f07ee690-26a9-11ea-b0e9-0051ed5ab4f9: Hood (HOOD STUDIO_HOOD)

nVuln commented 2 years ago

I'll do it when I have time, just want to make clear some

ozTahu commented 2 years ago

Thanks kindly for your prompt response!

The lamp has OFF, 1 & 2. I assume 0 (zero) means OFF, 1 is half brightness, 2 is full brightness.

The fan has Off, 1,2,3,4 & 5. I assume 0 (zero) means OFF as well, 1 through 5 the fan gets faster with 5 being the maximum.

No

There is a "Timer button" on the Hood but I don't see any link to that in the app. (I don't need the timer in the plugin)

Images of the app and buttons on the hood below...

Thanks again!

IMG_5143 IMG_5142 IMG_5144

pknaz commented 2 years ago

I also would love to see support for this exact range hood, thanks! Happy to help if I can in any way.

nVuln commented 2 years ago

I also would love to see support for this exact range hood, thanks! Happy to help if I can in any way.

is your Range Hood using thinq 2? please turn on homebridge debug mode and upload some device data in debug logging

ozTahu commented 2 years ago

From what I can tell (I'm no expert..) it is thinq 1. Hope that helps....

Thanks again for you work.

[2022-04-09, 11:35:13 a.m.] [LGThinQ] Device skipped: DB86B601-7723-4A3A-897C-3BB9A6F2613D [2022-04-09, 11:35:13 a.m.] [LGThinQ] Device data: {"deviceId":"f07ee690-26a9-11ea-b0e9-0051ed5ab4f9","deviceType":304,"modelName":"STUDIO_HOOD","subModelNm":"","sensorType":null,"alias":"Hood","deviceCode":"KI09","networkType":"02","tftYn":"N","guideTypeYn":"Y","guideType":"TYPE1","pccModelYn":"N","autoOrderYn":"N","drServiceYn":"N","ssid":"VIDEOTRON6046","timezoneCode":"America/Toronto","timezoneCodeAlias":"USA/Toronto","sdsGuide":"{\"deviceCode\":\"KI09\"}","newRegYn":"N","remoteControlType":"","fareTarget":null,"area":"55488","sleep":null,"deviceState":"E","rmsClientId":null,"regDtUtc":"20200509232743000","regIndex":0,"blackboxYn":null,"groupableYn":"N","controllableYn":"N","combinedProductYn":"N","masterYn":"Y","manufacture":null,"online":false,"platformType":"thinq1","homeDeviceOrder":4,"roomDeviceOrder":4,"ownershipYn":"Y","modelJsonVer":"0.5","modelJsonUri":"https://aic.lgthinq.com:46030/api/webContents/modelJSON?modelName=STUDIO_HOOD&countryCode=WW&contentsId=JS0915012713291927&authKey=thinq","appModuleVer":"1.05","appModuleUri":"https://objectcontent.lgthinq.com/8d3dd907-f121-44ab-830b-508c33bd6b87?hdnts=exp=1679822146~hmac=7755de9e0d067163a04a408984bbf51992cc763ab9ab6b05a7a8fb562c609e2c","appRestartYn":"Y","appModuleSize":"4481753","langPackProductTypeVer":"41.0","langPackProductTypeUri":"https://objectcontent.lgthinq.com/4e3cb446-05e3-4157-8bb4-cae588c640f8?hdnts=exp=1702452645~hmac=c289319ac662481e22913ce60062689ca92dd06055987a8c6e488b70014a7a2f","langPackModelVer":"","langPackModelUri":"","roomId":"160053364678444632","fwInfoList":null,"modemInfo":null,"existsEntryPopup":"N","fwVer":"QC_Modem_1.2.80","modemVer":null,"subDeviceCount":0,"firebaseLogKey":"T:HD-B:Studio","cardType":"Small","cardControl":"Base","detailDeviceCode":null,"upgradableYn":"N","autoFwDownloadYn":null} [2022-04-09, 11:35:13 a.m.] [LGThinQ] [Hood] Setting up device! [2022-04-09, 11:35:13 a.m.] [LGThinQ] [request] post https://aic.lgthinq.com:46030/api/rti/rtiMon [2022-04-09, 11:35:13 a.m.] [LGThinQ] Device not supported: f07ee690-26a9-11ea-b0e9-0051ed5ab4f9: Hood (HOOD STUDIO_HOOD) [2022-04-09, 11:35:13 a.m.] [LGThinQ] Start MQTT listener for thinq2 device [2022-04-09, 11:35:14 a.m.] [LGThinQ] [request] post https://aic.lgthinq.com:46030/api/rti/rtiMon [2022-04-09, 11:35:14 a.m.] [LGThinQ] f07ee690-26a9-11ea-b0e9-0051ed5ab4f9 - unregistered! [2022-04-09, 11:35:14 a.m.] [LGThinQ] [request] get https://common.lgthinq.com/route [2022-04-09, 11:35:14 a.m.] [LGThinQ] [request] get https://www.amazontrust.com/repository/AmazonRootCA1.pem [2022-04-09, 11:35:14 a.m.] [LGThinQ] [request] post https://aic-service.lgthinq.com:46030/v1/service/users/client [2022-04-09, 11:35:15 a.m.] [LGThinQ] [request] post https://aic-service.lgthinq.com:46030/v1/service/users/client/certificate [2022-04-09, 11:35:15 a.m.] [LGThinQ] open mqtt connection to ssl://a3phael99lf879-ats.iot.us-west-2.amazonaws.com:8883 [2022-04-09, 11:35:16 a.m.] [LGThinQ] Successfully connected to the MQTT server. [2022-04-09, 11:35:16 a.m.] [LGThinQ] mqtt connected: ssl://a3phael99lf879-ats.iot.us-west-2.amazonaws.com:8883

pknaz commented 2 years ago

I also would love to see support for this exact range hood, thanks! Happy to help if I can in any way.

is your Range Hood using thinq 2? please turn on homebridge debug mode and upload some device data in debug logging

[4/30/2022, 7:09:00 PM] [LGThinQ] Device data: {"deviceId":"76b907bb-5805-1193-8db5-24e8536cd594","deviceType":304,"modelName":"STUDIO_HOOD","subModelNm":null,"sensorType":null,"alias":"Hood","deviceCode":"KI09","networkType":"02","tftYn":"N","guideTypeYn":"Y","guideType":"TYPE1","pccModelYn":"N","autoOrderYn":"N","drServiceYn":"N","sdsGuide":"{\"deviceCode\":\"KI09"}","newRegYn":"N","remoteControlType":"","fareTarget":null,"sleep":null,"deviceState":"E","rmsClientId":null,"regIndex":0,"blackboxYn":"Y","groupableYn":"N","controllableYn":"N","combinedProductYn":"N","masterYn":"Y","snapshot":{"mid":68313225,"online":true,"hoodState":{"ventMode":"NOT_SET","dummyData":0,"error":"DISABLE","ventLevel":0,"lampSet":"ENABLE","remainTimeMinute":0,"ventSet":"ENABLE","hoodFotaEnable":"ENABLE","remainTimeSecond":0,"childLock":"DISABLE","standyMode":"DISABLE","lampLevel":0,"hoodState":"INIT"},"static":{"deviceType":"304","countryCode":"US"},"meta":{"allDeviceInfoUpdate":true,"messageId":"QjKnUMigTuWwBiDcdCjsoQ"},"timestamp":1651359790099},"manufacture":null,"online":true,"platformType":"thinq2","homeDeviceOrder":3,"roomDeviceOrder":2,"ownershipYn":"Y","modelJsonVer":"0.61","modelJsonUri":"https://objectcontent.lgthinq.com/b8d132ea-1ce8-47c8-90a1-127db64f0bb6?hdnts=exp=1696845622~hmac=43be0188e6be218f2990a94bc838eb270d174789c8170a9b4217388a5ea9d469","appModuleVer":"1.05","appModuleUri":"https://objectcontent.lgthinq.com/8d3dd907-f121-44ab-830b-508c33bd6b87?hdnts=exp=1679822146~hmac=7755de9e0d067163a04a408984bbf51992cc763ab9ab6b05a7a8fb562c609e2c","appRestartYn":"Y","appModuleSize":"4481753","langPackProductTypeVer":"41.9","langPackProductTypeUri":"https://objectcontent.lgthinq.com/d5440eed-2d8d-4dd2-bc19-07c62a56bc49?hdnts=exp=1714016080~hmac=4491f2084c7179beb4a6313e164464ea7ae70dd3098865c16e858e7e00c10655","langPackModelVer":null,"langPackModelUri":null,"roomId":"162111854457768825","fwInfoList":null,"modemInfo":{"modelName":"STUDIO_HOOD","appVersion":"clip_hna_v1.9.161","modemType":"QCOM_QCA4010","ruleEngine":"y"},"existsEntryPopup":"N","fwVer":null,"modemVer":"clip_hna_v1.9.094","subDeviceCount":0,"firebaseLogKey":"T:HD-B:Studio","cardType":"Small","cardControl":"Base","detailDeviceCode":null,"upgradableYn":"N","autoFwDownloadYn":"N"} [4/30/2022, 7:09:00 PM] [LGThinQ] [Hood] Setting up device! [4/30/2022, 7:09:00 PM] [LGThinQ] Device not supported: 76b907bb-5805-1193-8db5-24e8536cd594: Hood (HOOD STUDIO_HOOD)

nVuln commented 1 year ago

I have implement it on latest version, please help me test it because I don't have a "real" Hood here

ozTahu commented 1 year ago

No problem at all, happy to help.

Just updated homebridge and gave it a try. It shows up in the Home app in iOS OK but I am getting "no response" on the tile. Also, if I try to use the LG Thiq App it comes up with a prompt with "Hood is in use by another user. Try again later."

I noticed that after the update the home app had the hood light at 44 and fan at 48 even though both were switched off.

Let me know if there is any further info you require.

Thanks again for your work!

DEVICE DATA [2022-10-05, 4:16:02 p.m.] [LGThinQ] [request] post https://aic.lgthinq.com:46030/api/rti/rtiResult [2022-10-05, 4:16:02 p.m.] [LGThinQ] [Hood] Received snapshot: {"hoodState":{"ventMode":null,"error":null,"ventLevel":48,"lampSet":"DISABLE","remainTimeMinute":48,"ventSet":"DISABLE","hoodFotaEnable":"DISABLE","remainTimeSecond":48,"childLock":"DISABLE","standyMode":"DISABLE","lampLevel":44,"hoodState":"USING"},"online":true,"raw":{"HoodState":"48","VentLevel":"48","VentMode":"44","TimerMin":"48","TimerSec":"48","LampLevel":"44","Dummy":"2883632","HoodStateInfo":"48","WiFiAccess":"44"}}

IMG_5886

IMG_5887

nVuln commented 1 year ago

I just published v1.2.20-test.1 and fix some issue, please try it

ozTahu commented 1 year ago

No problem, I just need some guidance to implement this new version.

I don't see an update available in for the plugin in homebridge. Do I need to download it from somewhere else? I can't find v1.2.20-test.1 on the github page.

Thanks again for you work!

mtw13 commented 1 year ago

I was able to find the alternate version - just click the install alternate and then it is an option from the drop-down. Still not working for me. Trying to figure out the debug to post my data also.

nVuln commented 1 year ago

@ozTahu select Install alternate version

ozTahu commented 1 year ago

Thanks for that!

Just installed it and gave it a run.

Still getting "no response" on the tiles in the home app.

Getting the following... Hope it helps

[2022-10-07, 6:13:31 p.m.] [homebridge-lg-thinq] This plugin generated a warning from the characteristic 'Rotation Speed': characteristic was supplied illegal value: number 49 exceeded maximum of 5. See https://homebridge.io/w/JtMGR for more info. [2022-10-07, 6:13:31 p.m.] [homebridge-lg-thinq] Error: at RotationSpeed.Characteristic.characteristicWarning (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2142:105) at RotationSpeed.Characteristic.validateUserInput (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2049:14) at RotationSpeed.Characteristic.updateValue (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1457:20) at Fan.Service.updateCharacteristic (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:481:35) at RangeHood.updateAccessoryCharacteristic (/usr/lib/node_modules/homebridge-lg-thinq/src/devices/RangeHood.ts:113:22) at RangeHood.update (/usr/lib/node_modules/homebridge-lg-thinq/src/baseDevice.ts:33:10) at EventEmitter.emit (node:events:527:28) at Timeout._onTimeout (/usr/lib/node_modules/homebridge-lg-thinq/src/platform.ts:231:27) at processTicksAndRejections (node:internal/process/task_queues:96:5) [2022-10-07, 6:13:31 p.m.] [homebridge-lg-thinq] This plugin generated a warning from the characteristic 'Brightness': characteristic was supplied illegal value: number 44 exceeded maximum of 2. See https://homebridge.io/w/JtMGR for more info. [2022-10-07, 6:13:31 p.m.] [homebridge-lg-thinq] Error: at Brightness.Characteristic.characteristicWarning (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2142:105) at Brightness.Characteristic.validateUserInput (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2049:14) at Brightness.Characteristic.updateValue (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1457:20) at Lightbulb.Service.updateCharacteristic (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:481:35) at RangeHood.updateAccessoryCharacteristic (/usr/lib/node_modules/homebridge-lg-thinq/src/devices/RangeHood.ts:116:23) at RangeHood.update (/usr/lib/node_modules/homebridge-lg-thinq/src/baseDevice.ts:33:10) at EventEmitter.emit (node:events:527:28) at Timeout._onTimeout (/usr/lib/node_modules/homebridge-lg-thinq/src/platform.ts:231:27) at processTicksAndRejections (node:internal/process/task_queues:96:5)

ozTahu commented 1 year ago

@mtw13 Click on the sawtooth shape on the left of the restart button on the Hombridge homepage. That brings up the logs...

I then copy and paste the logs from there.

Hope that helps.

2022-10-07 (1)

mtw13 commented 1 year ago

Hello; I see that you’ve said that range hoods are now supported version 1.3.0, but I am still unable to control using HomeKit. I’ve tried removing the plugin and starting again, but no luck.

nVuln commented 1 year ago

Hello; I see that you’ve said that range hoods are now supported version 1.3.0, but I am still unable to control using HomeKit. I’ve tried removing the plugin and starting again, but no luck.

I don't have RangeHood right here so I don't know if it's worked or not, LG don't provide official document also everything I have is debug logging from user, so if you can't control it and see error log on debug logging please upload here, I'll do my best to fix it, just working step by step

you can see debug logging by turn on homebridge debug mode

homebridge debug mode
mtw13 commented 1 year ago

Hopefully this helps.

[30/12/2022, 22:19:47] [homebridge-lg-thinq] [request] post https://aic-service.lgthinq.com:46030/v1/service/devices/42b27f05-c497-111b-9160-xxxxxxxxxxxx/control-sync

[30/12/2022, 22:20:08] [homebridge-lg-thinq] request error: { status: 400, statusText: '400', headers: { date: 'Sat, 31 Dec 2022 04:20:08 GMT', 'content-type': 'application/json;charset=UTF-8', 'content-length': '42', connection: 'close' }, config: { url: 'https://aic-service.lgthinq.com:46030/v1/service/devices/42b27f05-c497-111b-9160-xxxxxxxxxxx/control-sync', method: 'post', data: '{"ctrlKey":"basicCtrl","command":"Set","dataKey":null,"dataValue":null,"dataSetList":{"hoodState":{"ventLevel":0}},"dataGetList":null}', headers: { Accept: 'application/json, text/plain, /', 'Content-Type': 'application/json', 'x-api-key': 'xxxxxxxxapi keyxxxxxxx==', 'x-thinq-app-ver': '3.6.1200', 'x-thinq-app-type': 'NUTS', 'x-thinq-app-level': 'PRD', 'x-thinq-app-os': 'ANDROID', 'x-thinq-app-logintype': 'LGE', 'x-service-code': 'SVC202', 'x-country-code': 'CA', 'x-language-code': 'en-CA', 'x-service-phase': 'OP', 'x-origin': 'app-native', 'x-model-name': 'samsung/SM-G930L', 'x-os-version': 'AOS/7.1.2', 'x-app-version': 'LG ThinQ/3.6.12110', 'x-message-id': 'dxxxxxmessage id xxxxxxxx', 'user-agent': 'okhttp/3.14.9', 'x-emp-token': 'xxxxxxxxxxxtokenxxxxxxxxxx', 'x-user-no': 'xxxxxxxuser numberxxxxxxx', 'x-client-id': 'xxxxxxxclient idxxxxxxxx', 'Content-Length': 134 }, transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 60000, adapter: [Function: httpAdapter], xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function: validateStatus], transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, 'axios-retry': { retryCount: 0, lastRequestTime: 1672460387595 } }, request: <ref 1> ClientRequest { _events: [Object: null prototype] { abort: [Function (anonymous)], aborted: [Function (anonymous)], connect: [Function (anonymous)], error: [Function (anonymous)], socket: [Function (anonymous)], timeout: [Function (anonymous)], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: false, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, secureConnecting: false, _SNICallback: null, servername: 'aic-service.lgthinq.com', alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object: null prototype], _eventsCount: 10, connecting: false, _hadError: false, _parent: null, _host: 'aic-service.lgthinq.com', _readableState: [ReadableState], _maxListeners: undefined, _writableState: [WritableState], allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [TLSWrap], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Circular 1], timeout: 60000,

  [Symbol(verified)]: true,
  [Symbol(pendingSession)]: null,
  [Symbol(async_id_symbol)]: 876,
  [Symbol(kHandle)]: [TLSWrap],
  [Symbol(kSetNoDelay)]: false,
  [Symbol(lastWriteQueueSize)]: 0,
  [Symbol(timeout)]: Timeout {
    _idleTimeout: 60000,
    _idlePrev: [TimersList],
    _idleNext: [Timeout],
    _idleStart: 126759,
    _onTimeout: [Function: bound ],
    _timerArgs: undefined,
    _repeat: null,
    _destroyed: false,
    [Symbol(refed)]: false,
    [Symbol(kHasPrimitive)]: false,
    [Symbol(asyncId)]: 891,
    [Symbol(triggerId)]: 879
  },
  [Symbol(kBuffer)]: null,
  [Symbol(kBufferCb)]: null,
  [Symbol(kBufferGen)]: null,
  [Symbol(kCapture)]: false,
  [Symbol(kBytesRead)]: 0,
  [Symbol(kBytesWritten)]: 0,
  [Symbol(connect-options)]: [Object],
  [Symbol(RequestTimeout)]: undefined
},
_header: 'POST /v1/service/devices/42b27f05-c497-111b-9160-xxxxxxxxxxxxx/control-sync HTTP/1.1\r\n' +
  'Accept: application/json, text/plain, */*\r\n' +
  'Content-Type: application/json\r\n' +
  'x-api-key: xxxxxxxxxapi keyxxxxxxxxx==\r\n' +
  'x-thinq-app-ver: 3.6.1200\r\n' +
  'x-thinq-app-type: NUTS\r\n' +
  'x-thinq-app-level: PRD\r\n' +
  'x-thinq-app-os: ANDROID\r\n' +
  'x-thinq-app-logintype: LGE\r\n' +
  'x-service-code: SVC202\r\n' +
  'x-country-code: CA\r\n' +
  'x-language-code: en-CA\r\n' +
  'x-service-phase: OP\r\n' +
  'x-origin: app-native\r\n' +
  'x-model-name: samsung/SM-G930L\r\n' +
  'x-os-version: AOS/7.1.2\r\n' +
  'x-app-version: LG ThinQ/3.6.12110\r\n' +
  'x-message-id: xxxxxxxxmessage idxxxxxxx\r\n' +
  'user-agent: okhttp/3.14.9\r\n' +
  'x-emp-token: xxxxxxxxxxxtokenxxxxxxxxxx\r\n' +
  'x-user-no: xxxxxxxxxxxuser noxxxxxxxxxx\r\n' +
  'x-client-id: xxxxxxxxxxclient idxxxxxxxxxx\r\n' +
  'Content-Length: 134\r\n' +
  'Host: aic-service.lgthinq.com:46030\r\n' +
  'Connection: close\r\n' +
  '\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: Agent {
  _events: [Object: null prototype],
  _eventsCount: 2,
  _maxListeners: undefined,
  defaultPort: 443,
  protocol: 'https:',
  options: [Object: null prototype],
  requests: [Object: null prototype] {},
  sockets: [Object: null prototype],
  freeSockets: [Object: null prototype] {},
  keepAliveMsecs: 1000,
  keepAlive: false,
  maxSockets: Infinity,
  maxFreeSockets: 256,
  scheduling: 'lifo',
  maxTotalSockets: Infinity,
  totalSocketCount: 3,
  maxCachedSessions: 100,
  _sessionCache: [Object],
  [Symbol(kCapture)]: false
},
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/v1/service/devices/42b27f05-c497-111b-9160-xxxxxxxxxxxxxxxxxx/control-sync',
_ended: true,
res: IncomingMessage {
  _readableState: [ReadableState],
  _events: [Object: null prototype],
  _eventsCount: 3,
  _maxListeners: undefined,
  socket: [TLSSocket],
  httpVersionMajor: 1,
  httpVersionMinor: 1,
  httpVersion: '1.1',
  complete: true,
  rawHeaders: [Array],
  rawTrailers: [],
  aborted: false,
  upgrade: false,
  url: '',
  method: null,
  statusCode: 400,
  statusMessage: '400',
  client: [TLSSocket],
  _consuming: false,
  _dumped: false,
  req: [Circular *1],
  responseUrl: 'https://aic-service.lgthinq.com:46030/v1/service/devices/42b27f05-c497-111b-9160-xxxxxxxxxxxxxxx/control-sync',
  redirects: [],
  [Symbol(kCapture)]: false,
  [Symbol(kHeaders)]: [Object],
  [Symbol(kHeadersCount)]: 8,
  [Symbol(kTrailers)]: null,
  [Symbol(kTrailersCount)]: 0,
  [Symbol(RequestTimeout)]: undefined
},
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'aic-service.lgthinq.com',
protocol: 'https:',
_redirectable: Writable {
  _writableState: [WritableState],
  _events: [Object: null prototype],
  _eventsCount: 3,
  _maxListeners: undefined,
  _options: [Object],
  _ended: true,
  _ending: true,
  _redirectCount: 0,
  _redirects: [],
  _requestBodyLength: 134,
  _requestBodyBuffers: [],
  _onNativeResponse: [Function (anonymous)],
  _currentRequest: [Circular *1],
  _currentUrl: 'https://aic-service.lgthinq.com:46030/v1/service/devices/42b27f05-c497-111b-9160-xxxxxxxxxxxxxxxxx/control-sync',
  _timeout: null,
  [Symbol(kCapture)]: false
},
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
  accept: [Array],
  'content-type': [Array],
  'x-api-key': [Array],
  'x-thinq-app-ver': [Array],
  'x-thinq-app-type': [Array],
  'x-thinq-app-level': [Array],
  'x-thinq-app-os': [Array],
  'x-thinq-app-logintype': [Array],
  'x-service-code': [Array],
  'x-country-code': [Array],
  'x-language-code': [Array],
  'x-service-phase': [Array],
  'x-origin': [Array],
  'x-model-name': [Array],
  'x-os-version': [Array],
  'x-app-version': [Array],
  'x-message-id': [Array],
  'user-agent': [Array],
  'x-emp-token': [Array],
  'x-user-no': [Array],
  'x-client-id': [Array],
  'content-length': [Array],
  host: [Array]
}

}, data: { resultCode: '9006', result: { data: '' } }

mtw13 commented 9 months ago

Any luck with this?

ozTahu commented 9 months ago

No unfortunately, I haven't been able to get it to work, it shows up but doesn't respond. At one point it was reporting the status correctly but I couldn't control it.

ozTahu commented 9 months ago

Just run it again and this comes up in debug mode....

[2023-12-03, 12:57:21 p.m.] [homebridge-lg-thinq] This plugin generated a warning from the characteristic 'Rotation Speed': characteristic was supplied illegal value: number 48 exceeded maximum of 5. See https://homebridge.io/w/JtMGR for more info. [2023-12-03, 12:57:21 p.m.] [homebridge-lg-thinq] This plugin generated a warning from the characteristic 'Brightness': characteristic was supplied illegal value: number 44 exceeded maximum of 2. See https://homebridge.io/w/JtMGR for more info. [2023-12-03, 12:58:21 p.m.] [homebridge-lg-thinq] This plugin generated a warning from the characteristic 'Rotation Speed': characteristic was supplied illegal value: number 48 exceeded maximum of 5. See https://homebridge.io/w/JtMGR for more info. [2023-12-03, 12:58:21 p.m.] [homebridge-lg-thinq] This plugin generated a warning from the characteristic 'Brightness': characteristic was supplied illegal value: number 44 exceeded maximum of 2. See https://homebridge.io/w/JtMGR for more info. [2023-12-03, 12:59:21 p.m.] [homebridge-lg-thinq] This plugin generated a warning from the characteristic 'Rotation Speed': characteristic was supplied illegal value: number 48 exceeded maximum of 5. See https://homebridge.io/w/JtMGR for more info. [2023-12-03, 12:59:21 p.m.] [homebridge-lg-thinq] This plugin generated a warning from the characteristic 'Brightness': characteristic was supplied illegal value: number 44 exceeded maximum of 2. See https://homebridge.io/w/JtMGR for more info.