Closed kirtilli closed 7 years ago
Hi it should be automatic during the identify phase of setup, if its not provided.
But a nicer way of getting it ( instead to having to reset the config ) is to run the following command (replacing 172.16.0.10 with your tv's ip):
node -e "lg = require('lgtv-2012').lgtv; tv = new lg({host: '172.16.0.10'}); tv.pair_request(()=>{})"
So thanks for letting me know as i've updated the docs.
If you get an error try npm update
first.
Thanks for the quick replay but when i run your code snippet, ı got following error. (İ did npm update first)
throw err; ^
Error: Cannot find module 'lgtv-2012'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at [eval]:1:6
at ContextifyScript.Script.runInThisContext (vm.js:23:33)
at Object.exports.runInThisContext (vm.js:74:17)
at Object.
Ahh, its because lgtv-2012 is a dependency that's not installed of globaly. try running the command inside the homebridge-lgtv-2012 folder.
How can i get a pairing key for the TV? Best