iobroker-community-adapters / ioBroker.lgtv

LG WebOS SmartTV adapter for ioBroker
http://iobroker.net/
MIT License
22 stars 21 forks source link
electronics home home-automation iobroker lg server smart tv

Logo

ioBroker.lgtv

NPM version Downloads Number of Installations Current version in stable repository

NPM

Tests: Test and Release

LG WebOS SmartTV adapter for ioBroker

Remote controlling an LG WebOS SmartTV (2013 models and higher) from ioBroker.


Usage:

Install the adapter through ioBroker admin interface. In the adapter config input the ip address of your LG WebOS TV. At first connection you will receive a pairing prompt on your TV screen where you should allow the connection.

Polling

Some TVs disconnect from the web socket when the TV is turned off and do not report this to the adapter correctly. Then additional polling is required. You can define the time in settings. If the value is empty, the adapter tries to detect this automatically: On adapter restart the polling (every 60 sec) is active until the first correct TV off event is detected.

Some examples:

setState('lgtv.0.states.popup', 'Some text!');

This will show a popup with the text "Some text!" on the TV. You can use HTML linebreaks (br) in the text.

setState('lgtv.0.states.turnOff', true);

Switching off the TV.

setState('lgtv.0.states.mute', true);

Mute the TV.

setState('lgtv.0.states.mute', false);

Unmute the TV.

setState('lgtv.0.states.volumeUp', true);

This will increase the volume of the TV.

setState('lgtv.0.states.volumeDown', true);

Decreasing the volume of the TV.

setState('lgtv.0.states.channelUp', true);

Increasing the current TV channel.

setState('lgtv.0.states.channelDown', true);

Decreasing the current TV channel.

setState('lgtv.0.states.3Dmode', true);

Activates the 3D mode on the TV

setState('lgtv.0.states.3Dmode', false);

Deactivates the 3D mode on the TV.

setState('lgtv.0.states.channel', 7);

Switching the live TV to channel number 7.

setState('lgtv.0.states.launch', 'livetv');

Switching to Live TV mode.

setState('lgtv.0.states.launch', 'smartshare');

Opening the SmartShare App on the TV.

setState('lgtv.0.states.launch', 'tvuserguide');

Runs the TV User Guide App on the TV.

setState('lgtv.0.states.launch', 'netflix');

Opening the Netflix App on the TV.

setState('lgtv.0.states.launch', 'youtube');

Opens the Youtube App on the TV.

setState('lgtv.0.states.launch', 'prime');

Opens the Amazon Prime App on the TV.

setState('lgtv.0.states.launch', 'amazon');

On some TVs this command opens the Amazon Prime App.

setState('lgtv.0.states.openURL', 'http://www.iobroker.net');

Opens the Webbrowser on the TV and navigates to www.iobroker.net. Can also be used to open images or videos (in the browser).

setState('lgtv.0.states.input', 'av1');

Switches the iput oh the TV to AV1.

setState('lgtv.0.states.input', 'scart');

Switches the iput oh the TV to Scart.

setState('lgtv.0.states.input', 'component');

Switches the iput oh the TV to Component.

setState('lgtv.0.states.input', 'hdmi1');

Switches the iput oh the TV to HDMI 1.

setState('lgtv.0.states.input', 'hdmi2');

Switches the iput oh the TV to HDMI 2.

setState('lgtv.0.states.input', 'hdmi3');

Switches the iput oh the TV to HDMI 3.

setState('lgtv.0.states.youtube', 'https://www.youtube.com/watch?v=AjSpMQfRmEo'); OR setState('lgtv.0.states.youtube', 'AjSpMQfRmEo');

Play YouTube video.

setState('lgtv.0.states.raw', '{"url": "ssap://system.launcher/launch", "cmd": "{id: 'netflix'}" }'); setState('lgtv.0.states.raw', '{"url": "ssap://api/getServiceList", "cmd": ""}');

Sending and response RAW command API.

setState('lgtv.0.remote.*KEY*', true);

Send remote KEY to TV.

setState('lgtv.0.states.power', true/false);

Turn Off TV and Turn On TV (TurnOn, works only LAN, using WOL).

setState('lgtv.0.states.soundOutput', 'external_arc');

Switch audio output through ARC (HDMI).


States

channel

holds the current channel

volume

holds the current volume level and can change the volume

on

is true when TV is on and false if TV is off


Changelog

2.2.0 (2024-04-13)

2.1.2 (2023-10-26)

2.1.1 (2023-10-06)

2.1.0 (2023-10-05)

2.0.0 (2023-10-03)

1.1.12 (2023-07-04)

1.1.10 (2020-08-24)

1.1.9 (2020-07-14)

1.1.8 (2020-07-08)

1.1.6 (2020-03-07)

1.1.5 (2020-02-25)

1.1.4 (2020-02-07)

1.1.3 (2019-12-16)

1.1.1 (2019-10-26)

1.1.0 (2019-10-10)

1.0.8 (2019-03-15)

1.0.7 (2019-01-28)

1.0.6 (2019-01-21)

1.0.5 (2018-04-15)

1.0.4 (2018-04-07)

1.0.3 (2018-01-11)

1.0.2 (2017-05-23)

1.0.0 (2016-09-26)

0.0.4 (2016-09-12)

0.0.3 (2016-09-05)

0.0.2 (2016-09-02)

0.0.1 (2016-08-31)


License

MIT License

Copyright (c) 2024 iobroker-community-adapters iobroker-community-adapters@gmx.de Copyright (c) 2023 Sebastian Schultz.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.