[PLUGIN] SerialAmpController - Control Amplifiers with Serial Interface from Volumio (e.g. ROTEL A12/A11/A14)

Just finished testing a new plugin I wrote for controlling my ROTEL A12 amplifier with built in DAC.
The amp is connected to Volumio on a RaspberryPi 3 with HifiBerry Digi Hat via optical SP/DIF. Since the optical connection does not allow volume control from Volumio, I bought a cheap USB-to-RS232 converter based on Prolific PL2303.
The plugin allows to control volume and mute from the Volumio GUI and supports some additional features like:

  • defining max volume
  • defining startup volume
  • map to 100
  • pausing and resuming when amp is muted
  • pausing and resuming when input source of amp is changed
  • switching to the correct source when play is pressed on volumio

The configuration of the serial interface and the commands to send to the amps are stored in a json file that can easily be extended to support other models and brands.
I already added ROTEL A14 and A11 (since the documentation was available) but could not test them directly, since I only have A12 (I did some simulation with the A12, however).

I tried to make the implementation in such a way, that it hopefully works with other amplifiers easily - however, expect some need for debugging and testing, when you try to extend it. I’ll try to offer support here, but my time for that is quite limited.

Links to Github and info summary can be found on the Volumio Plugins Collection Topic

Bugreports:
In case you want to file a bugreport or ask for help, please include:

  • Hardware you are using
  • Volumio version
  • Plugin Version
  • Peripheral hardware info (Serial interface device used)
  • Logfile showing complete use example with the bug (see step-by-step instructions below)
    • Start of the plugin
    • The sequence of use that produces the problem
    • Stop of the plugin
How to generate a log
  1. Acitvate logging in the Plugin's settings by going to the 'Debug settings' section and setting 'Logging' to 'On'. Don't forget to save
  2. Create a log-file by either of these methods:
    1. via Browser
      1. Go to the Volumio developer settings and 'enable' the 'Live Log'
      2. Go to the 'Installed Plugins' page in Volumio
      3. Switch the Plugin 'off' - wait a few seconds - switch it 'on' again
      4. Now do whatever you normally do to produce the error
      5. After the error happened, switch the plugin 'off' again
      6. Go back to the developer settings, disable the Live Log and copy the log out of the window.
      7. Put the log into a text file and attach it to a post in this thread or post it directly - but please make sure, you enclose it in three accent characters before and after the log code like this:
        ```
        log text
        ```
        It will then be rendered as source code which makes it more readable and prevents, that this thread gets cluttered with long posts of gibberish.
    2. via SSH:
      1. Log into your Volumio system using SSH, if you do not know how, Google is your friend
      2. At the prompt volumio@volumio:$ enter journalctl -f. This will start the logging to the terminal you are using.
      3. Follow steps ii. - v. under a. (plugin on - produce error - plugin off)
      4. In your Terminal, hit Ctrl-C to stop the logging
      5. Copy the log out of the terminal and send it like describe in step vii. under a.
Example of a plugin startup-log
Starting Live Log...
[...]
info: Enabling plugin serialampcontroller
info: Loading plugin "serialampcontroller"...
info: Applying required configuration parameters for plugin serialampcontroller
info: Applying required configuration parameters for plugin serialampcontroller
info: PLUGIN START: serialampcontroller
info: [SERIALAMPCONTROLLER] loadI18nStrings: /data/plugins/system_hardware/serialampcontroller/i18n/strings_de.json
info: [SERIALAMPCONTROLLER] loadI18nStrings: loaded: {"[...list of language strings...]"}
info: [SERIALAMPCONTROLLER] loadAmpDefinitions: loaded AmpDefinitions: {[...content of amp definition file...]},"filePath":"/data/configuration/system_hardware/serialampcontroller/ampCommands.json"}
info: [SERIALAMPCONTROLLER] loadAmpDefinitions: loaded AmpDefinitions for 5 Amplifiers.

info: CoreCommandRouter::volumioGetState
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: [SERIALAMPCONTROLLER] listSerialDevices: [{“path”:"/dev/ttyAMA0"},{“manufacturer”:“Prolific Technology Inc. “,“pnpId”:“usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0”,“vendorId”:“067b”,“productId”:“2303”,“path”:”/dev/ttyUSB0”}]
info: [SERIALAMPCONTROLLER] listSerialDevices: found 1 devices.[{"[…list of devices found on your system…"}]
info: [SERIALAMPCONTROLLER] setActiveAmp: {…settings of active amp…}
info: [SERIALAMPCONTROLLER] setActiveAmp: can send these responses: […]
info: [SERIALAMPCONTROLLER] openSerialPort: connect to /dev/ttyUSB0 configured with: {“autoOpen”:false,“lock”:true,“baudRate”:115200,“dataBits”:8,“stopBits”:1,“parity”:“none”,“rtscts”:false,“xon”:false,“xoff”:false,“xany”:false}
info: [SERIALAMPCONTROLLER] openSerialPort: Connection established.
error: [SERIALAMPCONTROLLER] openSerialPort: Now trying to open port
info: [SERIALAMPCONTROLLER] alsavolume: Set volume “25”
info: [SERIALAMPCONTROLLER] alsavolume: either Serial Interface, listener or Ampconfig missing
info: [SERIALAMPCONTROLLER] updateVolumeSettings: Amp, serial Interface not yet set or listener not yet active.
info: [SERIALAMPCONTROLLER] onStart: successfully started plugin
info: Done.
info: [SERIALAMPCONTROLLER] openSerialPort: Port is now open. Connecting Parser with delimiter: $
info: [SERIALAMPCONTROLLER] getAmpStatus: sending status requests to Amp
info: [SERIALAMPCONTROLLER] sendStatusRequest: Sent command for “reqModel”: model?
info: [SERIALAMPCONTROLLER] sendStatusRequest: Sent command for “reqPower”: power?
info: [SERIALAMPCONTROLLER] sendStatusRequest: Sent command for “reqVolume”: volume?
info: [SERIALAMPCONTROLLER] sendStatusRequest: Sent command for “reqMute”: mute?
info: [SERIALAMPCONTROLLER] sendStatusRequest: Sent command for “reqSource”: source?
info: [SERIALAMPCONTROLLER] openSerialPort: Listener received: model=a12
info: [SERIALAMPCONTROLLER] openSerialPort: no matching regex for: model=a12
info: [SERIALAMPCONTROLLER] openSerialPort: Listener received: power=on
info: [SERIALAMPCONTROLLER] openSerialPort: call processResponse with: respPowerOn
info: [SERIALAMPCONTROLLER] processResponse: Amp signaled PowerOn
info: [SERIALAMPCONTROLLER] alsavolume: Set volume “25”
info: [SERIALAMPCONTROLLER] alsavolume: set volume to integer value.
info: [SERIALAMPCONTROLLER] sendCommand: send volValue,25
info: [SERIALAMPCONTROLLER] sendCommand: now sending cmdString: vol_25!
info: [SERIALAMPCONTROLLER] processResponse: Amp Status is now {“volume”:25,“mute”:false,“power”:“on”}
info: [SERIALAMPCONTROLLER] sendCommand: sent cmdString: vol_25!
info: [SERIALAMPCONTROLLER] openSerialPort: Listener received: volume=25
info: [SERIALAMPCONTROLLER] openSerialPort: call processResponse with: respVolume
info: [SERIALAMPCONTROLLER] processResponse: Amp signaled volume is 25
info: [SERIALAMPCONTROLLER] getVolumeObject: {“vol”:25,“mute”:false,“disableVolumeControl”:false}

Low level function check of serial interface
  • Disable the plugin. To be sure the interface is responsive, disconnect the RS232 interface from the system, wait a second and plug it back in.
  • Use
    ssh
    to connect to your Volumio system via terminal
  • Issue the command
    stty -F /dev/ttyUSB0 115200 raw -echo -echoe -echok -echoctl -echoke
    to configure your interface. You may need to replace
    /dev/ttyUSB0
    with the path to your interface and put the right Baudrate of your amp instead of the 115200.
  • Issue
    cat /dev/ttyUSB0
    . This will echo all data received from the amp on the terminal prompt.
  • Now do something with the user controls of the amp. Turn the volume dial, switch inputs or whatever else is supported by the serial interface. You should see messages from the amp being echoed.
  • If not, there is something wrong at the base of the connection. This needs to be fixed before the plugin can work.

Well done on the plugin. :slight_smile:

Would you mind please adding a single post to the Volumio Plugin Collections summarising your plugin details, and allowing people to easily find while browsing plugins? You can also put a link there to this post, which can act as a focus for feedback and questions.

Sorry - I remembered I had to do a post somewhere, but because I accidentally unpinned the “Volumio Plugins Collection” I did not see it and thought that I had to post directly into the channel with the [PLUGIN] prefix.
Did my duty now and also opened the PR again, after fixing a bug.
And most important - pinned the topic again.
Thanks for the nudge…

Hi, I’m trying to use your plugin with my rotel RC 1570, any raccomendations?

Hi Narsete, welcome to the forum.
Had a very brief look at the spec of your amp.
The commands look pretty similar, should be easy to implement. Might even work out of the box.
Will have a closer look on the weekend.
Do you already have the serial connection to Volumio?
Regards, Thomas

Hello T0MR0 and thanks for your work and reply!

I have a prolific usb cable

But it does not seem to work actually… or maybe I didn’t understand well.

When I move the volume control on volumio, should it move the volume values on the amp display too?

Hi,

I just found 30 minutes to update. Already uploaded to the beta channel - try to download version 2.0.4 from there.

After selecting the Serial interface press “Save”. Then select the RC-1570 from the Amp model drop-down. Save again and then set the remaining parameters.

If you are lucky, it will work right out of the box.

The commands are slightly different and there are some responses from the amp that are ambiguous (was not like this on the A12). I hope the plugin will just ignore this and not act strange, did not have time to go through the code in detail.
Another difference is the delimiter character that is used after the amp sends status information. In the Axx models, it is “$”. For your amp it is “!”. I changed it in the ampCommands.json file, I am not 100% sure it will work right away. Also hope, that it is not a typo in the Rotel Documentation, otherwise the plugin cannot interpret the responses.

If it is working, please report back because I still need positive feedback to get the plugin released to the official plugin store and Rotel Amps are not that widely used in the community.
In case it is not working, please come back with more information. I will then probably need to ask you to log into your system via SSH. Regards!

Important
I tried this morning on my system: You need to uninstall the plugin and re-install it. If you just update the plugin, the ampCommands.json file does not get updated.

1 Like

Hello again, will test new features and report them back to you asap.
Only problem is that I had to format my raspberry sd and in volumio fresh installation I do not find your plugin listed, while in the former installation it appeared under “search plugins”; guess I’ll have to learn how to SSH anyway.

Just want to tell you that I am available to help you in your work in any wai possible, so if you want to write me directily you can find me at marco@bernardini.biz

thx again
M

So far, the plug-in is only in the beta channel.
To see it, you need to go to http://volumio.local/dev and set „Plugins test mode“ to true

Ok! G8
Done it, plug in installed, sat options as follows but it is not working…

Btw rc-1570 volume goes from 0 (displays MIN) to 95 (displays MAX). But when I move volume slider on volumio it doesn’t affect my preamp. Maybe my cable is not working?!

Hi, hard to say… we need more info now. Your settings look reasonable but the communication may be different than for the Rotel A-Series.
To help you remotely I need a logfile.
I wrote instructions on how to generate one and attached them at the end of the first post on this page.
Please make such a log and do the following while the log is written:
Turn the volume on the amp and switch the input so I can see, how the amp sends volume an input information.
Also try to change the volume from Volumio. Send me a log and describe in which order you did things.

Ok, log done, here is it:

Starting Live Log…
process exited with code nullinfo: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: CALLMETHOD: system_controller system enableLiveLog true
info: CoreCommandRouter::executeOnPlugin: system , enableLiveLog
info: Launching a new LiveLog session
info: CALLMETHOD: system_controller system enableLiveLog true
info: CoreCommandRouter::executeOnPlugin: system , enableLiveLog
info: Launching a new LiveLog session
info: Killing previous LiveLog session
info: Live Log process terminated: null
info: VolumeController::SetAlsaVolume35
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume30
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume25
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume15
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume20
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume40
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume50
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume60
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume55
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume30
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume15
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume20
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume40
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume50
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume60
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume55
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume30
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume15
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume20
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume45
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume55
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume50
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume35
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume15
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume50
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume40
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume25
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume15
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume5
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolumemute
Unable to parse:
Simple mixer control ‘PCM’,0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
error: Cannot get ALSA Volume: Error: Alsa Mixer Error: failed to parse output
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
error: Cannot set mute ALSA: Error: Alsa Mixer Error: xcb_connection_has_error() returned true
amixer: Invalid command!
info: VolumeController::SetAlsaVolume20
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: VolumeController::SetAlsaVolume35
info: CoreStateMachine::pushState
info: CorePlayQueue::getTrack 8
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: MRS: Pushing multiroomSync output update for this device
info: MRS: Pushing multiroomSync output
info: CoreCommandRouter::volumioGetQueue
info: CoreStateMachine::getQueue
info: CorePlayQueue::getQueue
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause

I’ve changed the amp input few times, turned volume up and down and then, in Volumio, turned volume up and down

hope this helps

At least it shows that the plugin is loaded :slightly_smiling_face:
Strangely, there is only one message from the plugin, that shows, that it receives Websock-messages from Volumio:
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
But there should normally be much more. So it might be, that your cable is not correctly connected.

Unfortunately, your log is missing the plugin start-up part.
Did you disable the plugin before starting the live-log, as I suggested in the instructions for debugging? Please switch off the plugin, start the live-log, and only then switch on the plugin - that allows me to see, if the plugin starts up as expected and where something goes wrong.
Here is an example of my system (I deleted some lines that are not relevant and added some descriptions). I need that info, including the lengthy parts that I deleted below.
Please be so kind to put your log into a text file (use notepad on Windows or TextEdit on Mac) and attach it to your post using the upload button, because the thread gets cluttered with log-code if everybody posts their 200 line logs into the text. Also, if you need to post log or source code, please use “```” before and after the text, it will then be rendered as source code and easier to read.

Starting Live Log...
[...]
info: Enabling plugin serialampcontroller
info: Loading plugin "serialampcontroller"...
info: Applying required configuration parameters for plugin serialampcontroller
info: Applying required configuration parameters for plugin serialampcontroller
info: PLUGIN START: serialampcontroller
info: [SERIALAMPCONTROLLER] loadI18nStrings: /data/plugins/system_hardware/serialampcontroller/i18n/strings_de.json
info: [SERIALAMPCONTROLLER] loadI18nStrings: loaded: {"[...list of language strings...]"}
info: [SERIALAMPCONTROLLER] loadAmpDefinitions: loaded AmpDefinitions: {[...content of amp definition file...]},"filePath":"/data/configuration/system_hardware/serialampcontroller/ampCommands.json"}
info: [SERIALAMPCONTROLLER] loadAmpDefinitions: loaded AmpDefinitions for 5 Amplifiers.

info: CoreCommandRouter::volumioGetState
info: [SERIALAMPCONTROLLER] on.pushState: undefined - pause
info: [SERIALAMPCONTROLLER] listSerialDevices: [{"path":"/dev/ttyAMA0"},{"manufacturer":"Prolific Technology Inc. ","pnpId":"usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0","vendorId":"067b","productId":"2303","path":"/dev/ttyUSB0"}]
info: [SERIALAMPCONTROLLER] listSerialDevices: found 1 devices.[{"[...list of devices found on your system..."}]
info: [SERIALAMPCONTROLLER] setActiveAmp: {...settings of active amp...}
info: [SERIALAMPCONTROLLER] setActiveAmp: can send these responses: [...]
info: [SERIALAMPCONTROLLER] openSerialPort: connect to /dev/ttyUSB0 configured with: {"autoOpen":false,"lock":true,"baudRate":115200,"dataBits":8,"stopBits":1,"parity":"none","rtscts":false,"xon":false,"xoff":false,"xany":false}
info: [SERIALAMPCONTROLLER] openSerialPort: Connection established.
error: [SERIALAMPCONTROLLER] openSerialPort: Now trying to open port
info: [SERIALAMPCONTROLLER] alsavolume: Set volume "25"
info: [SERIALAMPCONTROLLER] alsavolume: either Serial Interface, listener or Ampconfig missing
info: [SERIALAMPCONTROLLER] updateVolumeSettings: Amp, serial Interface not yet set or listener not yet active.
info: [SERIALAMPCONTROLLER] onStart: successfully started plugin
info: Done.
info: [SERIALAMPCONTROLLER] openSerialPort: Port is now open. Connecting Parser with delimiter: $
info: [SERIALAMPCONTROLLER] getAmpStatus: sending status requests to Amp
info: [SERIALAMPCONTROLLER] sendStatusRequest: Sent command for "reqModel": model?
info: [SERIALAMPCONTROLLER] sendStatusRequest: Sent command for "reqPower": power?
info: [SERIALAMPCONTROLLER] sendStatusRequest: Sent command for "reqVolume": volume?
info: [SERIALAMPCONTROLLER] sendStatusRequest: Sent command for "reqMute": mute?
info: [SERIALAMPCONTROLLER] sendStatusRequest: Sent command for "reqSource": source?
info: [SERIALAMPCONTROLLER] openSerialPort: Listener received: model=a12
info: [SERIALAMPCONTROLLER] openSerialPort: no matching regex for: model=a12
info: [SERIALAMPCONTROLLER] openSerialPort: Listener received: power=on
info: [SERIALAMPCONTROLLER] openSerialPort: call processResponse with: respPowerOn
info: [SERIALAMPCONTROLLER] processResponse: Amp signaled PowerOn
info: [SERIALAMPCONTROLLER] alsavolume: Set volume "25"
info: [SERIALAMPCONTROLLER] alsavolume: set volume to integer value.
info: [SERIALAMPCONTROLLER] sendCommand: send volValue,25
info: [SERIALAMPCONTROLLER] sendCommand: now sending cmdString: vol_25!
info: [SERIALAMPCONTROLLER] processResponse: Amp Status is now {"volume":25,"mute":false,"power":"on"}
info: [SERIALAMPCONTROLLER] sendCommand: sent cmdString: vol_25!
info: [SERIALAMPCONTROLLER] openSerialPort: Listener received: volume=25
info: [SERIALAMPCONTROLLER] openSerialPort: call processResponse with: respVolume
info: [SERIALAMPCONTROLLER] processResponse: Amp signaled volume is 25
info: [SERIALAMPCONTROLLER] getVolumeObject: {"vol":25,"mute":false,"disableVolumeControl":false}
i```

Ok, done it again, hope this time will tell you smth more.
I’ve also cleaned the contacts on the rs232 cable, but if you feel it is not good I can buy a new one.

Here’s the log
serial amp log.txt (15.2 KB)

Thanks, much better.
The plugin seems to start up fine, but there seems to be an issue with the connection.
In line 48 it says:
pl2303 ttyUSB0: pl2303_get_line_request - failed: -32

I think this indicates, that there is something wrong with the connection to the serial adapter.
The plugin opens the serial port on line 49, and sends some basic status requests on lines 51 to 55:

info: [SERIALAMPCONTROLLER] sendStatusRequest: Sent command for "reqModel": get_product_type!
info: [SERIALAMPCONTROLLER] sendStatusRequest: Sent command for "reqPower": get_current_power!
info: [SERIALAMPCONTROLLER] sendStatusRequest: Sent command for "reqVolume": get_volume!
info: [SERIALAMPCONTROLLER] sendStatusRequest: Sent command for "reqMute": get_mute_status!
info: [SERIALAMPCONTROLLER] sendStatusRequest: Sent command for "reqSource": get_current_source!

But an answer from the amp is never received. It actually looks, like the adapter is recognized by Linux/Volumio because you can see model on line 36:
info: [SERIALAMPCONTROLLER] listSerialDevices: [{"path":"/dev/ttyAMA0"},{"manufacturer":"Prolific Technology Inc.","pnpId":"usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0","vendorId":"067b","productId":"2303","path":"/dev/ttyUSB0"}]

But there is no trace of any communication between the RPi and the interface - all commands sent seem to receive no response.
First thing would thus be, to figure out, why the interface is not working. One thing you can try is to switch off the plugin and just unplug the USB connector of the Serial interface from the Pi and then reconnect it and restart the plugin. Could be, that after this “reset” the communication already works.

If it doesn’t, we need to find out, why.
You need to ssh into your RPi for that. On a Mac ssh is included in the operating system and can be called from the Terminal. On Windows you may need to install an ssh-client (e.g. Putty).
Instructions can be found here.

Once you are connected via SSH do the following:

  1. Switch ‘off’ the plugin from the Volumio front-end in the browser
  2. Unplug and replug the interface from the RPi (just to be sure)
  3. Change to ssh-client
  4. At the command line prompt of Volumio issue: cat /dev/ttyUSB0
  5. If you now perform any actions on the front-panel of the Amp or with the remote control, you should see the status from the amp echoed at the prompt in SSH, e.g. volume=12!volume=13!volume=14!

If you do not see anything, something is wrong with the serial adapter. Can give you some further hints, once you made it up to here.

Searching for the error message
pl2303_get_line_request - failed: -32
produces some pages reporting issues with certain low-budget adapters. I am not 100% sure, if this is the source of your problem, but it could be. Some info can be found e.g. on this page.

Once you can connect to your RPi via SSH, you can try to issue the command lsusb -v.
For my adapter it returns:

Bus 001 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x067b Prolific Technology, Inc.
  idProduct          0x2303 PL2303 Serial Port
  bcdDevice            4.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0027
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0

I’ve tried your tests, both failed, Looking at the page you linked me I can recognize mine in the second page, seems really crappy. I’ll buy a new one and report to you asap.
I’ve also tried to use USB class 1.0 instead of 2.0 on my amp, but didn’t see any chage…

I was wondering, I connect my RBp 3 via USB to the Amp, is there a way to send commands through usb instead of serial?

No, unfortunately not. You can use the USB to digitally transfer the music to the Amp and the Amps DAC will convert it to analog audio. But the remote operation is only controllable via RS232.
Btw: do you experience sound issues via USB? With my RPi 3 I did not get USB Audio to work without pop-noise. But I read that this is better with RPi 4. I am using a HifiBerry Digi with the RPi now.