- defaultCallback :
function
Function called when a command is run and data is returned.
Kind: global class
- MarantzDenonTelnet
- new MarantzDenonTelnet(ip)
- .parseSimpleResponse(data, regexp) ⇒
string
- .sendNextTelnetCueItem()
- .telnet(cmd, callback, waitfor)
- .cmd(cmd, callback)
- .getInput(callback, zone)
- .setInput(input, callback, zone)
- .getMuteState(callback, zone)
- .setMuteState(muteState, callback, zone)
- .getPowerState(callback)
- .setPowerState(powerState, callback)
- .getSmartSelect(callback, zone)
- .setSmartSelect(input, callback, zone)
- .storeSmartSelect(input, callback)
- .getVideoSelect(callback)
- .setVideoSelect(input, callback)
- .getVolume(callback, zone)
- .setVolume(volume, callback, zone)
- .getZones(callback)
- .getZonePowerState(callback, zone)
- .setZonePowerState(powerState, callback, zone)
Returns an instance of MarantzDenonTelnet that can handle telnet commands to the given IP.
Param | Type | Description |
---|---|---|
ip | string |
Address of the AVR. |
Search for the required information in returned data array, as they may contain additional and random data from EVENTs.
Kind: instance method of MarantzDenonTelnet
Returns: string
- found string or false
Param | Type | Description |
---|---|---|
data | Array |
Array of possible responses |
regexp | RegExp |
to test against |
Works thru Telnet cue.
Kind: instance method of MarantzDenonTelnet
Low level method to add a command to the Telnet cue.
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
cmd | string |
Telnet command |
callback | defaultCallback |
Function to be called when the command is run and data is returned |
waitfor | RegExp |
Wait for this regexp to fulfill instead of a timeout. |
Send raw Telnet codes to the AVR.
Kind: instance method of MarantzDenonTelnet
See: marantz Telnet Reference http://www.us.marantz.com/DocumentMaster/US/Marantz_FY16_AV_SR_NR_PROTOCOL_V01(2).xls
Param | Type | Description |
---|---|---|
cmd | string |
Telnet command |
callback | defaultCallback |
Function to be called when the command is run and data is returned |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.cmd('PW?', function(error, data) {console.log('Power is: ' + data);});
// Power is: [PWON,Z2ON,Z3ON|PWSTANDBY]
Get the currently selected input of a zone. Telnet Command examples: SI?, Z2SOURCE
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
callback | defaultCallback |
Function to be called when the command is run and data is returned. Will return one or more of: 'CD', 'SPOTIFY', 'CBL/SAT', 'DVD', 'BD', 'GAME', 'GAME2', 'AUX1', 'MPLAY', 'USB/IPOD', 'TUNER', 'NETWORK', 'TV', 'IRADIO', 'SAT/CBL', 'DOCK', 'IPOD', 'NET/USB', 'RHAPSODY', 'PANDORA', 'LASTFM', 'IRP', 'FAVORITES', 'SERVER' |
zone | string |
NULL or ZM for MAIN ZONE, Z2 ... Zn for all others |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.getInput(function(error, data) {console.log('INPUT of MAIN ZONE is: ' + JSON.stringify(data));}, 'ZM');
// INPUT of MAIN ZONE is: "MPLAY"
Select the input of a zone. Telnet Command examples: SIMPLAY, Z2MPLAY, Z3CD
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
input | string |
Supported values: 'CD', 'SPOTIFY', 'CBL/SAT', 'DVD', 'BD', 'GAME', 'GAME2', 'AUX1', 'MPLAY', 'USB/IPOD', 'TUNER', 'NETWORK', 'TV', 'IRADIO', 'SAT/CBL', 'DOCK', 'IPOD', 'NET/USB', 'RHAPSODY', 'PANDORA', 'LASTFM', 'IRP', 'FAVORITES', 'SERVER' |
callback | defaultCallback |
Function to be called when the command is run and data is returned |
zone | string |
NULL or ZM for MAIN ZONE, Z2 ... Zn for all others |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.setInput('MPLAY', function(error, data) {console.log('Set INPUT of MAIN ZONE to MPLAY.');});
// Set INPUT of MAIN ZONE to MPLAY.
Get the current mute state of a zone. Defaults MAIN ZONE, if no zone set. Telnet Command examples: SIMPLAY, Z2MPLAY, Z3CD
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
callback | defaultCallback |
Function to be called when the command is run and data is returned |
zone | string |
NULL or ZM for MAIN ZONE, Z2 ... Zn for all others |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.getMuteState(function(error, data) {console.log('MUTE state of ZONE2 is: ' + (data ? 'ON' : 'OFF'));}, 'Z2');
// MUTE state of ZONE2 is: [ON|OFF]
Set the mute state of a zone. Defaults MAIN ZONE, if no zone set. Telnet Command examples: MUON, MUOFF, Z2MUON, Z3MUOFF
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
muteState | boolean |
TRUE for muted |
callback | defaultCallback |
Function to be called when the command is run and data is returned |
zone | string |
NULL or ZM for MAIN ZONE, Z2 ... Zn for all others |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.setMuteState(true, function(error, data) {console.log('Set MUTE state of ZONE2 to ON.');}, 'Z2');
// Set MUTE state of ZONE2 to ON.
Get the current power state of the AVR. Telnet Command examples: PW?
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
callback | defaultCallback |
Function to be called when the command is run and data is returned |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.getPowerState(function(error, data) {console.log('POWER state of AVR is: ' + (data ? 'ON' : 'OFF'))});
// POWER state of AVR is: [ON|OFF]
Sets the power state of the AVR. Telnet Command examples: PWON, PWSTANDBY (threr is no PWOFF!)
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
powerState | boolean |
TRUE to power the AVR on |
callback | defaultCallback |
Function to be called when the command is run and data is returned |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.setPowerState(false, function(error, data) {console.log('Sent power off command to AVR.');});
// Set POWER state of AVR to ON.
Get the currently selected SMART SELECT of a zone. Telnet Command examples: MSSMART ?, Z2SMART ?
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
callback | defaultCallback |
Function to be called when the command is run and data is returned. |
zone | string |
NULL or ZM for MAIN ZONE, Z2 ... Zn for all others |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.getSmartSelect(function(error, data) {console.log('SMART SELECT is: ' + JSON.stringify(data));}, 'SMART');
// SMART SELECT is: "0"
Select the SMART SELECT of a zone. Telnet Command examples: SMART1, SMART2
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
input | number |
Supported values: 1 ... 5 |
callback | defaultCallback |
Function to be called when the command is run and data is returned |
zone | string |
NULL or ZM for MAIN ZONE, Z2 ... Zn for all others |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.setSmartSelect(1, function(error, data) {console.log('Set SMART SELECT of MAIN ZONE to 1.');});
// Set SMART SELECT of MAIN ZONE to 1.
Store current setup to SMART SELECT of a zone. Telnet Command examples: SMART1 MEMORY, SMART2 MEMORY
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
input | number |
Supported values: 1 ... 5 |
callback | defaultCallback |
Function to be called when the command is run and data is returned |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.storeSmartSelect(1, function(error, data) {console.log('Store current settings to SMART SELECT of MAIN ZONE.');});
// Store current settings to SMART SELECT of MAIN ZONE.
Get the currently selected video source. Telnet Command examples: SV?
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
callback | defaultCallback |
Function to be called when the command is run and data is returned. Will return one or more of: 'DVD', 'BD', 'TV', 'SAT/CBL', 'MPLAY', 'GAME', 'AUX1', 'AUX2', 'AUX3', 'AUX4' 'AUX5', 'AUX6', 'AUX7', 'CD', 'SOURCE', 'ON', 'OFF' |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.getVideoSelect(function(error, data) {console.log('VIDEO SELECT of MAIN ZONE is: ' + JSON.stringify(data));}, 'ZM');
// VIDEO SELECT is: "OFF"
Select the video source. Telnet Command examples: SVBD, SVDVD, SVCD
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
input | string |
Supported values: 'DVD', 'BD', 'TV', 'SAT/CBL', 'MPLAY', 'GAME', 'AUX1', 'AUX2', 'AUX3', 'AUX4', 'AUX5', 'AUX6', 'AUX7', 'CD', 'SOURCE', 'ON', 'OFF' |
callback | defaultCallback |
Function to be called when the command is run and data is returned |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.setVideoSelect('MPLAY', function(error, data) {console.log('Set VIDEO SELECT of MAIN ZONE to MPLAY.');});
// Set VIDEO SELECT to MPLAY.
Get the current volume of a zone. There is no MAIN ZONE Volue, its handled by the Mastervolume (MV) Telnet Command examples: MV10, Z215
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
callback | defaultCallback |
Function to be called when the command is run and data is returned |
zone | string |
NULL or ZM for MAIN ZONE, Z2 ... Zn for all others |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.getVolume(function(error, data) {console.log('VOLUME of MAIN ZONE is: ' + data);}, 'ZM');
// VOLUME of MAIN ZONE is: [0-100]
Set the playback volume of a zone. There is no MAIN ZONE Volue, its handled by the Mastervolume (MV) Telnet Command examples: MV20, Z230, Z340
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
volume | number |
0-100 |
callback | defaultCallback |
Function to be called when the command is run and data is returned |
zone | string |
NULL or ZM for MAIN ZONE, Z2 ... Zn for all others |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.setVolume(30, function(error, data) {console.log('Set VOLUME of MAIN ZONE to 30.');}, 'ZM');
// Set VOLUME of MAIN ZONE to 30.
Get all supported zones of the AVR.
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
callback | defaultCallback |
Function to be called when the command is run and data is returned |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.getZones(function(error, data) {console.log('Available Zones: ' + JSON.stringify(data));});
// Available Zones: {"ZM":"MAIN ZONE","Z2":"ZONE2","Z3":"ZONE3"}
Returns the current power state of a zone. Telnet Command examples: PW?, Z2?, Z3?
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
callback | defaultCallback |
Function to be called when the command is run and data is returned |
zone | string |
NULL or ZM for MAIN ZONE, Z2 ... Zn for all others |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.getZonePowerState(function(error, data) {console.log('POWER state of ZONE3 is: ' + (data ? 'ON' : 'OFF'));}, 'Z3');
// POWER state of ZONE3 is: [ON|OFF]
Sets the power state of a zone. Telnet Command examples: PWON, PWSTANDBY, Z2ON, Z3OFF
Kind: instance method of MarantzDenonTelnet
Param | Type | Description |
---|---|---|
powerState | boolean |
TRUE to power on |
callback | defaultCallback |
Function to be called when the command is run and data is returned |
zone | string |
NULL or ZM for MAIN ZONE, Z2 ... Zn for all others |
Example
var mdt = new MarantzDenonTelnet('127.0.0.1');
mdt.setZonePowerState(false, function(error, data) {console.log('Set POWER state of ZONE3 to OFF.');}, 'Z3');
// Set POWER state of ZONE3 to OFF.
Function called when a command is run and data is returned.
Kind: global typedef
Param | Type | Description |
---|---|---|
error | Error |
NULL or Error object, if command failed |
data | null | Object | Array | string | boolean |
Array with returned data or NULL if command failed |