LG WebOS SmartTV adapter for ioBroker
Remote controlling an LG WebOS SmartTV (2013 models and higher) from ioBroker.
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.
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.
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).
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
- (mcm1957) Adapter requires node.js 18 and js-controller >= 5 now
- (mcm1957) Dependencies have been updated
- (agross) Functionality of state.on turning false immediately after turning off the TV with turnOff has been restored. [#165]
- (mcm1957) Dependencies have been updated
- (basti4557) Websocket configuration has been fixed [#161].
- (basti4557) A bug that destryed the actual app state on changing from tv to app mode has been fixed.
- (basti4557) Websocket SSL states can now be sent / received again due to the websocket ssl changes.
- (basti4557) Plain websocket has been replced by SSL Websocket.
- (mcm1957) Adapter has been moved to iobroker-community-adapters area
- (mcm1957) POSSIBLE BREAKING: Adapter has been built from current github content. As latest npm packages have been created external, theres a chance that some changes got lost.
- (jpawlowski) Travis and AppVeyor have been replced by GitHub Actions, based on ioBroker/create-adapter
- (jpawlowski) Adpter requires NodeJS 16 minimum now
- (jpawlowski) Dependencies have been updated
- (jpawlowski) Configuration item healthIntervall has been rename/correct to healthInterval
- (foxriver76) prepare for controller v5
- (SebastianSchultz) support WebOS 5 for volume change
- (SebastianSchultz) re-upload for fixing NPM update issue
- (SebastianSchultz) bugfix for "IndexOf" error
- (dirkhe) make healthintervall configurable
- (dirkhe) stable connection and subsciptions
- (dirkhe) add Polling for TV, which not support Power Off event
- (dirkhe) change some states role switch to button
- (dirkhe) changed from pull to subscribing
- (dirkhe) add livetv to launch list
- (merdok) fixed connect() Pull requests #62
- (instalator) fixed issues #64
- (instalator) change error log to debug issues #59
- (instalator) Safe keyfile to /opt/iobroker issues #52
- (instalator) fix error reconect
- (instalator) fix raw object
- (instalator) add mac address to admin settings
- (instalator) adding object remote.KEY
- (instalator) fix connect to TV
- (instalator) add subscribe volume and mute state
- (instalator) translate admin to RUS
- (instalator) add Turn On, using WOL
- (instalator) adding new different objects
- (SebastianSchultz) changed roles "button" to "switch" for compatibility for iot- & cloud-adapter
- (SebastianSchultz) general NPM update
- (SebastianSchultz) grouping of all states/objects under a device
- (SebastianSchultz) added compact mode
- (SebastianSchultz) added Travis-CI and AppVeyor tests
- (SebastianSchultz) added support for increasing (channelUp) or decreasing (channelDown) the current TV channelDown
- (SebastianSchultz) added the state "volume" which holds the current volume level
- (SebastianSchultz) added support for launching Amazon Prime app via "amazon" (used on some TV's instead of "prime")
- (SebastianSchultz) fixed issue that state "on" was not set when in an app on TV
- (SebastianSchultz) added support for launching Amazon Prime app
- (SebastianSchultz) added channel polling
- (SebastianSchultz) added switching input
- (SebastianSchultz) solved saving IP address within adapter configuration
- (SebastianSchultz) added volumeUp true|false
- (SebastianSchultz) added volumeDown true|false
- (SebastianSchultz) added 3Dmode true|false
- (SebastianSchultz) added launch livetv|smartshare|tvuserguide|netflix|youtube|
- (SebastianSchultz) added channel
- (SebastianSchultz) some code cleaned
- (SebastianSchultz) removed reconnect function, not used
- (SebastianSchultz) improved error handling and logging
- (SebastianSchultz) initial commit
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.