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

braviawrap

v1.0.10

Published

TypeScript Wrapper for Sony Bravia REST API

Readme

braviaWrap

TypeScript wrapper for the Sony Bravia REST API

Why Tho?

My TV remote sucks, and I just found out my TV has API support.

I'm just a girl who wants a dedicated Plex button, is that so much to ask?

Usage

This is what you're here for.

import { bravia } from "./braviawrap/bravia.ts";
var mytv = new bravia("tvIP","tvPSK");        //PSK optional for some models!

console.log(await mytv.system.getCurrentTime());

Output:

{
  result: [
    {
      dateTime: '2025-08-07T07:02:27-0400',
      timeZoneOffsetMinute: -300,
      dstOffsetMinute: 60
    }
  ],
  id: 1
}

Bravia displays which are not in "PRO MODE" may lack a few features and authentication methods.

If your Bravia has GoogleTV instead of AndroidTV, you can not enable it.

Note: To actually turn on the TV you need to enable Wake On Lan or keep the TV from sleeping with USB power settings.

Detailed Usage (usage but boring)

The Bravia API is split into several "services":

[guide, appControl, audio, avContent, encryption, system, video, videoScreen]

Within these services, there are methods.

Ex:

System contains: getCurrentTime, setPowerStatus, etc.

Audio contains: getSoundSettings, setAudioVolume, etc.

After creating a "bravia" instance, you may use most methods as follows:

await braviaInst.serviceName.methodName();

Each method returns some response in JSON, including the "result" and "id" elements:

{
  result: [
    {
      dateTime: '2025-08-07T05:33:20-0400',
      timeZoneOffsetMinute: -300,
      dstOffsetMinute: 60
    }
  ],
  id: 1
}

OR an error:

{ error: [ 3, 'Illegal Argument' ], id: 1 }

Finally:

Resources

Here is a list of every Bravia API error code.

Here is the landing page for the Bravia REST API, which lists every service and method.

They even have a little demo html file you can download.

PLEASE NOTE

The Bravia API docs have some typos, and some examples which I suspect may be outdated. Additionally, because it seems imperfectly maintained, it just sort of straight up lies sometimes.

Ex: getTextForm (v1.1) falsely claims that you may request data without encryption. As far as I can tell, it seems that this was changed when moving from version 1.0 to 1.1. Part of the page is right, but it's waaaay at the bottom and very vague. I figure there's probably more stuff like that I haven't found yet.

// This is my first TypeScript project, so beware!

// This is also my first anything project in a while, so double beware!