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 🙏

© 2024 – Pkg Stats / Ryan Hefner

y5

v0.2.0

Published

simple yamaha remote

Downloads

169

Readme

###Simple API for Yamaha Receiver

NPM version License

Description

Realtime Event API for Yamaha Receiver.

Important

Yamaha allows only one client connection at a time!

Some examples

Only listening on state changes:

var Y5 = require('y5');

var y5 = Y5('192.168.1.30');
y5.onEvent = function(event) {
    console.log(JSON.stringify(event));
};

// some outputs:
// {"section":"MAIN","state":"VOL","value":"-33.5"}
// {"section":"MAIN","state":"VOL","value":"-33.0"}
// {"section":"MAIN","state":"VOL","value":"-32.5"}
// {"section":"MAIN","state":"PWR","value":"On"}

Sending:

var Y5 = require('y5');
var yamahaIP = '192.168.1.30';

var y5 = Y5(yamahaIP, function (err) {
});
y5.onLine = function(line) {
    console.log(line);
};

// request a state value:
y5.send('@MAIN:PWR=?'); // as result onLine or onEvent will be called with the result

// set a state value:
y5.send('@MAIN:PWR=On');
//y5.close();

Here are some possible states

some_possible_event_states = {
  "MAIN": {
    "PWR": "On",
    "AUDSEL": "Auto",
    "AVAIL": "Ready",
    "INP": "AV1",
    "MUTE": "Off",
    "PUREDIRMODE": "Off",
    "SOUNDPRG": "Action Game",
    "STRAIGHT": "Off",
    "VOL": "-34.0",
    "DECODERSEL": "Auto",
    "ENHANCER": "On",
    "CONTENTSDISP": "On",
    "2CHDECODER": "Dolby PLII Movie",
    "EXBASS": "Off",
    "TONETREBLE": "0.0"
  },
  "SYS": {
    "PWR": "On",
    "DMCCONTROL": "Enable",
    "HDMIOUT1": "On",
    "HDMIOUT2": "On",
    "PARTY": "Off",
    "SPPATTERN": "Pattern 1",
    "LIPSYNCSELINFO": "Analog",
    "LIPSYNCTOTALDELAYINFO": "0",
    "SPPATTERN2SURBCNFG": "",
    "SPPATTERN2FPRESCNFG": "",
    "SPPATTERN2SWFR2CNFG": "",
    "SPPATTERN2AMP": "7ch +2ZONE",
    "SPPATTERN2FRNTCNFG": "",
    "SPPATTERN2SWFR1CNFG": "",
    "SPPATTERN2SWFR2PHASE": "",
    "SPPATTERN2CENTCNFG": "",
    "HDMIVIDEOMODE": "Direct"
  },
  "online": {},
  "ZONE2": {
    "PWR": "Standby",
    "AVAIL": "Ready",
    "INP": "AV3",
    "MUTE": "Off",
    "VOL": "-40.0",
    "CONTENTSDISP": "Off"
  },
  "AIRPLAY": {
    "AVAIL": "Not Ready",
    "ALBUM": "",
    "ARTIST": "",
    "PLAYBACKINFO": "Stop",
    "SONG": "",
    "VOLINTERLOCK": "Limited"
  },
  "TUN": {
    "AVAIL": "Not Ready",
    "AMFREQ": "1080",
    "BAND": "FM",
    "FMFREQ": "94.10",
    "FMMODE": "Auto",
    "PRESET": "3",
    "RDSCLOCK": "",
    "RDSPRGSERVICE": "WDR2",
    "RDSPRGTYPE": "",
    "RDSTXTA": "",
    "RDSTXTB": "WDR 2",
    "SEARCHMODE": "Preset",
    "SIGSTEREOMONO": "Assert",
    "TUNED": "Assert"
  },
  "SERVER": {
    "AVAIL": "Not Ready",
    "ALBUM": "",
    "ARTIST": "",
    "LISTLAYER": "1",
    "LISTLAYERNAME": "Media Server",
    "LINE1TXT": "AVM FRITZ!Mediaserver",
    "LINE1ATRIB": "Container",
    "LINE2TXT": "192.168.1.80 - Sonos PLAY:1 Media Server",
    "LINE2ATRIB": "Container",
    "LINE3TXT": "192.168.1.74 - Sonos PLAY:1 Media Server",
    "LINE3ATRIB": "Container",
    "LINE4TXT": "192.168.1.33 - Sonos PLAY:1 Media Server",
    "LINE4ATRIB": "Container",
    "LINE5TXT": "192.168.1.75 - Sonos SUB Media Server",
    "LINE5ATRIB": "Container",
    "CURRLINE": "1",
    "MAXLINE": "8",
    "PLAYBACKINFO": "Stop",
    "REPEAT": "Off",
    "SHUFFLE": "Off",
    "SONG": ""
  },
  "NETRADIO": {
    "AVAIL": "Not Ready",
    "ALBUM": "",
    "LISTLAYER": "1",
    "LISTLAYERNAME": "NET RADIO",
    "LINE1TXT": "Lesezeichen",
    "LINE1ATRIB": "Container",
    "LINE2TXT": "Länder",
    "LINE2ATRIB": "Container",
    "LINE3TXT": "Musikrichtungen",
    "LINE3ATRIB": "Container",
    "LINE4TXT": "Neue Sender",
    "LINE4ATRIB": "Container",
    "LINE5TXT": "Populäre Sender",
    "LINE5ATRIB": "Container",
    "LINE6TXT": "Podcasts",
    "LINE6ATRIB": "Container",
    "LINE7TXT": "Hilfe",
    "LINE7ATRIB": "Container",
    "LINE8TXT": "",
    "LINE8ATRIB": "Unselectable",
    "CURRLINE": "1",
    "MAXLINE": "7",
    "PLAYBACKINFO": "Stop",
    "SONG": "",
    "STATION": ""
  },
  "SPOTIFY": {
    "AVAIL": "Not Ready",
    "ALBUM": "",
    "ARTIST": "",
    "PLAYBACKINFO": "Stop",
    "TRACK": ""
  },
  "ZONE3": {
    "PWR": "Standby",
    "AVAIL": "Ready",
    "INP": "AV1",
    "MUTE": "Off",
    "VOL": "-40.0"
  },
  "ZONE4": {
    "PWR": "Standby",
    "AVAIL": "Ready",
    "INP": "AV1"
  }
};