Interface between LG WebOS Sma
Getting started TV configurationInterface between LG WebOS Smart TVs and MQTT
You need to allow "LG Connect Apps" on your TV - see http://www.lg.com/uk/support/product-help/CT00008334-1437131798537-others
Installnpm install -g lgtv2mqtt
lgtv2mqtt --help
Topics and Payloads follow mqtt-smarthome Architecture.
lgtv/set/muteEnable or disable mute. Payload should be one off '0', '1', 'false' and 'true'.
lgtv/set/volumeSet volume. Expects value between 0 and 100.
lgtv/set/toastShow a Popup Message. Send Message as plain payload string.
lgtv/set/launchLauch an app. Send AppId as plain payload string.
lgtv/set/media.controls/play lgtv/set/media.controls/pause lgtv/set/media.controls/stop lgtv/set/media.controls/rewind lgtv/set/media.controls/fastForward lgtv/set/system/turnOff lgtv/set/com.webos.service.tv.display/set3DOn lgtv/set/com.webos.service.tv.display/set3DOff lgtv/set/move lgtv/set/dragSend 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
lgtv/set/click lgtv/set/buttonSend 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
lgtv/set/youtubeYoutube video ID as payload. Runs youtube app and opens video.
topics published by lgtv2mqtt lgtv/status/volumeReports volume changes. Payload is the plain value.
lgtv/status/muteReports mute changes. Payload is '0' (not muted) or '1' (muted).
lgtv/status/foregroundAppReports which App is currently in foreground. (example Payloads: 'netflix', 'com.webos.app.livetv', 'com.webos.app.hdmi2')
lgtv/status/currentChannelReports 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.
LicenseMIT © Sebastian Raff
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。