viera-api

1.1.0 • Public • Published

Viera API

Simple interface for controlling Panasonic Viera TVs.

This is based on @samuelmatis's viera-control. His repo is much more full featured, mine is just stripped down for my own uses. For a better version, use his.

Installation

npm install --save viera-api

Usage

const Viera = require('viera-api');

Viera('IP of TV', 'code').then(
  (success) => {},
  (error) => {}
);

When successful, the promise body is Success!.

A full list of the codes can be found on @samuelmatis's repo. Viera wraps the command with NRC_<command>-ONOFF, so you can just specify the command e.g. POWER. You can specify the command in lowercase.

Chaining commands

You can use comma separated values to chain commands, e.g.

Viera('192.168.1.1', 'volup,volup,volup')

This will increment the volume three times. Viera doesn't wait for commands to return before firing another, the requests fire in quick succession.

Readme

Keywords

none

Package Sidebar

Install

npm i viera-api

Weekly Downloads

2

Version

1.1.0

License

ISC

Last publish

Collaborators

  • shaundon