grzegorz914/homebridge-lgwebos-tv

ReferenceError: soundMode is not defined

mgoeppl opened this issue · 0 comments

The plugin crashes with the following errors:

[8/8/2024, 10:26:56 PM] [homebridge-lgwebos-tv] Launched child bridge with PID 1188758
[8/8/2024, 10:26:57 PM] Registering platform 'homebridge-lgwebos-tv.LgWebOsTv'
[8/8/2024, 10:26:57 PM] [homebridge-lgwebos-tv] Loaded homebridge-lgwebos-tv v2.20.1 child bridge successfully
[8/8/2024, 10:26:57 PM] Loaded 0 cached accessories from cachedAccessories.0E7AE499C997.
[8/8/2024, 10:26:57 PM] Homebridge v1.8.4 (HAP v0.12.2) (homebridge-lgwebos-tv) is running on port 34673.
[8/8/2024, 10:26:57 PM] 

NOTICE TO USERS AND PLUGIN DEVELOPERS
> Homebridge 2.0 is on the way and brings some breaking changes to existing plugins.
> Please visit the following link to learn more about the changes and how to prepare:
> https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0

[8/8/2024, 10:27:09 PM] [homebridge-lgwebos-tv] Device: 10.0.4.196 Living Room Projector, Connected.
[8/8/2024, 10:27:09 PM] [homebridge-lgwebos-tv] -------- Living Room Projector --------
[8/8/2024, 10:27:09 PM] [homebridge-lgwebos-tv] Manufacturer: LG Electronics
[8/8/2024, 10:27:09 PM] [homebridge-lgwebos-tv] Model: HU715QW-GL
[8/8/2024, 10:27:09 PM] [homebridge-lgwebos-tv] System: webOSTV 6.0
[8/8/2024, 10:27:09 PM] [homebridge-lgwebos-tv] Serialnr: hi:hi:hi:hi:hi
[8/8/2024, 10:27:09 PM] [homebridge-lgwebos-tv] Firmware: 03.00.06
[8/8/2024, 10:27:09 PM] [homebridge-lgwebos-tv] ----------------------------------
[8/8/2024, 10:27:13 PM] [homebridge-lgwebos-tv] Device: 10.0.4.196 Living Room Projector, Power: ON
[8/8/2024, 10:27:13 PM] [homebridge-lgwebos-tv] Device: 10.0.4.196 Living Room Projector, Input Name: 
[8/8/2024, 10:27:13 PM] [homebridge-lgwebos-tv] Device: 10.0.4.196 Living Room Projector, Input Name: com.webos.app.hdmi1
[8/8/2024, 10:27:13 PM] [homebridge-lgwebos-tv] Device: 10.0.4.196 Living Room Projector, Volume: 0%
[8/8/2024, 10:27:13 PM] [homebridge-lgwebos-tv] Device: 10.0.4.196 Living Room Projector, Mute: OFF
[8/8/2024, 10:27:13 PM] [homebridge-lgwebos-tv] Device: 10.0.4.196 Living Room Projector, Brightness: 50%
[8/8/2024, 10:27:13 PM] [homebridge-lgwebos-tv] Device: 10.0.4.196 Living Room Projector, Backlight: 37%
[8/8/2024, 10:27:13 PM] [homebridge-lgwebos-tv] Device: 10.0.4.196 Living Room Projector, Contrast: 80%
[8/8/2024, 10:27:13 PM] [homebridge-lgwebos-tv] Device: 10.0.4.196 Living Room Projector, Color: 50%
[8/8/2024, 10:27:13 PM] [homebridge-lgwebos-tv] Device: 10.0.4.196 Living Room Projector, Picture Mode: Unknown
[8/8/2024, 10:27:13 PM] [homebridge-lgwebos-tv] Device: 10.0.4.196 Living Room Projector, Sound Mode: Standard
/homebridge/node_modules/homebridge-lgwebos-tv/src/lgwebosdevice.js:567
                if (this.sensorSoundOutputService && soundMode !== this.soundOutput) {
                                                     ^
ReferenceError: soundMode is not defined
    at LgWebOsSocket.<anonymous> (/homebridge/node_modules/homebridge-lgwebos-tv/src/lgwebosdevice.js:567:54)
    at LgWebOsSocket.emit (node:events:519:28)
    at WebSocket.<anonymous> (/homebridge/node_modules/homebridge-lgwebos-tv/src/lgwebossocket.js:671:38)
    at WebSocket.emit (node:events:519:28)
    at Receiver.receiverOnMessage (/homebridge/node_modules/homebridge-lgwebos-tv/node_modules/ws/lib/websocket.js:1220:20)
    at Receiver.emit (node:events:519:28)
    at Receiver.dataMessage (/homebridge/node_modules/homebridge-lgwebos-tv/node_modules/ws/lib/receiver.js:596:14)
    at Receiver.getData (/homebridge/node_modules/homebridge-lgwebos-tv/node_modules/ws/lib/receiver.js:496:10)
    at Receiver.startLoop (/homebridge/node_modules/homebridge-lgwebos-tv/node_modules/ws/lib/receiver.js:167:16)
    at Receiver._write (/homebridge/node_modules/homebridge-lgwebos-tv/node_modules/ws/lib/receiver.js:94:10)
[8/8/2024, 10:27:13 PM] [homebridge-lgwebos-tv] Child bridge process ended
[8/8/2024, 10:27:14 PM] [homebridge-lgwebos-tv] Process Ended. Code: 1, Signal: null

My config is the following:

{
    "devices": [
        {
            "name": "Living Room Projector",
            "host": "10.0.4.196",
            "mac": "ac:5a:f0:23:2c:1b",
            "getInputsFromDevice": false,
            "disableLoadDefaultInputs": false,
            "filterSystemApps": false,
            "inputsDisplayOrder": 0,
            "sensorPower": true,
            "sensorPixelRefresh": false,
            "sensorVolume": false,
            "sensorMute": false,
            "sensorInput": false,
            "sensorChannel": false,
            "sensorSoundMode": true,
            "sensorSoundOutput": true,
            "sensorPictureMode": false,
            "sensorScreenOnOff": false,
            "sensorScreenSaver": false,
            "turnScreenOnOff": false,
            "turnScreenSaverOnOff": false,
            "brightnessControl": false,
            "backlightControl": false,
            "contrastControl": false,
            "colorControl": false,
            "pictureModeControl": false,
            "volumeControl": 0,
            "soundModeControl": false,
            "soundOutputControl": true,
            "soundOutputs": [
                {
                    "name": "Living Room Projector ARC",
                    "reference": "external_arc",
                    "displayType": 2,
                    "namePrefix": false
                }
            ],
            "serviceMenu": false,
            "ezAdjustMenu": false,
            "enableDebugMode": false,
            "disableLogInfo": false,
            "disableLogDeviceInfo": false,
            "disableTvService": true,
            "sslWebSocket": false,
            "enableRestFul": false,
            "restFulDebug": false,
            "enableMqtt": false,
            "mqttDebug": false,
            "mqttAuth": false
        }
    ],
    "_bridge": {
        "username": "0E:7A:E4:99:C9:97",
        "port": 34673
    },
    "platform": "LgWebOsTv"
}