homebridge-lg-thinq: TypeError: Cannot use 'in' operator to search for 'TempRefrigerator_C'

Describe The Bug: When adding a GF-B590PL refrigerator, the subject error is thrown.

To Reproduce: Fresh install of HomeBridge, add plugin, have fridge included in accessories

Expected behavior: Fridge to add successfully

Logs:

Starting to advertise ‘Homebridge 7273 6670’ using bonjour-hap backend! [07/09/2021, 2:12:40 pm] Homebridge v1.3.4 (Homebridge 7273) is running on port 51601.

<< I’ve excluded the logs for my washer/dryer here, happy to provide if they’ll add value, but I have no issues with those >>

[07/09/2021, 2:12:50 pm] [LGThinQ] Adding new accessory: Refrigerator (node:30564) UnhandledPromiseRejectionWarning: TypeError: Cannot use ‘in’ operator to search for ‘TempRefrigerator_C’ in undefined at DeviceModel.monitoringValueMapping (/usr/lib/node_modules/homebridge-lg-thinq/src/lib/DeviceModel.ts:160:14) at Refrigerator.createThermostat (/usr/lib/node_modules/homebridge-lg-thinq/src/devices/Refrigerator.ts:212:53) at Refrigerator.createThermostat (/usr/lib/node_modules/homebridge-lg-thinq/src/v1/devices/Refrigerator.ts:12:18) at new Refrigerator (/usr/lib/node_modules/homebridge-lg-thinq/src/devices/Refrigerator.ts:35:31) at new Refrigerator (/usr/lib/node_modules/homebridge-lg-thinq/src/v1/devices/Refrigerator.ts:5:1) at LGThinQHomebridgePlatform.discoverDevices (/usr/lib/node_modules/homebridge-lg-thinq/src/platform.ts:125:25) at processTicksAndRejections (internal/process/task_queues.js:95:5) at HomebridgeAPI.<anonymous> (/usr/lib/node_modules/homebridge-lg-thinq/src/platform.ts:53:7) (Use node --trace-warnings ... to show where the warning was created) (node:30564) 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: 1) (node:30564) [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.

Plugin Config:

{ “bridge”: { “name”: “Homebridge 7273”, “username”: “----”, “port”: 51601, “pin”: “----” }, “accessories”: [], “platforms”: [ { “name”: “Config”, “port”: 8581, “platform”: “config” }, { “country”: “AU”, “language”: “en-AU”, “auth_mode”: “token”, “refresh_token”: “----”, “username”: “----”, “password”: “----”, “devices”: [ { “id”: “1d6c7777-bf6c-1353-95a9-24e853db5e46”, “name”: “Dryer”, “type”: “DRYER” }, { “id”: “d0f9c37a-42b9-1879-a103-dc039838787d”, “name”: “Washer”, “type”: “WASHER”, “washer_trigger”: true, “washer_door_lock”: true }, { “id”: “d74ed200-a234-11eb-8ae0-0051eda83e50”, “name”: “Refrigerator”, “type”: “REFRIGERATOR”, “ref_express_freezer”: false, “ref_express_fridge”: false, “ref_eco_friendly”: false } ], “refresh_interval”: 60, “thinq1”: true, “platform”: “LGThinQ” } ] }

Screenshots:

N/A

Environment:

  • Plugin Version: 1.1.4
  • Homebridge Version: 1.3.4
  • Node.js Version: 14.17.6
  • NPM Version: 6.14.15
  • Operating System: Debian 11 in a Proxmox VM

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 25 (13 by maintainers)

Most upvoted comments

Correct, when I generated those logs I did the following:

  • Turned express freeze on
  • Changed fridge from 4 to 5
  • Turned express freeze off
  • Changed fridge from 5 back to 4

Freezer was left on -16 the whole time.