Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lg-netcast

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lg-netcast

Node package to interact with LG netcast TVs (2012, 2013)

  • 1.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

lg-netcast

Netcast client written in js/ts

Installation

npm install lg-netcast

Usage Example

Initialize the client with the API host. By default the port is :8080, make sure you add that to your API_HOST

Get current channel information

const client = new NetcastClient(API_HOST);
client.get_session(access_token).then(async (session_id) => {
    const cur_channel = await client.get_current_channel(session_id);
    console.log(cur_channel);
});

Check the API docs for general usage on this package

Authentication

To interact with the TV, you need a valid access_token. The access token is actually just the pair code of the TV, you can get that with client.display_pair_code().

CLI

This package comes with a very simple CLI to query TV information

Usage: netcast-cli [options]

Options:
  --host: Host of the TV
    (default: "192.168.1.1:8080")
  --access_token: Pair code of the TV
    (default: "123456")
    (an integer)
  --command: command to issue
    (default: "current_channel")
❯ netcast-cli --host 192.168.1.14:8080 --access_token 1234567
Querying current channel
{
  chtype: 'satellite',
  sourceIndex: '7',
  physicalNum: '265',
  major: '200',
  displayMajor: '200',
  minor: '65535',
  displayMinor: '-1',
  chname: 'スターチャンネル1',
  progName: 'エスケープ・ルーム(2019)',
  audioCh: '0',
  inputSourceName: 'TV',
  inputSourceType: '0',
  labelName: {},
  inputSourceIdx: '0'
}

License

MIT

FAQs

Package last updated on 24 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc