A node module to control your Yamaha MusicCast devices (inspired by yamaha-nodejs). This module uses the Yamaha Extended Control protocol. It should be possible to control loudspeakers, soundbars etc. Tested with WX-010 and YSP-1600.
- npm install yamaha-yxc-nodejs
- To power on the yamaha, network standby has to be enabled
var yamaha = new YamahaYXC("192.168.xxx.yyy")
var yamaha = new YamahaYXC() // Auto-Discovery
//-------------Zone related comands----------
yamaha.power(on, zone)
yamaha.powerOn(zone)
yamaha.powerOff(zone)
yamaha.sleep(val, zone)
yamaha.setVolumeTo(to, zone)
yamaha.mute(on, zone)
yamaha.muteOn(zone)
yamaha.muteOff(zone)
yamaha.setInput(input, zone, mode)
yamaha.setSound(input, zone)
yamaha.surround(on, zone)
yamaha.surroundOn(zone)
yamaha.surroundOff(zone)
yamaha.setDirect(on, zone)
yamaha.setPureDirect(on, zone)
yamaha.setEnhancer(on, zone)
yamaha.setClearVoice(on, zone)
yamaha.setBassTo(val, zone)
yamaha.setTrebleTo(val, zone)
yamaha.setEqualizer(low, mid, high, zone)
yamaha.setBalance(val, zone)
yamaha.setSubwooferVolumeTo(val, zone)
yamaha.setBassExtension(on, zone)
//get commands
yamaha.getSignalInfo(zone)
yamaha.getStatus(zone)
yamaha.getSoundProgramList(zone)
//------------ NetUSB commands --------------
yamaha.getPresetInfo()
yamaha.getSettings()
yamaha.getRecentInfo()
yamaha.clearRecentInfo()
yamaha.setNetPlayback(val)
yamaha.toggleNetRepeat()
yamaha.toggleNetShuffle()
yamaha.recallPreset(val, zone)
yamaha.stopNet()
yamaha.pauseNet()
yamaha.playNet()
yamaha.nextNet()
yamaha.prevNet()
yamaha.frwNet(state)
yamaha.ffwNet(state)
yamaha.getListInfo(input, index, size, lang)
yamaha.setListControl(listId, type, index, zone)
//------------ NetUSB + CD commands --------------
yamaha.getPlayInfo(val) //if empty the netusb is called, otherwise val must be set to "cd"
//------------ CD commands ------------
yamaha.setCDPlayback(val)
yamaha.toggleTray()
yamaha.toggleCDRepeat()
yamaha.toggleCDShuffle()
yamaha.stopCD()
yamaha.pauseCD()
yamaha.playCD()
yamaha.nextCD()
yamaha.prevCD()
yamaha.frwCD(state)
yamaha.ffwCD(state)
//-------------System commands------
yamaha.getDeviceInfo()
yamaha.getFeatures()
yamaha.getNetworkStatus()
yamaha.getFuncStatus()
yamaha.getNameText(zone)
yamaha.getLocationInfo()
yamaha.setAutoPowerStandby(state, zone)
yamaha.setHdmiOut1(state, zone)
yamaha.setHdmiOut2(state, zone)
//----------- advanced ------------
yamaha.setLinkControl(control, zone)
yamaha.setLinkAudioDelay(delay, zone)
yamaha.setLinkAudioQuality(mode, zone)
yamaha.getDistributionInfo()
yamaha.setServerInfo(data)
yamaha.setClientInfo(data)
yamaha.startDistribution(num)
yamaha.stopDistribution()
yamaha.setGroupName(name)
//----------- Tuner ------------
yamaha.getTunerPresetInfo(band)
yamaha.getTunerPlayInfo()
yamaha.setBand(band)
yamaha.setFreqDirect(band,freq)
yamaha.switchPresetTuner(direction)
yamaha.setDabService(direction)
//----------- Clock ------------
yamaha.getClockSettings()
yamaha.setClockAutoSync(state)
yamaha.setClockDateTime(YYMMDDhhmmss)
yamaha.setClockFormat(format)
yamaha.setAlarmSettings(data)
Some Parameter have to be determined first by calling a "get" method first. JSON array has to be formed before calling the method.
The zone parameter is optional, you can pass a number or a string
All these methods return a promise:
yamaha.powerOff().then(function(result){
console.log("Response is" + result);
});
If the IP is omitted in the constructor, the module will try to discover the yamaha ip via a SSDP call.
- change deprecated request to @root/request
- add advanced setLinkAudioQuality
- improvement for setInput, getListInfo, setListControl
- added mode to setInput
- added getListInfo, setListControl
- improvement in power/standby
- tuner commands added
- clock commands added
- subscribe for update when GET send
- getPlayInfo extended for getting CD-values
- new surround(on)
- deleted parameter Zone in some functions, hence not necessary
- discovery on YamahaExtendedControl instead Manufacturer=Yamaha, because not all devices respond to MusicCast
- new method power, mute
- bugfixes to getcommands for zones, readme etc.
- intitial version