Git Product home page Git Product logo

node-red-contrib-lgtv's Introduction

node-red-contrib-lgtv

NPM version npm dependencies Status Build Status License

Node-RED Nodes to Control LG webOS Smart TVs 📺

With these Nodes you can:

  • Start Apps (this also includes changing the HDMI Inputs - these are also apps under webOS)
  • Change Volume / Mute
  • Turn your TV off (turning on over the Websocket API is not possible because the network interfaces are down when the TV is in standby. You can work around this via WakeOnLAN or Infrared)
  • Switch Channels on LiveTV
  • Press Remote Buttons
  • Move the mouse, drag, scroll and click
  • Show Popup Toasts on your TV
  • Open a URL in the Browser
  • Play a Video in YouTube
  • Send arbitrary commands to the API and receive the response

Some of the nodes have an output, so you can subscribe to events:

  • Volume and mute changes
  • Foreground app changes
  • Channel changes on LiveTV

Setup

You need to allow "LG Connect Apps" on your TV - see http://www.lg.com/uk/support/product-help/CT00008334-1437131798537-others

For the initial configuration you then just need the Hostname or IP-Address of your TV and click Connect in the lgtv-config node. The token should be filled automatically on first connect.

Note: After turning on the TV it takes ~25 seconds until the API is available.

Usage Example

I made a flow using node-red-dashboard to create a simple Remote Control: http://flows.nodered.org/flow/f497989bef43fb9310837adbff69ce73

Support, Contributing

For questions and suggestions open an Issue or chat me on Slack: @hobbyquaker.

Pull Requests welcome!

License

MIT (c) Sebastian Raff

node-red-contrib-lgtv's People

Contributors

hobbyquaker avatar itsj4y avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-red-contrib-lgtv's Issues

Can't install palette on pi's

Hi.

I'm no pro. I try to install this palett on two different pi's with only errors. One Rpi4 and one Rpi3B. Both Hassio with Node-Red. It's a long error list. Is this palette no longer maintained?

Best Regards
Kai-Roger

Persistent connection and Tokens

Every day i have to go into the lg control node and press connect, update and redeploy on the token. Is there a simple way I can point this to my token which seems to always stay the same?

Looking at closed issues i found this link and user who seems to have figured out how to do it, has anyone else managed this and can help shed some more light on how to do it?

Thanks

https://github.com/hobbyquaker/node-red-contrib-lgtv/issues/16

@nonkronk

Problem solved!
I turned the log level to debug mode,
Apparently, we have to provide a key on credentialSecret property in settings.js to encrypt our credentials with the chosen key. (i've never check the log before)

credentialSecret: "random-string"

By default Node-RED generates a random key for the encryption.

node not working anymore in latest HassOS / NodeRED setup

Hi,

I am running the following setup:

Add-on version: 7.1.1
You are running the latest version of this add-on.
System: HassOS 4.12 (armv7 / raspberrypi3)
Home Assistant Core: 0.114.4
Home Assistant Supervisor: 242

And I have a hunch that because of the bumped node version this node is not compiling anymore, but I do not have enough knowledge about how all this stuff works together so putting this here.

After I updated yesterday and trying to startup node-red with this node added I get the following error:

[email protected] install /opt/node_modules/bufferutil
node-gyp-build
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:168:21)
gyp ERR! System Linux 4.19.127-v7
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/node_modules/bufferutil
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-09-10T07_10_39_741Z-debug.log
[09:10:39] FATAL: Failed to install a specified npm package
[cont-init.d] user.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing...

Button for direct channel access incl. channel logo

Hi hobbyquaker,
thank you very much for the useful node. Works very well.
I tried to add a few channel buttons (e.g. ZDF, ARD...) and add also the station logo as button.
Unfortuantly I am not successful. Can you give me a hint how to create it?
Kine regards
alpha

Fail to connect in docker

Hi,
I tried to use your node in docker installation.
I have tried to install it in palette manager but it fail because of root permission.
I installed it with root rpm command and it is done.
But when I try to connect TV nothing appen.
I think it is about websocket but I am not sure.
Do you know any issue with docker?
Thanks
Thomas

Persistent connect, how-to?

The node needs to be connected manually each time the node-red service restart, e.g. after power outage,
(i have to open node-red editor, click node, click connect, click update, and click deploy)
Otherwise, the remote cards that i made on hass will not work.
Is there any solution to solve this particular problem?

TV is sending pin number

Hi, thanks for your awesome job!!

I tried to connect from nodered, but I can connect.
I install "LG TV plus" from Play Store on my Samsung s7 and can connect to the first time. The difference is that TV show me a PIN that I write on LG TV Plus app.

My TV is UH770V and webOS version is 05.30.65. Hope that info help you and sorry for my bad english

Playback status possiblity

First off, thanks for this contrib. I dont want to control my tv with node-red, i do want status from the tv.
Is there any way to get the playback state ? Like if it is playing, stopped or paused ?
And if this is possible, would someone be so kind to post an example flow, because im not so good at these flows (yet)

Thank you very kindly.

Connection lost

In some reason, switch to mediathek or switch to amazo prime, the node lost the connection to lg-tv. After "connect" manuell in the Config-Node the connection is ok and the node works.

TypeError: Cannot read property 'indexOf' of undefined

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:

6 Dec 18:48:19 - [error] [function:app icon] TypeError: Cannot read property 'com.webos.app.hdmi4' of undefined
6 Dec 18:48:19 - [red] Uncaught Exception:
6 Dec 18:48:19 - TypeError: Cannot read property 'indexOf' of undefined
    at Object.83d1b8db.e8e0b8 (C:\Users\lavirott\.node-red\node_modules\node-red-contrib-lgtv\nodes\lgtv-mute.js:18:59)
    at C:\Users\lavirott\.node-red\node_modules\node-red-contrib-lgtv\nodes\lgtv-config.js:72:43
    at Array.forEach (<anonymous>)
    at LgtvConfigNode.subscriptionHandler (C:\Users\lavirott\.node-red\node_modules\node-red-contrib-lgtv\nodes\lgtv-config.js:71:49)
    at Object.9bf6b1c00002 (C:\Users\lavirott\.node-red\node_modules\node-red-contrib-lgtv\nodes\lgtv-config.js:38:26)
    at WebSocketConnection.<anonymous> (C:\Users\lavirott\.node-red\node_modules\lgtv2\index.js:149:48)
    at WebSocketConnection.emit (events.js:315:20)
    at WebSocketConnection.processFrame (C:\Users\lavirott\.node-red\node_modules\websocket\lib\WebSocketConnection.js:554:26)
    at C:\Users\lavirott\.node-red\node_modules\websocket\lib\WebSocketConnection.js:323:40
    at processTicksAndRejections (internal/process/task_queues.js:75:11)

Thanks in advance for any help you for your promising nodes.

lgtv-app payload options

Can you tell me how I can figure out the correct msg.payload to launch different apps? For example, what is the correct payload for Plex?

Play Youtube videoId not work

The Youtube Node automatically launches the app and stays in the main menu , the video unfortunately does not play.

Can anyone confirm if the node works or there is a problem.

May payload for the NODE:

_msgid: "c2309137.97343"
payload: "dVkK36KOcqs"
topic: ""

Thx for help

Volume and Mute nodes issue WebOS 2021

I was using this node for some years with my 8 years old LG TV, recently I bough new LG TV 2021 (NANO86) which seems using newer version of WebOS.

In the last couple of days I was trying to find the API documentation that you used to build your node, unfortunatly I could not find it.
The reason that I started to get errors after deploying the "Volume" or "Mute" nodes and connect them to the new TV, after invertigation I found that the array objects in the old WebOS are different than the new one.

In LG website where they have listed the references for thei WebOS API, the response for "getVolume" array is as follows:

{"returnValue":true,"volumeStatus":{"activeStatus":true,"adjustVolume":true,"maxVolume":100,"muteStatus":true,"volume":12,"mode":"normal","soundOutput":"tv_external_speaker"},"callerId":"com.webos.service.apiadapter","mute":true,"volume":12}

comparing to the array that used in the old WebOS:
{"returnValue":true,"scenario":"mastervolume_tv_speaker","volume":98,"mute":false}

I did a small change on the volume.js and mute.js as follows:

volume.js

Line 19:
if (!err && res) {

Line 20:

// node.send({payload: res.volume});
if (res.volume !== undefined){
	node.send({payload: res.volume});
}
if (res.volumeStatus !== undefined){
	node.send({payload: res.volumeStatus.volume});
}

Line 27:

// node.send({payload: res.volume});
if (res.volume !== undefined){
	node.send({payload: res.volume});
}
if (res.volumeStatus !== undefined){
	node.send({payload: res.volumeStatus.volume});
}

similar changes I made to mute.js.

Are you willing to do these changes on the node and publish it, to that it will be compatible with the old WebOS and the new one.

Toast popups with icons

Thank you for this library. It works perfectly for me, although I don't understand how it actually communicates with the TV. But that doesn't matter, I have a working Node-RED interface.

What I use is the lgtv-toast node and then what I really wanted is to be able to define the icon. Eventually I found a Python library pylgtv which did exactly what I needed, but not in Node-RED. So I updated my local copy of lgtv-toast.js with two lines just before node.tvConn.request(...:
payload.iconData = msg.iconData;
payload.iconExtension = 'PNG';

With the right data this works and shows the icon, but it's a proper bodge and doesn't have any flexibility or error checking.

If you have the time, would you please consider reviewing this option and adding the feature correctly because I think there are other people who would find it very useful.

Many thanks.

Open Amazon Prime App

Hi!
Thank you for this, it's working like a charm ;-)

Just a note: on my LG TV the amazon app is called "lovefilm.de", not "amazon" or "prime".
Took me some time to figure that out ...

  • thomas

Error connecting

HI Sebastien

I tried your code, and it works fine, except when I connect I get the error "TypeError: Cannot read property 'com.webos.app.hdmi1' of undefined", and I can switch the LG TV Off, but I cannot switch it On again. I used your code as is, only added the IP of my TV in the lgtv-config nodes. Can you please provide some advice?

image

What is node-red-contrib-lgtv-with-turnon

Hi Sebastian (@hobbyquaker),

Thanks for sharing this node!!

On NPM you have both node-red-contrib-lgtv and node-red-contrib-lgtv-with-turnon.
The links on the NPM page of the latter node, refer to the readme page of the first node.
And they both use the same node ids under the cover, so I can't install them both:

12 Sep 08:06:02 - [info] Installing module: node-red-contrib-lgtv, version: 1.1.0
12 Sep 08:08:07 - [info] Installed module: node-red-contrib-lgtv
12 Sep 08:08:08 - [info] Added node types:
12 Sep 08:08:08 - [info]  - node-red-contrib-lgtv:lgtv-config
12 Sep 08:08:08 - [info]  - node-red-contrib-lgtv:lgtv-control
...
12 Sep 08:08:08 - [info] Installing module: node-red-contrib-lgtv-with-turnon, version: 1.0.3
12 Sep 08:08:39 - [info] Installed module: node-red-contrib-lgtv-with-turnon
12 Sep 08:08:39 - [info] Added node types:
12 Sep 08:08:39 - [info]  - node-red-contrib-lgtv-with-turnon:lgtv-config : lgtv-config already registered
12 Sep 08:08:39 - [info]  - node-red-contrib-lgtv-with-turnon:lgtv-control : lgtv-control already registered
...

Sorry if this question has already been asked somewhere, but what is the difference between both nodes?
And should I only install the latter one, because it is version 1.0.3 while the first one is version 1.0.0.

Thanks !!
Bart

Tv power on if a send Off

Hi,

i have an inject node that on 1 am send an OFF to the tv, everiting works if tv is On.

BUT, i the tv is off from about 4-5 hours when the inject node send the Off, the tv turns On...

If i try after to send againg after some minutes that the tv is Off nothing append...

Why? Wol?

Tnx

Can't install the nodes

Hi!
I'm new in Node-Red, but I have this problem. I can't install these nodes, but I have no problem to install some others.
The Logs gives me this
Schermata 2020-10-07 alle 20 12 16

Not able to connect anymore

Not able to connect to my lgtv any more running firmware 05.80.10.
Config not does not retrieve a token anymore.

How to switch TV on the serviio app and live stream when TV is ON?

Hello,
I want to watch the ip camera on my LG TV. It´s possible with app SERVIIO.
I use the Serviio app on my server synology.
App Serviio works as a DLNA server. On my LG TV I can see a serviio server and an online stream from the camera (s).
How can I switch TV directly to this stream with node-red-contrib-lgtv?
When a someone rings in front of me house, I need to TV automatically switches to the serviio app and ip live stream.
Thank You.
(sorry for my English)
Peter

Can't connect

I have tried with host name and with ip, it keep try connetting without succesfull...

TV Wouldn't turn off

I had an odd one today. I sent 2 toast messages to my TV today. Later, the TV wouldn't turn off - the screen went blank (but backlight still on) then it came back on the same screen as before. It refused to turn off until I shut down my Pi running nodeRed, and which point I could turn it off again. Seems like something is keeping the TV open and preventing it from shutting down.

Only installed nodeRed yesterday - and not had anything like this before.

raspbian LGTV

Good moorning,

we tried the lgtv palette with win10 and it works perfecly but it is impossible to connect with the tv when we have the node red installed in a Raspbian.

Could you pleasse help us?

Thanks.

Cannot send same ID to youtube app twice

I'm trying to use this to play a specific YouTube video.. and it works great the first time.. However it wont ever play it again unless i first send it another youtube video ID..

I'm sure i'm doing something wrong.. here is my flow..

[{"id":"be17117b.1beb9","type":"lgtv-youtube","z":"41e947de.ae7a98","tv":"8fadd761.3b4388","name":"Livingroom TV","x":800,"y":240,"wires":[]},{"id":"f0a8d714.9e422","type":"api-call-service","z":"41e947de.ae7a98","name":"Turn on TV","server":"a000b75b.0a2c88","version":1,"debugenabled":false,"service_domain":"media_player","service":"turn_on","entityId":"media_player.lg_tv","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":530,"y":320,"wires":[["202d9f74.56d5d8"]]},{"id":"942fb5ec.827368","type":"server-state-changed","z":"41e947de.ae7a98","name":"tidyup boolean","server":"a000b75b.0a2c88","version":1,"entityidfilter":"input_boolean.tidyup","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":180,"y":240,"wires":[["c94c7d04.22e758"]]},{"id":"c94c7d04.22e758","type":"switch","z":"41e947de.ae7a98","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":240,"wires":[["d7b2b05d.f13e68"]]},{"id":"202d9f74.56d5d8","type":"delay","z":"41e947de.ae7a98","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":680,"y":320,"wires":[["6f2c1a6a.b3b47c"]]},{"id":"d7b2b05d.f13e68","type":"api-current-state","z":"41e947de.ae7a98","name":"Is TV on?","server":"a000b75b.0a2c88","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.front_room_television_template","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":520,"y":240,"wires":[["6f2c1a6a.b3b47c"],["f0a8d714.9e422"]]},{"id":"179318e4.41ba5f","type":"api-call-service","z":"41e947de.ae7a98","name":"","server":"a000b75b.0a2c88","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.tidyup","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":950,"y":320,"wires":[[]]},{"id":"6f2c1a6a.b3b47c","type":"change","z":"41e947de.ae7a98","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"yybhG3c50b4","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":160,"wires":[["be17117b.1beb9","179318e4.41ba5f"]]},{"id":"8fadd761.3b4388","type":"lgtv-config","z":"","host":"192.168.2.230"},{"id":"a000b75b.0a2c88","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":false,"rejectUnauthorizedCerts":false,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Authentication prompt not appearing

All of a sudden I am not able to authenticate with the TV (LG OLED C8 2018). Tried removing all apps and reconnecting but the prompt never appears on the TV.

The TV shows the same IP I am trying to connect to. I am running nodered in docker and when logging on to the console of nodered, I am able to ping the TV.

Any recent changes that would prevent connection?

Nodered version: v1.0.4
lgtv node plugin: 1.1.0

Keine lgtv-config node

Hallo hobbyauaker,
habe deine node runtergeladen aber die config node ist nicht enthalten. Alle anderen nodes sind links aufgeführt. An was kann das liegen?
Danke für deine Hilfe
alpha

ERROR DOWNLOAD

Failed to install: node-red-contrib-lgtv

Install failed

2021-01-11T11:02:06.939Z Install : node-red-contrib-lgtv 1.1.0

2021-01-11T11:02:06.360Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production [email protected]
2021-01-11T11:02:12.843Z [out]
2021-01-11T11:02:12.843Z [out] > [email protected] install /config/node-red/node_modules/bufferutil
2021-01-11T11:02:12.843Z [out] > node-gyp-build
2021-01-11T11:02:12.843Z [out]
2021-01-11T11:02:15.123Z [err] gyp
2021-01-11T11:02:15.124Z [err]
2021-01-11T11:02:15.124Z [err] ERR! build error
2021-01-11T11:02:15.126Z [err] gyp
2021-01-11T11:02:15.126Z [err] ERR!
2021-01-11T11:02:15.126Z [err] stack
2021-01-11T11:02:15.126Z [err] Error: not found: make
2021-01-11T11:02:15.126Z [err] gyp ERR!
2021-01-11T11:02:15.126Z [err]
2021-01-11T11:02:15.126Z [err] stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2021-01-11T11:02:15.126Z [err] gyp
2021-01-11T11:02:15.126Z [err] ERR!
2021-01-11T11:02:15.126Z [err] stack
2021-01-11T11:02:15.126Z [err] at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2021-01-11T11:02:15.127Z [err] gyp ERR!
2021-01-11T11:02:15.127Z [err] stack
2021-01-11T11:02:15.127Z [err] at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2021-01-11T11:02:15.127Z [err] gyp
2021-01-11T11:02:15.127Z [err] ERR! stack
2021-01-11T11:02:15.127Z [err] at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
2021-01-11T11:02:15.127Z [err] gyp
2021-01-11T11:02:15.127Z [err] ERR!
2021-01-11T11:02:15.127Z [err] stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2021-01-11T11:02:15.127Z [err] gyp
2021-01-11T11:02:15.127Z [err] ERR!
2021-01-11T11:02:15.127Z [err] stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2021-01-11T11:02:15.127Z [err] gyp ERR!
2021-01-11T11:02:15.128Z [err] stack at FSReqCallback.oncomplete (fs.js:168:21)
2021-01-11T11:02:15.128Z [err] gyp
2021-01-11T11:02:15.128Z [err] ERR! System Linux 5.4.79-v8
2021-01-11T11:02:15.129Z [err] gyp
2021-01-11T11:02:15.129Z [err] ERR! command
2021-01-11T11:02:15.129Z [err] "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2021-01-11T11:02:15.129Z [err] gyp
2021-01-11T11:02:15.129Z [err] ERR! cwd
2021-01-11T11:02:15.129Z [err] /config/node-red/node_modules/bufferutil
2021-01-11T11:02:15.129Z [err] gyp
2021-01-11T11:02:15.129Z [err] ERR!
2021-01-11T11:02:15.129Z [err] node -v v12.18.4
2021-01-11T11:02:15.129Z [err] gyp ERR!
2021-01-11T11:02:15.129Z [err] node-gyp -v v5.1.0
2021-01-11T11:02:15.130Z [err] gyp ERR!
2021-01-11T11:02:15.130Z [err] not ok
2021-01-11T11:02:15.355Z [err] npm
2021-01-11T11:02:15.355Z [err] ERR! code ELIFECYCLE
2021-01-11T11:02:15.355Z [err] npm ERR!
2021-01-11T11:02:15.355Z [err] errno 1
2021-01-11T11:02:15.365Z [err] npm
2021-01-11T11:02:15.365Z [err] ERR! [email protected] install: node-gyp-build
2021-01-11T11:02:15.365Z [err] npm ERR! Exit status 1
2021-01-11T11:02:15.365Z [err] npm
2021-01-11T11:02:15.365Z [err] ERR!
2021-01-11T11:02:15.366Z [err]
2021-01-11T11:02:15.366Z [err] npm
2021-01-11T11:02:15.366Z [err] ERR! Failed at the [email protected] install script.
2021-01-11T11:02:15.366Z [err] npm ERR!
2021-01-11T11:02:15.366Z [err] This is probably not a problem with npm. There is likely additional logging output above.
2021-01-11T11:02:15.385Z [err]
2021-01-11T11:02:15.385Z [err] npm
2021-01-11T11:02:15.385Z [err] ERR! A complete log of this run can be found in:
2021-01-11T11:02:15.385Z [err] npm ERR!
2021-01-11T11:02:15.386Z [err] /root/.npm/_logs/2021-01-11T11_02_15_371Z-debug.log
2021-01-11T11:02:15.407Z rc=1

Can't get the token from LG OLED B7

I'm really having trouble getting the TV to connect and handshake the token to Node Red. I am able to connect via the media player plugins on Home Assistant. I don't really know what to do. I have tried using hostnames, ip addresses but no joy. Let me know if there's some more info that might be required to get this thing working.

Not receiving turn off signal

Hi,

After the TV upgraded its firmware, I hardly receive any turn off signal from the control node, I have waited for more than half hour still no luck.

Regards,
K

Subscribe to power states?

I can’t seem to be able to be notified when the TV is turned off. The homebridge webOS plugin seems to do that by poking at the port, but it would be nice to have an event made available to Node-Red.

lgtv-config

Hi, thanks for submitting!
Could you explain how to setup the lgtv-config please, I don't know where to find the 'host' & 'token' details.

Paul

Toast

Hallo,
wenn deutsch ok ist:
Der Node ist wirklich super!
Kann man mit dem Befehl Toast auch Bilder (Icons) an den LG senden?
Gruß, Johny

No LPTV config

Errr tried to install this twice with a fresh Node-red install and "LPTV-config" does not appear in the pallet ????

Any suggestions would be gratefully received

Errr this just appears to be a documentation issue. Config and token exchange can be done in "LPTV-conrol" node. It works welll.

app id's

May sound silly, but how do I get the app IDs / names from my TV?

thanks!

Config connect everytime TV is turned on

Every-time i turn the tv on i have to go back into config and press connect to get the controls working. Is everyone else having this same issue? Is there not a way to auto connect?

Install fails on RedMatic

When trying to install the nodes through the palette manager in RedMatic, install fails repeatedly with the following error:

gyp ERR! find Python gyp ERR! find Python Python is not set from command line or npm configuration gyp ERR! find Python Python is not set from environment variable PYTHON gyp ERR! find Python checking if "python" can be used gyp ERR! find Python - "python" is not in PATH or produced an error gyp ERR! find Python checking if "python2" can be used gyp ERR! find Python - "python2" is not in PATH or produced an error gyp ERR! find Python checking if "python3" can be used gyp ERR! find Python - "python3" is not in PATH or produced an error gyp ERR! find Python gyp ERR! find Python ********************************************************** gyp ERR! find Python You need to install the latest version of Python. gyp ERR! find Python Node-gyp should be able to find and use Python. If not, gyp ERR! find Python you can try one of the following options: gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable" gyp ERR! find Python (accepted by both node-gyp and npm) gyp ERR! fi...

Running RedMatic 6.0.4 on a Raspberry Pi 3B+ with RaspberryMatic 3.53.30.20200919.

I honestly have no idea what to do about that. Any help would be highly appreciated!

Installation failed Node-RED

`----------------------------------------------------------
2020-10-18T19:33:19.324Z Install : node-red-contrib-lgtv 1.1.0

2020-10-18T19:33:16.493Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix="~" --production [email protected]
2020-10-18T19:33:26.784Z [out]
2020-10-18T19:33:26.784Z [out] > [email protected] install /config/node-red/node_modules/bufferutil
2020-10-18T19:33:26.784Z [out] > node-gyp-build
2020-10-18T19:33:26.784Z [out]
2020-10-18T19:33:29.055Z [err] gyp
2020-10-18T19:33:29.056Z [err]
2020-10-18T19:33:29.056Z [err] ERR! build error
2020-10-18T19:33:29.057Z [err] gyp
2020-10-18T19:33:29.057Z [err] ERR! stack
2020-10-18T19:33:29.058Z [err] Error: not found: make
2020-10-18T19:33:29.058Z [err] gyp ERR!
2020-10-18T19:33:29.058Z [err] stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2020-10-18T19:33:29.058Z [err] gyp ERR!
2020-10-18T19:33:29.058Z [err] stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2020-10-18T19:33:29.058Z [err] gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2020-10-18T19:33:29.059Z [err] gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
2020-10-18T19:33:29.059Z [err] gyp
2020-10-18T19:33:29.059Z [err] ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2020-10-18T19:33:29.059Z [err] gyp ERR!
2020-10-18T19:33:29.059Z [err] stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2020-10-18T19:33:29.059Z [err] gyp ERR! stack at FSReqCallback.oncomplete (fs.js:168:21)
2020-10-18T19:33:29.060Z [err] gyp
2020-10-18T19:33:29.060Z [err] ERR! System Linux 4.19.127-v7l
2020-10-18T19:33:29.060Z [err] gyp
2020-10-18T19:33:29.061Z [err] ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2020-10-18T19:33:29.061Z [err] gyp ERR! cwd /config/node-red/node_modules/bufferutil
2020-10-18T19:33:29.061Z [err] gyp
2020-10-18T19:33:29.062Z [err] ERR! node -v
2020-10-18T19:33:29.062Z [err] v12.18.4
2020-10-18T19:33:29.062Z [err] gyp
2020-10-18T19:33:29.062Z [err] ERR! node-gyp -v v5.1.0
2020-10-18T19:33:29.062Z [err] gyp ERR! not ok
2020-10-18T19:33:29.542Z [err] npm
2020-10-18T19:33:29.543Z [err]
2020-10-18T19:33:29.543Z [err] WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
2020-10-18T19:33:29.544Z [err]
2020-10-18T19:33:29.588Z [err] npm
2020-10-18T19:33:29.589Z [err] ERR! code ELIFECYCLE
2020-10-18T19:33:29.589Z [err] npm
2020-10-18T19:33:29.589Z [err] ERR! errno
2020-10-18T19:33:29.590Z [err] 1
2020-10-18T19:33:29.597Z [err] npm
2020-10-18T19:33:29.598Z [err] ERR! [email protected] install: node-gyp-build
2020-10-18T19:33:29.598Z [err] npm ERR! Exit status 1
2020-10-18T19:33:29.598Z [err] npm
2020-10-18T19:33:29.598Z [err] ERR!
2020-10-18T19:33:29.598Z [err] npm ERR!
2020-10-18T19:33:29.598Z [err] Failed at the [email protected] install script.
2020-10-18T19:33:29.598Z [err] npm
2020-10-18T19:33:29.598Z [err] ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-10-18T19:33:29.619Z [err]
2020-10-18T19:33:29.619Z [err] npm ERR! A complete log of this run can be found in:
2020-10-18T19:33:29.620Z [err] npm
2020-10-18T19:33:29.620Z [err] ERR! /root/.npm/_logs/2020-10-18T19_33_29_605Z-debug.log
2020-10-18T19:33:29.638Z rc=1`

installing

Hello, i have hassio in an rpi3.

when installing I'm getting this error:
getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)

what should I do to install lgtv?

2020-12-02T19:47:00.345Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production [email protected]
2020-12-02T19:47:13.342Z [out]
2020-12-02T19:47:13.342Z [out] > [email protected] install /config/node-red/node_modules/bufferutil
2020-12-02T19:47:13.342Z [out] > node-gyp-build
2020-12-02T19:47:13.342Z [out]
2020-12-02T19:47:18.900Z [err] gyp
2020-12-02T19:47:18.902Z [err]
2020-12-02T19:47:18.903Z [err] ERR! build error
2020-12-02T19:47:18.905Z [err] gyp
2020-12-02T19:47:18.906Z [err] ERR!
2020-12-02T19:47:18.906Z [err] stack Error: not found: make
2020-12-02T19:47:18.906Z [err] gyp ERR!
2020-12-02T19:47:18.907Z [err] stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2020-12-02T19:47:18.907Z [err] gyp ERR!
2020-12-02T19:47:18.907Z [err] stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2020-12-02T19:47:18.908Z [err] gyp ERR!
2020-12-02T19:47:18.908Z [err] stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2020-12-02T19:47:18.908Z [err] gyp ERR!
2020-12-02T19:47:18.908Z [err] stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
2020-12-02T19:47:18.908Z [err] gyp ERR!
2020-12-02T19:47:18.909Z [err] stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2020-12-02T19:47:18.909Z [err] gyp
2020-12-02T19:47:18.909Z [err] ERR!
2020-12-02T19:47:18.909Z [err] stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2020-12-02T19:47:18.909Z [err] gyp
2020-12-02T19:47:18.910Z [err] ERR! stack at FSReqCallback.oncomplete (fs.js:168:21)
2020-12-02T19:47:18.911Z [err] gyp
2020-12-02T19:47:18.911Z [err] ERR! System Linux 4.19.127-v8
2020-12-02T19:47:18.912Z [err] gyp ERR! command
2020-12-02T19:47:18.912Z [err] "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2020-12-02T19:47:18.912Z [err] gyp
2020-12-02T19:47:18.912Z [err] ERR! cwd /config/node-red/node_modules/bufferutil
2020-12-02T19:47:18.912Z [err] gyp
2020-12-02T19:47:18.913Z [err] ERR! node -v v12.18.4
2020-12-02T19:47:18.913Z [err] gyp
2020-12-02T19:47:18.913Z [err] ERR! node-gyp -v v5.1.0
2020-12-02T19:47:18.913Z [err] gyp ERR!
2020-12-02T19:47:18.914Z [err] not ok
2020-12-02T19:47:19.394Z [err] npm
2020-12-02T19:47:19.394Z [err] ERR! code ELIFECYCLE
2020-12-02T19:47:19.395Z [err] npm
2020-12-02T19:47:19.395Z [err] ERR! errno 1
2020-12-02T19:47:19.412Z [err] npm
2020-12-02T19:47:19.412Z [err] ERR! [email protected] install: node-gyp-build
2020-12-02T19:47:19.412Z [err] npm ERR! Exit status 1
2020-12-02T19:47:19.412Z [err] npm ERR!
2020-12-02T19:47:19.413Z [err]
2020-12-02T19:47:19.413Z [err] npm ERR!
2020-12-02T19:47:19.413Z [err] Failed at the [email protected] install script.
2020-12-02T19:47:19.413Z [err] npm
2020-12-02T19:47:19.413Z [err] ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-12-02T19:47:19.449Z [err]
2020-12-02T19:47:19.451Z [err] npm ERR!
2020-12-02T19:47:19.452Z [err] A complete log of this run can be found in:
2020-12-02T19:47:19.452Z [err] npm ERR! /root/.npm/_logs/2020-12-02T19_47_19_425Z-debug.log

Crashes on node red v2

only able to configure lgtv on node red version 1.0. tried v2.0 with node.js v10,12 and 14 all crash node red.

LG TV keeps asking for accepting remote app

Hi,
My LG TV nano793 keeps asking me to accept a remote app every time I turn the TV ON.
It's pretty annoying.
Is it a known bug or something?
In Node-red the control node is used, and it is in a green and connected state.
Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.