Open lavirott opened 3 years ago
I have the same error when trying to access my LG CX
I have the same error when trying to access my LG CX
same here!
1 Feb 21:35:45 - [red] Uncaught Exception:
1 Feb 21:35:45 - TypeError: Cannot read property 'indexOf' of undefined
at Object.98d0d50a.605e88 (/home/pi/.node-red/node_modules/node-red-contrib-lgtv/nodes/lgtv-volume.js:19:59)
at /home/pi/.node-red/node_modules/node-red-contrib-lgtv/nodes/lgtv-config.js:72:43
at Array.forEach (
Has anyone found a solution? I’m having the same problem.
Yes, you can fix it yourself, see: edit : index.js
see the line:
// scan incoming messages for the magic string server.on('message', function(message, remote) {
if (message.indexOf("LG Smart TV"))) {
replace with:
if (message.indexOf("LG Smart TV") > 0) {
thats all :)
:)
This is in .node-red\node_modules\lgtv2\index.js? I don't see that line there.
Yes, you can fix it yourself, see: edit : index.js
see the line:
// scan incoming messages for the magic string server.on('message', function(message, remote) {
if (message.indexOf("LG Smart TV"))) {
replace with:
if (message.indexOf("LG Smart TV") > 0) {
thats all :)
:)
It seems that the correct fix for this is in .node-red/node_modules/node-red-contrib-lgtv/nodes/lgtv-volume.js at line 19, currently
if (!err && res && res && res.changed.indexOf('volume') !== -1) {
node.send({payload: res.volume});
}
should be
if (!err && res && res.changed && res.changed.indexOf('volume') !== -1) {
node.send({payload: res.volume});
}
Ref: https://discourse.nodered.org/t/node-red-keeps-rebooting-itself/56590/9
Hello, I would like to control my new LG TV with your node-red nodes which looks like interesting. Unfortunatly, I face an issue. I uploaded the remote control sample you provide. I configured the configuration node with the right IP address, connect and get the token. (I would like to add I can do some basic control of my LG TV with OpenHab, so this is not an issue of misconfiguration on the TV, it accepts remote control). My TV is: LG 49 NANO81
When deploying, I have the follwing error:
Thanks in advance for any help you for your promising nodes.