npm-audac-r2-client

1.0.3 • Public • Published

Audac R2 client

This client is an adapter to the API provided by audac for the R2, as described by the R2 RS232 Command List.

Bear in mind that this adapter is not complete and only implements setting the volume en switching an input for a zone. Note that this software is only useful when seeking programmatic access to an R2 device via node.

Getting started

connect

The audac API does not require a password and listens by default on port 5001

var audac = require('npm-audac-r2-client').connect('192.168.1.11');
// or specify a port: .connect('192.168.1.11',5002);
 

volume

You can both listen to volume updates (e.g. comming from a DW3020/B wall panel) and set the volume.

audac.setVolume(7,50);

This example sets the volume in zone 7 to -50db

Listen for volume updates through node event emitters.

audac.on('volume',(zone, volume)=>{
    console.log('zone' + zone + 'volume '+volume);
});

input

audac.setInput(7,1);

This example sets the input of zone 7 to "input 1"

Listen for these updates as follows:

audac.on('routing',(zone, input)=>{
    console.log('zone' + zone + 'input '+input);
});

Readme

Keywords

Package Sidebar

Install

npm i npm-audac-r2-client

Weekly Downloads

0

Version

1.0.3

License

ISC

Last publish

Collaborators

  • stefaanternier