merdok / homebridge-webos-tv

Homebridge plugin for LG webOS TVs
MIT License
656 stars 88 forks source link

don't work after update c2 firmware. #474

Closed PatricioooAG closed 1 year ago

PatricioooAG commented 1 year ago

Tonight after update the LG C2 to 03.30.16 the plugin stop working, I can add to HomeKit but the button don't work. I appreciate any help. ( MacMini M1 ) thanks.

merdok commented 1 year ago

What does the log say? Which button does not work? You need to provide some more clear info about the issue.

PatricioooAG commented 1 year ago

Sorry, the log say than is connected, and the buttons are volume, channels, inputs... the accessorie create in HomeKit app. Im using Hombridge in macOS with ui. Thanks.

[homebridge-webos-tv] Launched child bridge with PID 61150 [1/18/2023, 7:28:21 PM] Registering platform 'homebridge-webos-tv.webostv' [1/18/2023, 7:28:21 PM] [homebridge-webos-tv] Loaded homebridge-webos-tv v2.3.4 child bridge successfully

Captura de pantalla 2023-01-18 a las 21 09 15

.4 child bridge successfully

merdok commented 1 year ago

You need to provide a full debug log https://github.com/merdok/homebridge-webos-tv#troubleshooting

matfantinel commented 1 year ago

I am facing an apparently identical issue here. It's my first time installing this plugin, so I never had a working setup.

All the accessory controls look fine in HomeBridge UI (but they don't work), and on the Home app it only shows a bunch of switches with the same name, exactly like in OP's screenshot.

I grabbed some logs, looks like it never actually connected to the TV:

[1/18/2023, 6:44:55 PM] [HB Supervisor] Starting Homebridge with extra flags: -I -D
[1/18/2023, 6:44:55 PM] [HB Supervisor] Started Homebridge v1.6.0 with PID: 56159
[1/18/2023, 6:44:55 PM] Loaded config.json with 0 accessories and 3 platforms.
[1/18/2023, 6:44:55 PM] Loaded 2 cached accessories from cachedAccessories.
[1/18/2023, 6:44:55 PM] ---
[1/18/2023, 6:44:56 PM] Loaded plugin: homebridge-config-ui-x@4.50.2
[1/18/2023, 6:44:56 PM] Registering platform 'homebridge-config-ui-x.config'
[1/18/2023, 6:44:56 PM] ---
[1/18/2023, 6:44:56 PM] The plugin "homebridge-ewelink" requires Node.js version of ^14.21.2 || ^16.19.0 || ^18.13.0 which does not satisfy the current Node.js version of v16.15.1. You may need to upgrade your installation of Node.js - see https://homebridge.io/w/JTKEF
[1/18/2023, 6:44:56 PM] Loaded plugin: homebridge-ewelink@10.4.0
[1/18/2023, 6:44:56 PM] Registering platform 'homebridge-ewelink.eWeLink'
[1/18/2023, 6:44:56 PM] ---
[1/18/2023, 6:44:56 PM] Loaded plugin: homebridge-webos-tv@2.3.4
[1/18/2023, 6:44:56 PM] Registering platform 'homebridge-webos-tv.webostv'
[1/18/2023, 6:44:56 PM] ---
[1/18/2023, 6:44:56 PM] Loading 3 platforms...
[1/18/2023, 6:44:56 PM] [eWeLink] Initializing eWeLink platform...
[1/18/2023, 6:44:56 PM] [eWeLink] Initialising plugin v10.4.0 | System darwin | Node v16.15.1 | HB v1.6.0 | HAPNodeJS v0.11.0...
[1/18/2023, 6:44:56 PM] [webostv] Initializing webostv platform...
[1/18/2023, 6:44:56 PM] [webostv] Initializing child bridge 0E:A2:7E:DB:EB:B4
[1/18/2023, 6:44:56 PM] [eWeLink] Plugin initialised. Setting up accessories....
[1/18/2023, 6:44:56 PM] Publishing bridge accessory (name: Homebridge 6629, publishInfo: {
  username: '0E:29:96:86:66:29',
  port: 51168,
  pincode: '***-**-***',
  category: 2,
  bind: undefined,
  mdns: undefined,
  addIdentifyingMaterial: true,
  advertiser: 'bonjour-hap'
}).
Setup Payload:
X-HM://0023RX5EAKIOK
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ 184-56-722 │     
    └────────────┘     

[1/18/2023, 6:44:56 PM] Homebridge v1.6.0 (HAP v0.11.0) (Homebridge 6629) is running on port 51168.
[1/18/2023, 6:44:56 PM] [homebridge-webos-tv] Launched child bridge with PID 56249
[1/18/2023, 6:44:56 PM] Registering platform 'homebridge-webos-tv.webostv'
[1/18/2023, 6:44:56 PM] [homebridge-webos-tv] Loaded homebridge-webos-tv v2.3.4 child bridge successfully
[1/18/2023, 6:44:56 PM] Loaded 0 cached accessories from cachedAccessories.0EA27EDBEBB4.
[1/18/2023, 6:44:56 PM] Publishing bridge accessory (name: homebridge-webos-tv, publishInfo: {
  username: '0E:A2:7E:DB:EB:B4',
  port: 34055,
  pincode: '***-**-***',
  category: 2,
  bind: undefined,
  mdns: undefined,
  addIdentifyingMaterial: true,
  advertiser: 'bonjour-hap'
}).
[1/18/2023, 6:44:56 PM] [homebridge-webos-tv] Init - initializing devices
[1/18/2023, 6:44:56 PM] [homebridge-webos-tv] [Living Room TV] Init - got TV configuration, initializing device with name: Living Room TV
[1/18/2023, 6:44:56 PM] [homebridge-webos-tv] [Living Room TV] The TV has no configured inputs yet!
[1/18/2023, 6:44:56 PM] [homebridge-webos-tv] [Living Room TV] No TV inputs config file found!
[1/18/2023, 6:44:56 PM] [homebridge-webos-tv] [Living Room TV] Adding 0 new input sources!
[1/18/2023, 6:44:56 PM] Homebridge v1.6.0 (HAP v0.11.0) (homebridge-webos-tv) is running on port 34055.
[1/18/2023, 6:44:56 PM] [homebridge-webos-tv] [Living Room TV] Connecting to TV
[1/18/2023, 6:44:56 PM] Publishing external accessory (name: Living Room TV, publishInfo: {
  username: 'F7:DC:69:70:E1:F7',
  pincode: '***-**-***',
  category: 31,
  port: undefined,
  bind: undefined,
  mdns: undefined,
  addIdentifyingMaterial: true,
  advertiser: 'bonjour-hap'
}).
[1/18/2023, 6:44:56 PM] Living Room TV 685B is running on port 64934.
[1/18/2023, 6:44:56 PM] Please add [Living Room TV 685B] manually in Home app. Setup Code: 184-56-722
[1/18/2023, 6:45:00 PM] [eWeLink] Fetching devices from eWeLink home/id [My Home] [5f67afc22ada47000823c936].
[1/18/2023, 6:45:01 PM] [homebridge-webos-tv] [Living Room TV] Connecting to TV
[1/18/2023, 6:45:06 PM] [homebridge-webos-tv] [Living Room TV] Connecting to TV
[1/18/2023, 6:45:06 PM] [eWeLink] LAN monitoring started.
[1/18/2023, 6:45:06 PM] [eWeLink] [Middle] initialising with options {"inUsePowerThreshold":0,"logging":"standard","showAs":"default"}.
[1/18/2023, 6:45:06 PM] [eWeLink] [Middle] initialised and found locally with IP [192.168.1.2] [1:BASIC_R3].
[1/18/2023, 6:45:06 PM] [eWeLink] [Entrance] initialising with options {"inUsePowerThreshold":0,"logging":"standard","showAs":"default"}.
[1/18/2023, 6:45:06 PM] [eWeLink] [Entrance] initialised and found locally with IP [192.168.1.7] [1:BASIC_R3].
[1/18/2023, 6:45:08 PM] [eWeLink] ✓ Setup complete. This plugin currently has a 5☆ rating on HOOBS! https://bit.ly/hb-ewelink-review
[1/18/2023, 6:45:11 PM] [homebridge-webos-tv] [Living Room TV] Connecting to TV
[1/18/2023, 6:45:42 PM] [homebridge-webos-tv] [Living Room TV] Wake on LAN callback - sent magic packet, trying to connect to tv...
[1/18/2023, 6:45:42 PM] [homebridge-webos-tv] [Living Room TV] Connecting to TV
[1/18/2023, 6:46:31 PM] [homebridge-webos-tv] [Living Room TV] Connecting to TV
[1/18/2023, 6:47:02 PM] [homebridge-webos-tv] [Living Room TV] Connecting to TV

My config:

    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "platform": "webostv",
            "devices": [
                {
                    "name": "Living Room TV",
                    "ip": "192.168.1.18",
                    "mac": "80:5B:65:5A:08:B4",
                    "pollingInterval": 5,
                    "volumeLimit": 100,
                    "volumeControl": "buttons",
                    "channelControl": false,
                    "mediaControl": true
                }
            ],
            "_bridge": {
                "username": "0E:A2:7E:DB:EB:B4",
                "port": 34055
            }
        }
    ]
merdok commented 1 year ago

@matfantinel in your case it looks like a connection issue. If the TV is turned on and the plugin cannot connect to it then most likely the ip is incorrect. You can use the CLI commands described here https://github.com/merdok/homebridge-webos-tv#cli to quickly test out your connection by for example trying to pair with the tv with the webostv pair cli command.

PatricioooAG commented 1 year ago

I try the cli, and it's not connecting. The ip and Mac are fine. Thanks.

INFO Please accept the pairing request on the TV... ERROR Could not pair with the TV! Make sure the ip is correct and that the TV is turned on!

merdok commented 1 year ago

Then you probably did not accept the pairing request on the tv. You also need to make sure that you can ping the ip from the machine from which you send the commands and that the TV is indeed reachable in your network.

PatricioooAG commented 1 year ago

Thanks. The ping are ok. You know any setting in the tv side ? The problem its from update firmware, but when add the device from the plugin, it get fine the inputs and apps in the tv. Its strange. It's a oledC2.

merdok commented 1 year ago

You would need to check if there are any new settings which might causing this on the tv. I do not know any.

grzegorz914 commented 1 year ago

@merdok for newer firmware WebSocket need use SSL and allow self signed cert., also use wss instead ws and port 3001.

merdok commented 1 year ago

@grzegorz914 thanks for the info!

Will adjust the plugin later to also allow ssl websocket.

@Patriciooo will let you know when the update is ready so you can test it out.

merdok commented 1 year ago

@Patriciooo could you please try the webostv pair cli command once more and add the -debug=true to it and post the log here? I just want to see what kind of error is thrown so I can properly react to that.

PatricioooAG commented 1 year ago

Hi, I don't know how get the log, I added "deepDebugLog": true and in terminal execute the pair command, but the log in Hombridge-ui log or in .Homebridge folder log, don't have info. Excuse me. homebridge.log-2.txt

merdok commented 1 year ago

The easiest for you would be to use the the cli command: webostv pair -debug=true

You can simply type that in your terminal and it will show you the log straight in the terminal.

PatricioooAG commented 1 year ago

Thanks.

INFO Please accept the pairing request on the TV... [10.0.0.52] Connecting to TV [10.0.0.52] Error - Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:217:20) { errno: -54, code: 'ECONNRESET', syscall: 'read' } ERROR Could not pair with the TV! Make sure the ip is correct and that the TV is turned on!

merdok commented 1 year ago

@Patriciooo thanks. But that seems still kind of generic. I was expecting more detailed error message. Could you possibly join the webostv discord channel so we could do some direct communication testing there?

merdok commented 1 year ago

The issue should now be fixed with version 2.3.5!