Linn Crestron Module

From LinnDocs
Revision as of 09:29, 31 March 2015 by Hahnj21 (talk | contribs) (Contents)
Jump to: navigation, search

Overview

The Linn Crestron module allows a Linn system to be easily added into a Crestron installation. It provides all basic functionality required for using your Linn DS or DSM. The module makes use of the LPEC protocol to allow your Linn device to communicate with a Crestron system.

Full source code for this module has been released and can be used as is or modified to suit any given installation.

The module was developed using a Crestron CP3 processor and will require that or better to function.

Sample Crestron Application: Basic Functionality

Basic Functionality (Main room)

All core control functions are available for the main room:

Sample Crestron Application: Track Selection
  • Standby
  • Volume and mute
  • Source selection
  • Playback commands (play, pause, stop, skip, seek, repeat, shuffle)
  • Track selection from existing playlist
  • Radio selection from preset list (as well as radio next and previous)


All core feedback is provided as well:

  • Album art
  • Track metadata
  • Track details
  • Time
  • Playback state
  • All other states (i.e. volume, mute, standby)

Multi-room

The module also provides multi-room control for a configurable number of other rooms in the house.

  • Select another room to listen to using Songcast.
  • Change volume, mute and standby on all Linn devices from one place.
  • Toggle which Linn device is the main room for further control.
  • Tested with a six room installation but more can be added.

Sample Crestron Application: Multi-room Control

Kazoo Integration

  • For more complicated operations (i.e. playlist creation), the module provides integration with Kazoo.
  • It allows Kazoo to be opened directly to the selected room and view (i.e. music, radio, songcast, external inputs).
  • It also provides an option to open Kazoo in Tidal browse mode as well.
  • Kazoo is opened with a button in the top left to quickly return to Crestron.
  • The module also provides the ability to open the Linn device's configuration page in a web browser or jump directly to the TuneIn website for radio preset configuration.

Sample Crestron Application: Kazoo Integration

Download

Location

http://products.linn.co.uk/VersionInfo/Downloads/Releases/LinnCrestronModule_latest.zip

Contents

CrestronStudioProgram

A complete Crestron Studio project demonstrating the Linn Crestron module.

This project includes a CP3 processor, 6 rooms and a sample iPad control application (which can toggle control between the 6 rooms).

The rooms will need to have static IP addresses allocated to them (normally using a network router) and entered in the system setup.

SimplWindowsProgram

A complete Simpl Windows project demonstrating the Linn Crestron module.

This project includes a CP3 processor, 6 rooms and a sample iPad control application (which can toggle control between the 6 rooms, created in Vt-Pro-e).

The rooms will need to have static IP addresses allocated to them (normally using a network router) and entered in the system setup.

LinnSimplPlusModule

  • LinnSimplPlusModule.usp/ush: the Simpl+ program used for the Linn DS module.
  • ExternalUrlSelector.usp/ush: small helper program for jumping to various Kazoo urls.
  • LinnSimplSharpModule.clz: compiled Simpl# code required by the Simpl+ program.

LinnSimplSharpModule

Includes a complete Visual Studio solution for the Simpl# side of the Linn solution.

  • Lpec.cs: handles the bulk of the Lpec processing required for the Linn module.

Release Notes

4.1.3 (Released 31 Mar 2015)

  • Added a Simpl Windows demo program.
  • Added a VT Pro-e example GUI for demonstrating the full range of functionality.
  • Added a Simpl module that wraps the Simpl+ module.
  • Fixed bug in main processing loop that was causing CPU usage to go very high.
  • Fixed bug where source count and source index with an RS232 connected preamp could become out of sync.

4.1.2 (Released 27 Jan 2015)

  • Fixed bug on opening Kazoo from Crestron module when the selected room contains spaces in the room name.

4.1.1 (Released 26 Jan 2015)

  • Initial release of the Linn Crestron Module.
  • Includes support for all Linn products including DS and DSM at Davaar level.
  • Also handles connections with legacy preamp devices (i.e. Klimax Kontrol, Akurate Kontrol, etc).
  • Includes multi-room support (tested with 6 rooms but can handle more).
  • Includes Kazoo URL integration (jump to Kazoo which will present a back to Crestron button).

Getting Started

The demonstration programs using your preferred Crestron development environment (Crestron Studio or Simpl Windows/VT Pro-e) is the best way to see what the module is capable of and to help you get up and running with it.

Basic Setup

To get you started, each Linn DS or DSM in an installation needs a corresponding TCP/IP Client device to represent it – you must supply the static IP address of the DS/M (this must be allocated, normally using a network router).

The device then needs to be connected as per the image below. The signal names correspond to the signal names in the Linn module.

Connection

TCP/IP Client		Linn Simpl Plus Module		Type
-------------    	----------------------------	------
Connect                 doConnect                       DIGITAL_OUTPUT
TX$			soLpecTxRoom[1]		        STRING_OUTPUT
Connect-F		diConnectedRoom[1]		DIGITAL_INPUT 
status		 	                                N/C
RX$		 	biLpecRxRoom[1]		        BUFFER_INPUT

You should no longer need to worry about the LPEC command format (i.e. ACTION Ds/Volume...) as the module handles this for you. To establish volume control, you would just need to use the following from the Linn simpl plus module:

aiVolume: supply an integer value to set the volume on the DS (ANALOG_INPUT)
aoVolume: provides feedback from the DS as to its current volume (ANALOG_OUTPUT)

Simpl+ Constants

#DEFINE_CONSTANT ciROOMCOUNT 6 // number of rooms for module (including main room)
#DEFINE_CONSTANT ciMAINROOMINITIAL 1 // main room number (will boot to this initially)
#DEFINE_CONSTANT ciMAXSOURCES 50 // can be decreased as required
#DEFINE_CONSTANT ciMAXCHANNELS 100 // radio stations/presets referred to as channels
#DEFINE_CONSTANT ciMAXTRACKS 1000 // playlist
#DEFINE_CONSTANT ciSEEKSECONDS 20 // number of seconds to jump for each seek button press
#DEFINE_CONSTANT ciUSEVISIBLESOURCESONLY ciTRUE // true: use only configured visible sources
                                                // false: always use all sources

Signal Descriptions

Digital Inputs

MAIN ROOM

  • diStandbyToggle - toggle the standby state of the main room
  • diStandbyOn - put main room into standby
  • diStandbyOff - bring main room out of standby
  • diVolumeInc - increment volume of main room by 1dB
  • diVolumeDec - decrement volume of main room by 1dB
  • diMuteToggle - toggle the mute state of the main room
  • diMuteOn - mute the main room
  • diMuteOff - umute the main room
  • diPlay - start playback in the main room
  • diPause - pause playback in the main room
  • diStop - stop playback in the main room
  • diNext - select the next track/channel in the main room
  • diPrev - select the previous track/channel in the main room
  • diFwd - seek forward on the current track/channel by ciSEEKSECONDS
  • diRew - seek backward on the current track/channel by ciSEEKSECONDS
  • diShuffleToggle - toggle the shuffle state of the main room
  • diShuffleOn - put main room into shuffle mode
  • diShuffleOff - bring main room out of shuffle mode
  • diRepeatToggle - toggle the repeat state of the main room
  • diRepeatOn - put main room into repeat mode
  • diRepeatOff - bring main room out of repeat mode
  • diTimeModeToggle - toggle the time output mode between elapsed and remaining (see soTime)
  • diRefresh - refresh the current state of all signals (performs and disconnect then reconnect)

MULTI-ROOM

  • diConnectedRoom[ciROOMCOUNT] - connect to the TCP/IP Connect-F signal for the given room
  • diListenToRoom[ciROOMCOUNT] - select the given room that the main room will lsiten to (Songcast)
  • diVolumeIncRoom[ciROOMCOUNT] - increment volume of the given room by 1dB
  • diVolumeDecRoom[ciROOMCOUNT] - decrement volume of the given room by 1dB
  • diMuteToggleRoom[ciROOMCOUNT] - toggle the mute state of the given room
  • diMuteOnRoom[ciROOMCOUNT] - mute the given room
  • diMuteOffRoom[ciROOMCOUNT] - umute the given room
  • diStandbyToggleRoom[ciROOMCOUNT] - toggle the standby state of the given room
  • diStandbyOnRoom[ciROOMCOUNT] - put the given room into standby
  • diStandbyOffRoom[ciROOMCOUNT] - bring the given room out of standby
  • diRoomSwapRoom[ciROOMCOUNT] - make the given room the main room

Analog Inputs

MAIN ROOM

  • aiVolume - set the volume level of the main room (0 to 100, 1dB steps)
  • aiSource - select the given source index in the main room (0 to ciMAXSOURCES)
  • aiChannel - select the given channel index in the main room (0 to ciMAXCHANNELS)
  • aiTrack - select the given track index in the main room (0 to ciMAXTRACKS)
  • aiSeconds - seek to the given second in current track

MULTI-ROOM

  • aiVolumeRoom[ciROOMCOUNT] - set the volume level of the given room (0 to 100, 1dB steps)

Buffer Inputs

MULTI-ROOM biLpecRxRoom[ciROOMCOUNT] - connect to the TCP/IP RX$ signal for the given room

Digital Outputs

MAIN ROOM

  • doMute - the mute state of the main room
  • doStandby - the standby state of the main room
  • doShuffle - the shuffle state of the main room
  • doRepeat - the repeat state of the main room
  • doRadioSourceSelected - flag for radio source being selected in the main room
  • doPlaylistSourceSelected - flag for playlist source being selected in the main room
  • doSongcastSourceSelected - flag for songcast source being selected in the main room
  • doIsPlayable - flag to determine if play function is currently available
  • doIsSeekable - flag to determine if time seek functions are currently available
  • doIsSkippable - flag to determine if skip (next/previous) functions are currently available
  • doHasVolume - flag to determine if volume functions are currently available for the main room
  • doHasProxyPreamp - flag to determine if a separate preamp device is connected over RS232 as a proxy device.
  • doConnect - connect to the TCP/IP Connect signal for each room

MULTI-ROOM

  • doRoomSelected[ciROOMCOUNT] - flag to determine if the given room is currently selected as the main room
NOTE: main room can not select itself to listen to as a Songcast sender
  • doRoomAvailableAsSongcastSender[ciRoomCount] - flag to determine if the given room can be listened to as a Songcast sender
NOTE: will always be false for preamp only devices
  • doRoomSelectable[ciRoomCount] - flag to determine if the given room is available to be selected as the main room
NOTE: device powered on and not already selected as the main room
  • doMuteRoom[ciROOMCOUNT] - the mute state of the given room
  • doHasVolumeRoom[ciROOMCOUNT] - flag to determine if volume functions are currently available for the given room
  • doStandbyRoom[ciROOMCOUNT] - the standby state of the given room

Analog Outputs

MAIN ROOM

  • aoVolume - the volume level of the main room
  • aoSourceCount - the number of sources available in the main room
  • aoSourceIndex - the currently selected source index in the main room
  • aoSourceIndexDeselect - the source index in the main room that is no longer selected (for use with a source list if the source has been changed using another control mechanism)
  • aoChannelCount - the number of Radio channels (presets) available in the main room
  • aoChannelIndex - the currently selected channel index in the main room
  • aoChannelIndexDeselect - the channel index in the main room that is no longer selected (for use with a channel list if the channel has been changed using another control mechanism)
  • aoTrackCount - the number of tracks available in the main room
  • aoTrackIndex - the currently selected track index in the main room
  • aoTrackIndexDeselect - the track index in the main room that is no longer selected (for use with a track list if the track has been changed using another control mechanism)
  • aoDuration - the length in time (in seconds) of the current track in the main room
  • aoSeconds - the current time (in seconds) of the current track in the main room

MULTI-ROOM

  • aoVolumeRoom[ciROOMCOUNT] - the volume level of the given room

String Outputs

MAIN ROOM

  • soCurrentSource - the name of the current source in the main room
  • soCurrentSender - the name of the current songcast sender the main room is listening to
  • soTime - the time of the current track in the main room as a string ('0:00:00')
  • soVolume - the volume level in the main room as a string
  • soRoomName - the user configured name of the main room
  • soArtworkUrl - the URL of the artwork for the current track in the main room
  • soComposer - the composer of the current track in the main room
  • soTitle - the title of the current track in the main room
  • soArtist - the artist of the current track in the main room
  • soArtistAndComposer - the artist and composer of the current track in the main room
NOTE: format is 'Artist Name (composed by: Composer Name)'
NOTE: if no composer listed, format is 'Artist Name'
  • soAlbum - the album of the current track in the main room
  • soDetails - the details of the current track in the main room (i.e. 'FLAC 96 kHz / 24 bits 4609 kbps')
  • soTransportState - the current transport state of the main room (playing/paused/stopped/wiating/buffering)
  • soConfigurationUrl - the URL used to open the configuration page of the main room
  • soConfigurationUrlProxy - the URL used to open the configuration page of the optional proxy preamp connected to the main room over RS232
  • soKazooUrl - the URL used to open Kazoo in source mode
NOTE: will open Kazoo with the selected main room as the focus device
NOTE: will open Kazoo to the source view of the current source selected in the main room (playlist/radio/songcast/inputs)
NOTE: will open Kazoo with a 'Crestron' button in the top left corner to jump back quickly to the native Crestron app
  • soKazooTidalUrl - the URL used to open Kazoo in Tidal mode
NOTE: will open Kazoo with the selected main room as the focus device
NOTE: will open Kazoo to the Tidal browse/search view
NOTE: will open Kazoo with a 'Crestron' button in the top left corner to jump back quickly to the native Crestron app
  • soTuneInUrl - the URL to open the TuneIn website to setup radio presets

MULTI-ROOM

  • soLpecTxRoom[ciROOMCOUNT] - connect to the TCP/IP TX$ signal for the given room
  • soVolumeRoom[ciROOMCOUNT] - the volume level in the given room as a string
  • soRoomNameRoom[ciROOMCOUNT] - the user configured name of the given room
  • soCurrentSourceRoom[ciROOMCOUNT] - the name of the current source in the given room
  • soSourceName[ciMAXSOURCES] - the list of source names by source index room for creating a selectable list of sources for the main room
  • soChannelName[ciMAXCHANNELS] - the list of channel names by channel index for creating a selectable list of radio channels (aka presets) for the main room
NOTE: format is '1. Linn Radio (Eclectic)'
  • soTrackName[ciMAXTRACKS] - the list of track names by track index room for creating a selectable list of tracksfor the main room
NOTE: format is '1. Marooned Pink Floyd - The Division Bell'