merdok / homebridge-webos-tv

Homebridge plugin for LG webOS TVs
MIT License
664 stars 89 forks source link

Issue when putting my Mac address #368

Closed EricWander closed 3 years ago

EricWander commented 3 years ago

Hi all,

I have an invalid arg with my Mac address and I don't know why ? [4/30/2021, 6:56:28 AM] [webostv] Init - initializing devices [4/30/2021, 6:56:28 AM] [webostv] [LGtv] Init - got TV configuration, initializing device with name: LGtv [4/30/2021, 6:56:28 AM] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at validateString (internal/validators.js:120:11) at join (path.js:1039:7) at module.exports (/usr/lib/node_modules/homebridge-webos-tv/node_modules/persist-path/index.js:19:22) at new LGTV (/usr/lib/node_modules/homebridge-webos-tv/node_modules/lgtv2/index.js:48:16) at LgTvController.setupLgtvInstance (/usr/lib/node_modules/homebridge-webos-tv/lib/LgTvController.js:147:17) at LgTvController.connect (/usr/lib/node_modules/homebridge-webos-tv/lib/LgTvController.js:124:14) at webosTvDevice.connectToTv (/usr/lib/node_modules/homebridge-webos-tv/index.js:139:19) at new webosTvDevice (/usr/lib/node_modules/homebridge-webos-tv/index.js:125:10) at webosTvPlatform.initDevices (/usr/lib/node_modules/homebridge-webos-tv/index.js:1831:11) at HomebridgeAPI.emit (events.js:326:22)

My json script : { "platform": "webostv", "devices": [ { "name": "LGtv", "ip": "192.168.0.22", "mac": "0c:8e:29:e6:3b:ba" } ] }

Thanks for your help

Eric

merdok commented 3 years ago

I think something is wrong with your homebridge installation. Please reinstall homebridge and the plugin and make sure all are up to date.

EricWander commented 3 years ago

Thanks for your prompt feedback. Did the updates to the latests versions and updated as well the dependencies but still have the same issue. If I remove the Mac address the script is working but it is saying that Mac address is mandatory for this plugin....As soon I add the Mac address I have this INVALID_ARG_TYPE error

Thanks for your help

merdok commented 3 years ago

Maybe your config.json is broken. The error does not come from the "mac" according to the log you provided above, but from an internal homebridge variable called "path". It might be that your config.json is wrongly formatted and therefore is also wrongly parsed.

EricWander commented 3 years ago

Indeed, I'm using Homebridge as a plugin on a Jeedom Server. Could be this the issue ? Where can I find the Config.json file on the setup ? Thanks

merdok commented 3 years ago

It is usually located in the .homebridge directory which is located in user home directory.

EricWander commented 3 years ago

Here is my config.json file. There is a path keyword but I don't understand why it is working when I put only the ip address and not the Mac adresse in my WebOs plugin ? Really strange. Any idea ? config.txt

merdok commented 3 years ago

All look good to me, not sure what the issue is. I suspect that something is wrong with your homebridge installation, maybe permissions? You would need to investigate that.

EricWander commented 3 years ago

Still stuck with this issue :( . I gave the full permission to the Homebridge plugin but still the same issue. Any other idea ?

Thanks

merdok commented 3 years ago

You have somewhere an issue in your homebridge setup. Where exactly I cannot tell, I can only advice you to reinstall homebridge if you did not do that yet or maybe cleanup your installation. The issue is certainly not related in any way to the plugin but to homebridge.