Roon Extension: AyreLink RS232 Control v1.0.0

Hello, everyone –

I’m pretty excited to share this extension with you all! This is intended for owners of Ayre KX-5 and KX-R preamplifiers who wish to control volume levels and mute status through Roon. Whether you’re using an Ayre DAC over RAAT, want to use your Ayre DAC over USB, or are using an Ayre preamp with another DAC, this is the most feature-complete way to control volume in the analog domain through the Roon interface.

Hardware Requirements
In order to use the extension, you’ll need to have the proper hardware. I’ve tested the extension on the latest versions of macOS and Windows 10 using the Sabrent CB-FTDI USB-RS232 interface. The Sabrent cable is about $14 on Amazon, and the FTDI chip is widely recognized as the best. For information on connecting to AyreLink via RS232, I suggest you contact the guys at Ayre directly, who can advise you on the technicalities. They do sell a little interface box that keeps the RS232 interface electrically isolated from the AyreLink system.

Software Requirements and Installation
If you haven’t before, first install the latest LTS release (14.17.0) of Node.js for your platform: Download Node.js

Then, snag the files from here:
Download AyreLink Extension

Put all the extension’s files in a convenient folder. Run a Terminal (mac) or PowerShell (windows), and switch to the path of this folder. Once in the folder, run:

npm install .
node .

To download all the supporting modules and start the extension. You’ll need to keep the terminal window open for the extension to run. If you restart your computer, you’ll need to re-run the extension (though it will remember its settings from session to session).

Once the extension is running, you’ll need to find it under the “Extensions” section of Roon’s settings. Choose a valid serial port and the correct model of your Ayre product. This will ensure that the volume range provided to Roon is correct. Save your settings.

Then, go to “Device Setup” for the DAC or USB output that you’re using. Under “Volume Control”, there will be an option to select the AyreLink Extension. Select this and save your settings. You should be all set.

To Do
The extension is built around a library that already has some source control functionality, and I could add a convenience input switch to the extension if there’s a need in the community.

Please note: I’m not an experienced programmer. I learned JavaScript from scratch in order to get this done over the last week or two, so I’d be happy to get any feedback on potential bugs, code optimization, or blatant mistakes. I will say that the extension works pretty reliably for me.

PS: Many thanks to @danny for the Meridian and Devialet code, which gave me the templates to start from. Also to @Jan_Koudijs and @ben for enumerating the elements and parameters for the Settings layout.