# node-red-contrib-musiccast

This collection can be used to monitor and control a Musiccast network.  Actions for device playback, input selection, volume adjustment, and more can all be easily configured. This collection is also usable with many non-Musiccast AV units from Yamaha as long as the device in question is compatible with the YXC API.

## General Concept

Designed to make control of a Musiccast system simple and straightforward.  To achieve that goal, there is no reliance on technologies such as UPNP and DLNA*. The collection does not "listen" for changes from devices. Instead, devices must be polled on a regular basis to determine their status.  An example flow is included to help demonstrates this process.

* While this collection does not directly interact with DLNA sources, the Musiccast devices do and will continue to work as designed.

## Quick Start

1. Install the package using "Manage palette" on the hamburger icon at top right. 
2. Again using the hamburger icon, select [Import] then [Examples].  Expand the [node-red-contrib-musiccast] entry. Select [Toggling States] and click [Import].  
3. Click [Deploy].
4. There will now be a demonstration flow on your palette showing basics of polling and controlling a system.

Feel free to tag the author shown below in the official Node-RED forums or email if any help is needed.  If sending email, be sure to include "node-red-contrib-musiccast" in the subject to ensure the spam filters don't block it.

## Release Notes

### 4.5.1

#### NEW FEATURES

- Added missing command "setSurroundDecoderType" to [zone] node.

#### FIXES

- [input] node editor pane will now display all available commands if the input selector is set to a variable.
- Help content updates.

### 4.5.1

#### NEW FEATURES

- None

#### FIXES

- UI tweaks
- NPM dependency updates

### 4.5.0

#### NEW FEATURES

- Palette status messages can now be automatically cleared after 30 seconds.  The setting is made on the config node and is applied to all nodes.
- Compatibility with Node-RED 4.x confirmed.
- 
#### FIXES

- Separated out certain functions that have different attribute configuration possibilities depending on input source.
- Updated NPM dependencies.

### 4.3.2

#### FIXES

- Updated dependencies.  Fixed packaging requirements to satisfy Node-RED audit requirements.  No changes in functionality.

### 4.3.0

#### NEW FEATURES

Added a few new commands to complete the set from the Yamaha API V2:

- requestNetworkReboot
- requestSystemReboot
- getAdvancedFeatures
- getRemoteInfo
- setAutoPlay
- setSpeakerPattern
- setPartyMode
- setHdmiOut3
- recallScene
- setActualVolume
- setContentsDisplay
- setAudioSelect
- controlCursor
- controlMenu
- setClearVoice
- getSettings  (netusb)
- movePreset
- startAutoPreset
- cancelAutoPreset
- startDabInitialScan
- cancelDabInitialScan
- setDabTuneAid
- setRepeat (cd)
- setShuffle (cd)
- getSettings (clock)
- setAutoSync (clock)
- setDateAndTime (clock)
- setClockFormat (clock)
- setAlarmSettings (clock)

- Added handling and documentation for additional response codes.
- Added response code documentation s to the config node inline help.

#### FIXES

- Help documentation clarifications.
- Updated inline Basic API doc to version 2.0.

#### KNOWN ISSUES
- Changes to devices or zones in the main Musiccast Configuration will not show in the configuration dialogs of other nodes until the changes are deployed.

### 4.2.4

#### FIXES

- Fixed a typo in the package version.  No other changes.


### 4.2.1

#### NEW FEATURES

- Added 3 undocumented commands to the [list] node to facilitate working with Musiccast playlists directly: "getMcPlaylistName", "getMcPlaylist", and "manageMcPlaylist".  Details are provided in the inline help.
 
Note: thanks goes out to SB for tracking these down!

#### FIXES

- Help documentation cleanup.


### 4.2.0

#### NEW FEATURES

- Any of the nodes can now work with the join/split functionality included with Node-RED. (msg.parts pass-through)

#### FIXES

- Updated dependencies to address a high priority security vulnerability. (xml2js)

### 4.1.0

#### NEW FEATURES

- Added new node [link] to use for establishing synchronized playback groups with common volume control.  The example "Link Group Creation" has been added to help get started.

#### FIXES

- Fixed major issue with API POST commands.
- Some UI formatting changes have been mde for clarity.
- 
#### KNOWN ISSUES

- Changes to devices or zones in the main Musiccast Configuration will not show in the configuration dialogs of other nodes until the changes are deployed. 
 
## Additional Resources

Basic contextual help is available in Node-RED itself. Links to official Yamaha API documents can be found there as well.

The following devices and platforms are used in testing:

- Node-RED version 2.2.2
- Yamaha Aventage RX-A2070 receiver
- Yamaha YXC-50 network streamer 
- Twonky Media Server 8.5.1 (DLNA/UPNP)
- Tidal music streaming service
- Various internet radio stations
- Music files on USB thumb-drive plugged into above receivers

Note: Due to time constraints, testing is not possible with all potential command and command attribute combinations.

## Authors

Created by:  Vahdettin [https://discourse.nodered.org/u/Vahdettin](https://discourse.nodered.org/u/Vahdettin) [vahdettin_in_beta@icloud.com](vahdettin_in_beta@icloud.com)

## Copyright and license

Copyright Vahdettin under [the Apache 2.0 license](LICENSE).
