merdok / homebridge-webos-tv

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

Seems that platform is crashing home bridge #231

Closed siobhanellis closed 4 years ago

siobhanellis commented 4 years ago

I've had my webOS TV set up as an accessory for ages, and it has been working fine.

{ "name": "TV", "ip": "192.168.1.28", "mac": "38:8C:50:12:9E:42", "prefsDir": "~/.webosTv", "pollingInterval": 5, "legacyTvService": false, "showInputButtons": false, "volumeControl": "false", "volumeLimit": 100, "channelControl": false, "mediaControl": false, "soundOutputButtons": [ "external_arc", "tv_speaker" ], "inputs": [ { "appId": "com.webos.app.hdmi2", "name": "Amplifier" }, { "appId": "com.webos.app.miracast", "name": "Screen Share" } ], "remoteControlButtons": [ "com.webos.service.tv.display/set3DOn" ], "remoteSequenceButtons": [ { "sequence": [], "interval": 500 } ], "accessory": "webostv" }

But when I set up as a platform, it just crashes homebridge

{ "devices": [ { "name": "TV", "ip": "192.168.1.28", "mac": "38:8C:50:12:9E:42", "prefsDir": "~/.webosTv", "pollingInterval": 5, "legacyTvService": false, "showInputButtons": true, "volumeControl": "true", "volumeLimit": 100, "channelControl": false, "mediaControl": false, "inputs": [ { "appId": "com.webos.app.hdmi2", "name": "amplifier" }, { "appId": "Share Screen", "name": "com.webos.app.miracast" } ], "remoteSequenceButtons": [ { "sequence": [] } ], "infoButtonAction": "INFO" } ], "platform": "webostv" }

I used the Config-Ui-X to set it up as a platform

Homebridge V1.0.4 WebosTV Plugin 1.7.1

merdok commented 4 years ago

What is error im homebridge when it crashes?

AlexNoop commented 4 years ago

Hello,

I have same problem ...

i try in accessory and in platform :

{ "name": "Télévision", "ip": "xxx", "mac": "xxx", "keyFile": "/var/lib/homebridge/lgtvKeyFile", "prefsDir": "~/.webosTv", "pollingInterval": 5, "legacyTvService": false, "showInputButtons": false, "volumeControl": "false", "volumeLimit": 100, "channelControl": false, "mediaControl": false, "inputs": [ { "appId": "com.webos.app.hdmi1", "name": "AppleTV-LG" }, { "appId": "com.webos.app.hdmi2", "name": "Freebox" }, { "appId": "com.webos.app.hdmi3", "name": "Console de Jeux" } ], "infoButtonAction": "INFO", "accessory": "webostv" }

log ...

websocket failed to connect ...

if i can help ... ^^

merdok commented 4 years ago

I need to error log from homebridge to see what is going on...

AlexNoop commented 4 years ago

It’s this ? ;)

[5/8/2020, 2:50:01 PM] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at validateString (internal/validators.js:117:11) at join (path.js:1039:7) at module.exports (/usr/local/lib/node_modules/homebridge-webos-tv/node_modules/persist-path/index.js:19:22) at new webosTvAccessory (/usr/local/lib/node_modules/homebridge-webos-tv/index.js:41:44) at /usr/local/lib/node_modules/homebridge/src/server.ts:356:50 at Array.forEach () at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:329:29) at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:155:12) at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:78:10) at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (internal/modules/cjs/loader.js:1156:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10) at Module.load (internal/modules/cjs/loader.js:1000:32) at Function.Module._load (internal/modules/cjs/loader.js:899:14) at Object. (/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js:32:23) at Module._compile (internal/modules/cjs/loader.js:1156:30)

AlexNoop commented 4 years ago

And plateform :

[5/8/2020, 3:07:13 PM] [Config] Homebridge Config UI X v4.18.0 is listening on :: port 8581 [5/8/2020, 3:07:19 PM] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at validateString (internal/validators.js:117:11) at join (path.js:1039:7) at module.exports (/usr/local/lib/node_modules/homebridge-webos-tv/node_modules/persist-path/index.js:19:22) at new LGTV (/usr/local/lib/node_modules/homebridge-webos-tv/node_modules/lgtv2/index.js:47:16) at new webosTvAccessory (/usr/local/lib/node_modules/homebridge-webos-tv/index.js:110:21) at new webosTvDevice (/usr/local/lib/node_modules/homebridge-webos-tv/index.js:1612:9) at webosTvPlatform.initDevices (/usr/local/lib/node_modules/homebridge-webos-tv/index.js:1578:21) at HomebridgeAPI.emit (events.js:322:22) at HomebridgeAPI.signalFinished (/usr/local/lib/node_modules/homebridge/src/api.ts:231:10) at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:159:14) at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:78:10) at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (internal/modules/cjs/loader.js:1156:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10) at Module.load (internal/modules/cjs/loader.js:1000:32) at Function.Module._load (internal/modules/cjs/loader.js:899:14)

merdok commented 4 years ago

Can you try to remove the prefsDir entry from your config and check if that fixes your issue?

AlexNoop commented 4 years ago

Thanks ! But same error ...

[5/8/2020, 7:20:33 PM] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at validateString (internal/validators.js:117:11) at join (path.js:1039:7) at module.exports (/usr/local/lib/node_modules/homebridge-webos-tv/node_modules/persist-path/index.js:19:22) at new webosTvAccessory (/usr/local/lib/node_modules/homebridge-webos-tv/index.js:41:44) at new webosTvDevice (/usr/local/lib/node_modules/homebridge-webos-tv/index.js:1612:9) at webosTvPlatform.initDevices (/usr/local/lib/node_modules/homebridge-webos-tv/index.js:1578:21) at HomebridgeAPI.emit (events.js:322:22) at HomebridgeAPI.signalFinished (/usr/local/lib/node_modules/homebridge/src/api.ts:231:10) at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:159:14) at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:78:10) at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (internal/modules/cjs/loader.js:1156:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10) at Module.load (internal/modules/cjs/loader.js:1000:32) at Function.Module._load (internal/modules/cjs/loader.js:899:14) at Object. (/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js:32:23)

merdok commented 4 years ago

I think you are missing some dependencies or something is wrong with your homebridge setup.

siobhanellis commented 4 years ago

I found the clue elsewhere (camera ffmpeg). I needed to uninstall and then re-install 'node'. It all started working then.

You can close if you wish.... for me, anyway.

merdok commented 4 years ago

Thanks for the info.

AlexNoop commented 4 years ago

Thanks !