Interface between LG WebOS Smart TVs and MQTT 📺
- TV configuration
You need to allow "LG Connect Apps" on your TV - see http://www.lg.com/uk/support/product-help/CT00008334-1437131798537-others
- Install
npm install -g lgtv2mqtt
- Start
lgtv2mqtt --help
Topics and Payloads follow mqtt-smarthome Architecture.
Enable or disable mute. Payload should be one off '0', '1', 'false' and 'true'.
Set volume. Expects value between 0 and 100.
Show a Popup Message. Send Message as plain payload string.
Lauch an app. Send AppId as plain payload string.
Send coordinates as JSON with attributes dx and dy of type number
Example payload: {dx: 100, dy: 0}
Send coordinates as JSON with attributes dx and dy of type number
Send button as plain string payload
Buttons that are known to work: MUTE, RED, GREEN, YELLOW, BLUE, HOME, MENU, VOLUMEUP, VOLUMEDOWN, CC, BACK, UP, DOWN, LEFT, ENTER, DASH, 0-9, EXIT, channelup, channeldown, record
Youtube video ID as payload. Runs youtube app and opens video.
Reports volume changes. Payload is the plain value.
Reports mute changes. Payload is '0' (not muted) or '1' (muted).
Reports which App is currently in foreground. (example Payloads: 'netflix', 'com.webos.app.livetv', 'com.webos.app.hdmi2')
Reports current channel if foregroundApp is 'com.webos.app.livetv'. Payload is a JSON String, property val contains the channelNumber, underneath 'lgtv' you will find more properties with detailed information.
MIT © Sebastian Raff