npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

homebridge-lgwebos-tv

v4.2.17

Published

Homebridge plugin to control LG webOS TV.

Downloads

8,311

Readme

Homebridge LG webOS TV

verified-by-homebridge npm npm npm GitHub pull requests GitHub issues

Package Requirements

| Package | Installation | Role | Required | | --- | --- | --- | --- | | Homebridge | Homebridge Wiki | HomeKit Bridge | Required | | Homebridge UI | Homebridge UI Wiki | Homebridge User Interface | Recommended | | LG webOS TV | Plug-In Wiki | Homebridge Plug-In | Required |

Warning

  • For plugin < v4.1.0 use Homebridge UI <= v5.5.0.
  • For plugin >= v4.1.0 use Homebridge UI >= v5.13.0.

Abut The Plugin

  • Support SSL Web Socket for newer TV, plugin config Advanced Settings >> Device >> SSL WebSocket
  • Power and Screen ON/OFF short press tile in HomeKit app.
  • Media control is possible after you go to the RC app (iPhone/iPad).
  • Speaker control with hardware buttons after you go to RC app (iPhone/iPad).
  • Legacy Volume and Mute control is possible throught extra Lightbulb / Fan (slider).
  • Inputs can be changed using Inputs selector in Home app, additionally with extra buttons.
  • Channels can be changed using Channels selector in Home app, additionally with extra buttons.
  • Brightness, Contrast, Backlight, Color, Picture Mode, Sound Mode and Sound Output can be changed using extra buttons.
  • Siri can be used for all functions, some times need to create legacy buttons/switches/sensors.
  • Automations can be used for all functions, some times need create legacy buttons/switches/sensors.
  • Support external integrations, RESTFul, MQTT.

Configuration

  • Please configure LG Connect Apps
  • Run this plugin as a Child Bridge (Highly Recommended), this prevent crash Homebridge if plugin crashes.
  • Install and use Homebridge UI to configure this plugin.
  • The sample-config.json can be edited and used as an alternative.

| Key | Description | | --- | --- | | name | Here set the accessory Name to be displayed in Homebridge/HomeKit. | | host | Here set the Hsostname or Address IP of TV. | | mac | Here set the Mac Address of TV. | | displayType | Accessory type to be displayed in Home app: 0 - None / Disabled, 1 - Television , 2 - TV Set Top Box, 3 - TV Streaming Stick, 4 - Audio Receiver. | | inputs{} | Inputs object. | | inputs.getFromDevice | This enable load inputs and apps direct from device. | | inputs.filterSystemApps | This enable filter sysem apps, only if getFromDevice is true. | | inputs.displayOrder | Here select display order of the inputs list, 0 - None, 1 - Ascending by Name, 2 - Descending by Name, 3 - Ascending by Reference, 4 - Ascending by Reference. | | inputs.data[].name | Here set Name which You want expose to the Homebridge/HomeKit. | | inputs.data[].reference | Here set Reference. | | inputs.data[].mode | Here select input mode, 0 - Input/App, 1 - Live TV Channel. | | buttons[] | Buttons array. | | buttons[].displayType | Here select display type in HomeKit app, possible 0 - None / Disabled, 1 - Outlet, 2 - Switch.| | buttons[].name | Here set Name which You want expose to the Homebridge/HomeKit. | | buttons[].mode | Here select button mode, 0 - Input/App, 1 - Live TV Channel, 2 - Remote Control. | | buttons[].reference | Here set Reference, only for Input/App or Live TV Channel mode, in other case leave empty. | | buttons[].command | Here select Remote Control command which will be assigned to the button. | | buttons[].namePrefix | Here enable the accessory name as a prefix for button name.| | sensors[] | Sensors array. | | sensors[].displayType | Here choose the sensor type to be exposed in HomeKit app, possible 0 - None / Disabled, 1 - Motion Sensor, 2 - Occupancy Sensor, 3 - Contact Sensor. | | sensors[].mode | Here choose the sensor mode, possible 0 - Input, 1 - Power, 2 - Volume, 3 - Mute, 4 - Sound Mode, 5 - Sound Output, 6 - Picture Mode, 7 - Screen Off, 8 - Screen Saver, 9 - Pixel Refresh, 10 - Play State, 11 - Channel. | | sensors[].name | Here set own sensor Name which You want expose to the Homebridge/HomeKit. | | sensors[].reference | Here set mode Reference, sensor fired on switch to this reference. | | sensors[].pulse | Here enable sensor pulse, sensor send pulse and fired on every value change of selected mode. | | sensors[].namePrefix | Here enable the accessory name as a prefix for sensor name. | | sensors[].level | Here set Level between 0-100, sensor fired on this level. | | picture{} | Picture object. | | picture.brightnessControl | This enable possibility adjust the Brightness. | | picture.backlightControl | This enable possibility adjust the Backlight. | | picture.contrastControl | This enable possibility adjust the Contrast. | | picture.colorControl | This enable possibility adjust the Color. | | picture.modes[]| Picture modes array, webOS >= 4.0. | | picture.modes[].displayType | Here select display type in HomeKit app, possible 0 - None / Disabled, 1 - Outlet, 2 - Switch.| | picture.modes[].name | Here set own Name which You want expose to the Homebridge/HomeKit for this sensor. | | picture.modes[].reference | Here select mode to be exposed in Homebridge/HomeKit. | | picture.modes[].namePrefix | Here enable the accessory name as a prefix for picture mode.| | sound{} | Sound object. | | sound.modes{} | Sound mode object. | | sound.modes.data[]| Sound modes array, webOS >= 6.0. | | sound.modes.data[].displayType | Here select display type in HomeKit app, possible 0 - None / Disabled, 1 - Outlet, 2 - Switch.| | sound.modes.data[].name | Here set own Name which You want expose to the Homebridge/HomeKit for this sensor. | | sound.modes.data[].reference | Here select mode to be exposed in Homebridge/HomeKit. | | sound.modes.data[].namePrefix | Here enable the accessory name as a prefix for sound mode.| | sound.outputs{} | Sound output object. | | sound.outputs.data[]| Sound outputs array. | | sound.outputs.data[].displayType | Here select display type in HomeKit app, possible 0 - None / Disabled, 1 - Outlet, 2 - Switch.| | sound.outputs.data[].name | Here set own Name which You want expose to the Homebridge/HomeKit for this sensor. | | sound.outputs.data[].reference | Here select output to be exposed in Homebridge/HomeKit. | | sound.outputs.data[].namePrefix | Here enable the accessory name as a prefix for sound output.| | screen{} | Screen object. | | screen.turnOnOff | This enable possibility turn the screen ON/OFF, webOS >= 4.0. | | screen.saverOnOff | This enable possibility turn the screen saver ON/OFF, webOS >= 4.0. | | power{} | Power object. | | power.broadcastAddress | Her set network Broadcast Address, only if You use VLANS in Your network configuration and Your router/switch support IP Directed Broadcast, default is 255.255.255.255. | | power.startInput | This enable possibilty to set default Input/App after Power ON TV. | | power.startInputReference | Here set the default Input/App reference. | | volume{} | Volume object. | | volume.displayType | Here choice what a additional volume control mode You want to use 0 - None / Disabled, 1 - Lightbulb, 2 - Fan, 3 - TV Speaker (only hardware buttons on R.C. app), 4 - TV Speaker / Lightbulb, 5 - TV Speaker / Fan. | | volume.name | Here set Your own volume control name or leave empty. | | volume.namePrefix | Here enable the accessory name as a prefix for volume control name. | | sslWebSocket | If enabled, SSL WebSocket will support TV with new firmware. | | disableTvService | This disable TV service and prevent display double services if TV already support HomeKit native. | | infoButtonCommand | Here select the function of I button in RC app. | | heartBeatInterval | Heart beat check when TV is off, default is 5 sec. | | log{} | Log object. | | log.deviceInfo | If enabled, log device info will be displayed by every connections device to the network. | | log.success | If enabled, success log will be displayed in console. | | log.info | If enabled, info log will be displayed in console. | | log.warn | If enabled, warn log will be displayed in console. | | log.error | If enabled, error log will be displayed in console. | | log.debug | If enabled, debug log will be displayed in console. | | restFul{} | RESTFul object. | | restFul.enable | If enabled, RESTful server will start automatically and respond to any path request. | | restFul.port | Here set the listening Port for RESTful server. | | mqtt{} | MQTT object. | | mqtt.enable | If enabled, MQTT Broker will start automatically and publish all awailable PV data. | | mqtt.host | Here set the IP Address or Hostname for MQTT Broker. | | mqtt.port | Here set the Port for MQTT Broker, default 1883. | | mqtt.clientId | Here optional set the Client Id of MQTT Broker. | | mqtt.prefix | Here set the Prefix for Topic or leave empty. | | mqtt.auth{} | MQTT authorization object. | | mqtt.auth.enable | Here enable authorization for MQTT Broker. | | mqtt.auth.user | Here set the MQTT Broker user. | | mqtt.auth.passwd | Here set the MQTT Broker password. | | reference | All can be found in homebridge_directory/lgwebosTv, inputs_xxx file. |

RESTFul Integration

  • POST data as a JSON Object {Power: true}, content type must be application/json
  • Path status response all available paths.
  • References:
    • Picture Mode - cinema, eco, expert1, expert2, game, normal, photo, sports, technicolor, vivid, hdrEffect, hdrFilmMaker, hdrCinema, hdrCinemaBright, hdrStandard, hdrEffect, hdrGame, hdrVivid, hdrTechnicolor, hdrExternal, dolbyHdrCinema, dolbyHdrCinemaBright, dolbyHdrDarkAmazon, dolbyHdrStandard, dolbyHdrGame, dolbyHdrVivid.
    • Sound Mode - aiSoundPlus, standard, movie, clearVoice, news, sport, music, game.
    • Sound Output - tv_speaker, external_speaker, external_optical, external_arc, lineout, headphone, tv_external_speaker, tv_external_headphone, bt_soundbar, soundbar.

| Method | URL | Path | Response | Type | | --- | --- | --- | --- | --- | | GET | http//ip:port | powerstaste, systeminfo, softwareinfo, channels, apps, power, audio, currentapp, currentchannel, picturesettings, soundmode, soundoutput, externalinputlist, mediainfo. | {"state": Active} | JSON object. |

| Method | URL | Key | Value | Type | Description | | --- | --- | --- | --- | --- | --- | | POST | http//ip:port | Power | true, false | boolean | Power state. | | | http//ip:port | Input | input reference | string | Set input. | | | http//ip:port | Channel | channel reference | string | Set channel. | | | http//ip:port | Volume | 100 | integer | Set volume. | | | http//ip:port | Mute | true, false | boolean | Set mute. | | | http//ip:port | Brightness | 100 | integer | Set brightness. | | | http//ip:port | Backlight | 100 | integer | Set backlight. | | | http//ip:port | Contrast | 100 | integer | Set contrast. | | | http//ip:port | Color | 100 | integer | Set color. | | | http//ip:port | PictureMode | picture mode reference | string | Set picture mode. | | | http//ip:port | SoundMode | sound mode reference | string | Set sound mode. | | | http//ip:port | SoundOutput | sound output reference | string | Set sound output. | | | http//ip:port | PlayState | play, pause | string | Set media play state. | | | http//ip:port | RcControl | REWIND | string | Send RC command. |

MQTT Integration

  • Subscribe data as a JSON Object {Power: true}
  • References:
    • Picture Mode - cinema, eco, expert1, expert2, game, normal, photo, sports, technicolor, vivid, hdrEffect, hdrFilmMaker, hdrCinema, hdrCinemaBright, hdrStandard, hdrEffect, hdrGame, hdrVivid, hdrTechnicolor, hdrExternal, dolbyHdrCinema, dolbyHdrCinemaBright, dolbyHdrDarkAmazon, dolbyHdrStandard, dolbyHdrGame, dolbyHdrVivid.
    • Sound Mode - aiSoundPlus, standard, movie, clearVoice, news, sport, music, game.
    • Sound Output - tv_speaker, external_speaker, external_optical, external_arc, lineout, headphone, tv_external_speaker, tv_external_headphone, bt_soundbar, soundbar.

| Method | Topic | Message | Type | | --- | --- | --- | --- | | Publish | Power State, System Info, Software Info, Channels, Apps, Power, Audio, Current App, Current Channel, Picture Settings, Sound Mode, Sound Output, External Input List, Media Info | {"state": Active} | JSON object. |

| Method | Topic | Key | Value | Type | Description | | --- | --- | --- | --- | --- | --- | | Subscribe | Set | Power | true, false | boolean | Power state. | | | Set | Input | input reference | string | Set input. | | | Set | Channel | channel reference | string | Set channel. | | | Set | Volume | 100 | integer | Set volume. | | | Set | Mute | true, false | boolean | Set mute. | | | Set | Brightness | 100 | integer | Set brightness. | | | Set | Backlight | 100 | integer | Set backlight. | | | Set | Contrast | 100 | integer | Set contrast. | | | Set | Color | 100 | integer | Set color. | | | Set | PictureMode | picture mode reference | string | Set picture mode. | | | Set | SoundMode | sound mode reference | string | Set sound mode. | | | Set | SoundOutput | sound output reference | string | Set sound output. | | | Set | PlayState | play, pause | string | Set media play state. | | | Set | RcControl | REWIND | string | Send RC command. |