<commit_before># LGTV2

[![NPM version](https://badge.fury.io/js/lgtv2.svg)](http://badge.fury.io/js/lgtv2)
[![Dependency Status](https://img.shields.io/gemnasium/hobbyquaker/lgtv2.svg?maxAge=2592000)](https://gemnasium.com/github.com/hobbyquaker/lgtv2)
[![Build Status](https://travis-ci.org/hobbyquaker/lgtv2.svg?branch=master)](https://travis-ci.org/hobbyquaker/lgtv2)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![License][mit-badge]][mit-url]

Simple Node.js module to remote control LG WebOS smart TVs.

> this is a fork of [LGTV.js](https://github.com/msloth/lgtv.js), heavily modified and rewritten to suite my needs.

With __v1.4.0__ the location and filename of the keyFile is changed, so you likely will have to accept the connection on 
your TV again after upgrading to 1.4.0.


## Installation

`npm install lgtv2`

## TV configuration

You need to allow "LG Connect Apps" on your TV - see http://www.lg.com/uk/support/product-help/CT00008334-1437131798537-others

## Usage Examples


Subscribe to volume and mute changes and output to console:
```javascript

var lgtv = require("lgtv2")({<commit_msg>add projects<commit_after># LGTV2

[![NPM version](https://badge.fury.io/js/lgtv2.svg)](http://badge.fury.io/js/lgtv2)
[![Dependency Status](https://img.shields.io/gemnasium/hobbyquaker/lgtv2.svg?maxAge=2592000)](https://gemnasium.com/github.com/hobbyquaker/lgtv2)
[![Build Status](https://travis-ci.org/hobbyquaker/lgtv2.svg?branch=master)](https://travis-ci.org/hobbyquaker/lgtv2)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![License][mit-badge]][mit-url]

Simple Node.js module to remote control LG WebOS smart TVs.

> this is a fork of [LGTV.js](https://github.com/msloth/lgtv.js), heavily modified and rewritten to suite my needs.

With __v1.4.0__ the location and filename of the keyFile is changed, so you likely will have to accept the connection on 
your TV again after upgrading to 1.4.0.


## Projects using this Module

* [node-red-contrib-lgtv](https://github.com/hobbyquaker/node-red-contrib-lgtv)
* [lgtv2mqtt](https://github.com/hobbyquaker/lgtv2mqtt)
* [homebridge-webos3](https://github.com/merdok/homebridge-webos3)
* [ioBroker.lgtv](https://github.com/SebastianSchultz/ioBroker.lgtv)


## Installation

`npm install lgtv2`

## TV configuration

You need to allow "LG Connect Apps" on your TV - see http://www.lg.com/uk/support/product-help/CT00008334-1437131798537-others

## Usage Examples


Subscribe to volume and mute changes and output to console:
```javascript

var lgtv = require("lgtv2")({
{'fraction_non_alphanumeric': 0.1522880720180045, 'fraction_numerical': 0.03600900225056264, 'mean_word_length': 4.926666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 20, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1388078', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1012, 'n_words': 204}