Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Window AC with Thinq1 does not work #7

Closed
jakemauer opened this issue May 19, 2020 · 15 comments
Closed

Window AC with Thinq1 does not work #7

jakemauer opened this issue May 19, 2020 · 15 comments
Labels
enhancement New feature or request

Comments

@jakemauer
Copy link

Hi there!

I have an LG LW1019IVSM window AC unit that uses the LG Thinq app. How can I be useful in helping to get it working with this plugin? I'm happy to provide any sorts of logs or test API endpoints etc.

All I've done so far is install and set up the plugin on my homebridge docker container but all I get are 400 errors in the log from the LG API endpoints.

Thanks for your work on this!

@sman591
Copy link
Owner

sman591 commented May 19, 2020

Hey! Happy to try to get this working.

  • Were you able to successfully set a redirect URL? Is there an access token and refresh token listed in the config UI?
  • Could you enable Debug mode for Homebridge and share the logs? Specifically looking for the “device response” log line (or the absence of one)

For debug mode: start with homebridge -D or go to the /settings Homebridge settings page in the UI to turn it on and restart

@jakemauer
Copy link
Author

Yes I can definitely log in and get all the right URLs and access keys. I'll get you debug logs in a jiff.

@jakemauer
Copy link
Author

jakemauer commented May 19, 2020

Here we go. I removed a lot of non-config/LG Thinq related stuff. But anything LGThinq was left in.

[5/19/2020, 1:29:21 PM] [HB Supervisor] Started Homebridge v1.1.0 with PID: 3882
[5/19/2020, 1:29:21 PM] Loaded config.json with 0 accessories and 6 platforms.
[5/19/2020, 1:29:21 PM] ---
[5/19/2020, 1:29:22 PM] Loaded plugin: [email protected]
[5/19/2020, 1:29:22 PM] Registering accessory 'homebridge-dummy.DummySwitch'
[5/19/2020, 1:29:22 PM] ---
[5/19/2020, 1:29:22 PM] Loaded plugin: [email protected]
homebridge API version: 2.6
[5/19/2020, 1:29:22 PM] Registering platform 'homebridge-dyson-link.DysonPlatform'
[5/19/2020, 1:29:22 PM] ---
[5/19/2020, 1:29:22 PM] Loaded plugin: [email protected]
[5/19/2020, 1:29:22 PM] Registering platform 'homebridge-frigidaire.Frigidaire'
[5/19/2020, 1:29:22 PM] ---
[5/19/2020, 1:29:22 PM] Loaded plugin: [email protected]
[5/19/2020, 1:29:22 PM] Registering platform 'homebridge-harmonyhub-plugin.HarmonyHub'
[5/19/2020, 1:29:22 PM] ---
[5/19/2020, 1:29:22 PM] Loaded plugin: [email protected]
[5/19/2020, 1:29:22 PM] Registering platform 'homebridge-lg-thinq-ac.LgThinqAirConditioner'
[5/19/2020, 1:29:22 PM] ---
[5/19/2020, 1:29:22 PM] Loaded plugin: [email protected]
[5/19/2020, 1:29:22 PM] Registering platform 'homebridge-ps4-waker-platform.PS4WakerPlatform'
[5/19/2020, 1:29:22 PM] ---
[5/19/2020, 1:29:23 PM] Loaded plugin: [email protected]
[5/19/2020, 1:29:23 PM] Registering accessory 'homebridge-synology.Synology'
[5/19/2020, 1:29:23 PM] ---
[5/19/2020, 1:29:23 PM] Loaded plugin: [email protected]
[5/19/2020, 1:29:23 PM] Registering platform 'homebridge-config-ui-x.config'
[5/19/2020, 1:29:23 PM] ---
[5/19/2020, 1:29:23 PM] Loading 6 platforms...
[5/19/2020, 1:29:23 PM] [LgThinqAirConditioner] Initializing LgThinqAirConditioner platform...
[5/19/2020, 1:29:23 PM] [LgThinqAirConditioner] Finished initializing platform: undefined
[5/19/2020, 1:29:23 PM] [Config] Initializing config platform...
[5/19/2020, 1:29:23 PM] [Config] Running in Service Mode
[5/19/2020, 1:29:23 PM] [LgThinqAirConditioner] Executed didFinishLaunching callback
[5/19/2020, 1:29:24 PM] [LgThinqAirConditioner] Initiating auth with provided redirect URL

[5/19/2020, 1:29:26 PM] [LgThinqAirConditioner] dashboardResponse {
  resultCode: '0000',
  result: {
    langPackCommonVer: '74.2',
    langPackCommonUri: 'https://objectstore.lgthinq.com/7abfc907-9e11-4c9e-bd2a-8397c1bb68de?Expires=1652233492&Signature=c99IXC4EDJiPSudULmVf8fRHISWPkCLWMdNiDQ97EwCF8It5fsIa7EMxM~wFaQRjN1KIrvKfKw9rXX3J~R8k8TkUs6N1f0NDxoQkvZUwA5ftKmTL9ZULpOJmdw8uVXa2Ue~Q0EhPXNjvz1xxxfPs6vGUNJGJUrjI~ms7g50-kUpzJ6z~OPjgJ1dKpeKS1LN2AIyYjFRZGRjt~3ksAOiCAlGw57PySbTXWlzQloUshrGnX-zhwhFffCmu5f2-swn2ae4oI5qTtUCwVay3ssFSGWdpx7bHRpurMOFOXa~tUVMsCW3cj0sl6zFx~mZAxuII2grITDHEql2cAxZsb6iz5Q__&Key-Pair-Id=APKAI74R6YENXPGRIWLQ',
    item: [ [Object] ],
    group: []
  }
}
[5/19/2020, 1:29:26 PM] [LgThinqAirConditioner] Discover found 1 total devices
[5/19/2020, 1:29:26 PM] [LgThinqAirConditioner] Registering new accessory: Air Conditioner
[5/19/2020, 1:29:26 PM] [LgThinqAirConditioner] Getting device status d27bb3f0-7149-11d3-80af-2c2bf9fa5d73
[5/19/2020, 1:29:26 PM] [LgThinqAirConditioner] Starting refresh interval (set to 1 minutes)
[5/19/2020, 1:29:26 PM] [LgThinqAirConditioner] Renewing monitoring d27bb3f0-7149-11d3-80af-2c2bf9fa5d73
(node:3882) UnhandledPromiseRejectionWarning: Error: Request failed with status code 400
    at createError (/homebridge/node_modules/homebridge-lg-thinq-ac/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/homebridge/node_modules/homebridge-lg-thinq-ac/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/homebridge/node_modules/homebridge-lg-thinq-ac/node_modules/axios/lib/adapters/http.js:236:11)
    at IncomingMessage.emit (events.js:322:22)
    at endReadableNT (_stream_readable.js:1187:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:3882) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:3882) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 130-42-150 │     
    └────────────┘     
                       
[5/19/2020, 1:29:27 PM] Homebridge is running on port 51826.
[5/19/2020, 1:29:27 PM] [LgThinqAirConditioner] device response {
  resultCode: '0000',
  result: {
    modelName: 'WIN_056905_WW',
    subModelName: '',
    deviceType: 401,
    deviceCode: 'AI01',
    alias: 'Air Conditioner',
    deviceId: 'd27bb3f0-7149-11d3-80af-2c2bf9fa5d73',
    fwVer: '2.6.2_RTOS_3K',
    imageUrl: 'ac_home_window_airconditioner_img.png',
    ssid: 'sardinha',
    macAddress: '2c:2b:f9:fa:5d:73',
    networkType: '02',
    timezoneCode: 'America/Los_Angeles',
    timezoneCodeAlias: 'USA/Los_Angeles',
    utcOffset: -8,
    utcOffsetDisplay: '-08:00',
    dstOffset: -7,
    dstOffsetDisplay: '-07:00',
    curOffset: -7,
    curOffsetDisplay: '-07:00',
    sdsGuide: '{"deviceCode":"AI01"}',
    newRegYn: 'N',
    remoteControlType: '',
    online: false,
    platformType: 'thinq1',
    regDt: 20200506182932,
    modelProtocol: 'STANDARD',
    order: 0,
    drServiceYn: 'N',
    regDtUtc: '20200507012932',
    tclcount: 0
  }
}
[5/19/2020, 1:29:27 PM] [LgThinqAirConditioner] device response.result.snapshot undefined
[5/19/2020, 1:29:27 PM] [LgThinqAirConditioner] Error during interval update TypeError: Cannot read property 'airState.operation' of undefined
[5/19/2020, 1:29:31 PM] [Config] Homebridge must be running in insecure mode to control accessories

@sman591
Copy link
Owner

sman591 commented May 19, 2020

Hmm online: false and platform: thinq1 make this sound similar to #4, though I’m surprised the LW1019IVSM model isn’t on Thinq2.

Have you tried the other LG “aircon” Homebridge plug-in? I think that works with Thinq1 out of the box. Otherwise we’ll need to get the thinq1 API working in parallel to thinq2 here

@jakemauer
Copy link
Author

I've tried but I've run into all sorts of issues with it in my Docker environment on my Synology NAS. I'm trying to get it set up on my main computer to see if I can get it to work at all as a baseline before I continue to debug the Docker Homebridge setup.

In either case I'm absolutely willing to help you map out the Thinq1 API, or whatever is necessary to get this very quiet hunk of junk working with Homebridge.

@jvmo
Copy link

jvmo commented May 20, 2020

Hi sman591 first I want to thank you for this LG Homebridge plug-in is the fastest and the easy to work with on the Web

I start from version 0.3.1 and I also have LG LW1019IVSM window AC unit, but went I upgrade to version 0.3.4 error 400 show up only after trying to use the home-kit AC tile

I downgrade to version 0.3.1 for now. Also I see is a Thinq1, Thinq2 API problem

The LG LW1019IVSM window AC have the same remote like the LP1419IVSM AC

also the LG LW1019IVSM home-kit AC tile show: off, cool, heat, auto and went you scroll down fan speed.

please I rely what to buy you a coffee

on PI Zero W
Homebridge: Version 1.1.0
Node.js Version | v12.16.3
Npm Version | v6.14.4

@sman591
Copy link
Owner

sman591 commented May 20, 2020

@jvmo to confirm, the plugin was working for you on version 0.3.1?

0.3.2 introduced new countryCode and languageCode config parameters. If you add these to your config, does it work? (US and en-US were the previous defaults) -- you can also see the README for updated instructions

@sman591 sman591 added the enhancement New feature or request label May 20, 2020
@jvmo
Copy link

jvmo commented May 20, 2020 via email

@sman591 sman591 changed the title Help with adding support for an in-window AC unit Window AC with Thinq1 does not work May 20, 2020
@sman591
Copy link
Owner

sman591 commented May 20, 2020

@jvmo This sounds like it may be a different issue than what @jakemauer reported here. I've opened #9, could we continue discussion there?

@jakemauer
Copy link
Author

@sman591 Before I forget, should I redact anything from the log I posted?

@sman591
Copy link
Owner

sman591 commented May 20, 2020

@jakemauer Logs look clean, no need to redact. Good thinking though!

For ThinQ1 — have you used a tool like Charles Proxy before?

@jvmo
Copy link

jvmo commented May 20, 2020 via email

@sman591
Copy link
Owner

sman591 commented May 20, 2020

@jakemauer Actually, do you mind if we merge this with #4? It looks like this is the same issue, and it’d be great to figure it out together in a single discussion thread

@jvmo
Copy link

jvmo commented May 20, 2020 via email

@jakemauer
Copy link
Author

Closing to merge with #4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants