Latest API documents and UART protocols

Hi,

This is a fantastic product. Amazing features and value for money.

I am writing some custom code to control these devices with a Crestron system. I am using the BETA firmware so wondering if there is a any changes in the API document?

Also, I would like to be able to use the UART connections for serial control but I cannot see any documents for the protocols/API. Can you please post that information?

I also have been able to connect to TCP/IP port 8899 which I think is the same as the UART connection as I can get track info from Spotify and player status changes without having to open the connection each time and ask for status. The connection stays open all the time which is great. Can you please post the API docs for communications on port 8899.

Many thanks,

Where you able to find any documentation for the UART, I’m curious if that would work for my project too?

Thanks,
Neil…

Please check the following for the UART messages:

{param} this is a field for a param, you should replace it with a specified text in actual message to send
[ ] optional
NA not available
message normally query current state when execute with no param, and normally set the value when continued with param
execution UART (some model) message need to be terminated with ;
uart passthrough tool message need to be sent in this format: MCU+PAS+RAKOIT:{message}&
ACPWorkbench send via Tag button without response. And need to close the window for each execution
message api response param description
VER 3 VER:{firmware}-{commit}-{api} {firmware} firmware version
{commit} git commit when building
{api} api version
get firmware version information
STA 3 MCU+PAS+STA:{source},{mute},
{volume},{treble},{bass},{net},
{internet},{playing},{led},
{upgrading}
{source} NET/USB/USBDAC/LINE-IN/
LINE-IN2/BT/OPT/COAX/I2S/HDMI
{mute} 0/1
{volume} 0~100
{treble} -10~10
{bass} -10~10
{net} 0/1
{internet} 0/1
{playing} 0/1
{led} 0/1
{upgrading} 0/1
get system running state
SYS:{cmd} 3 NA {cmd} REBOOT/STANDBY/RESET/RECOVER system control, reboot device, enter standby, factory reset, recover all data
WWW 3 WWW:{onoff} {onoff} 0/1 get internet state
AUD[:{onoff}] 3 AUD:{onoff} {onoff} 0/1 get/set audio output
SRC[:{source}] 3 SRC:{source} {source} NET/USB/USBDAC/LINE-IN/
LINE-IN2/BT/OPT/COAX/I2S/HDMI
get/set current input source
VOL[:{volume}] 3 VOL:{volume} {volume} 0 ~ 100 get/set volume
MUT[:{onoff}] 3 MUT:{onoff} {onoff} 0/1/T, off/on/toggle get/set mute
BAS[:{bass}] 3 BAS:{bass} {bass} -10 ~ 10 get/set BASS value
TRE[:{treble}] 3 TRE:{treble} {treble} -10 ~ 10 get/set TREBLE value
POP 3 NA only available in BT/NET/USB mode (*1) play or pause
STP 3 NA only available in NET/USB mode stop
NXT 3 NA only available in BT/NET/USB mode (*1) next
PRE 3 NA only available in BT/NET/USB mode (*1) previous
BTC[:{onoff}] 3 BTC:{onoff} {onoff} 0/1 get current bt connection state, or reconnect/disconnect current device.
only available in BT mode and device with no external bt module.
Control will have no return
PLA 3 PLA:{playing} {playing} 0/1, wifi playing status get current network playback state
CHN 3 CHN:{channel} {channel} L/R/S get current channel state
MRM 3 MRM:{mode} {mode} S/M/N, slave/master/none get current multiroom state
LED[:{onoff}] 3 LED:{onoff} {onoff} 0/1/T, off/on/toggle get/set LED state
BEP[:{beep}] 3 BEP:{beep} {beep} 0/1, off/on get/set beep key sound, enabled or disabled.
PST:{preset} 3 NA {preset} 0 ~ 10 get/set PRESET value
VBS[:{onoff}] 3 VBS:{onoff} {onoff} 0/1/T, off/on/toggle get/set virtual bass
WRS 3 NA wifi reset
LPM[:{loopmode}] 3 LPM:{loopmode} {loopmode} REPEATALL/REPEATONE/
REPEATSHUFFLE/SHUFFLE/SEQUENCE
set/get loopmode for network playback
NAM[:{name}] 3 NAM:{name} {name} hexed string with UTF8 encoding
eg: 536F756E6453797374656D5F39383235 = SoundSystem_9825
set/get current device name. Remains after factory reset
ETH 3 ETH:{onoff} {onoff} 0/1 get ethernet state
WIF 3 WIF:{onoff} {onoff} 0/1 get wifi state
PMT[:{onoff}] 4 PMT:{onoff} {onoff} 0/1 set/get current prompt voice state, enabled or disabled. Remains after factory reset
PRG[:{onoff}] 4 PRG:{onoff} {onoff} 0/1 set/get pregain before tone, enabled or disabled
DLY[:{mute_delay}] 4 DLY:{mute_delay} {mute_delay} 1~60 set/get delay time before system output control, default 30
MXV[:{max_vol}] 4 MXV:{max_vol} {max_volume} 30~100 set/get system max volume. Remains after factory reset
ASW[:{auto_swith}] 4 ASW:{auto_switch} {auto_switch} 0/1 enable/disable the auto switch to previous source after playback stopped (network)
POM[:{source}] 4 POM:{source} {source} system source set the input mode when power on, NONE for keeping last source.
ZON:{zone}:{msg} 4 related to {msg} sent {zone} zone index, or use ALL to all zones
{msg} detailed API message
send API message to specified zone, and will reply with the response message
only available on model M400, zone index can be set by 7 PINs on right side
2 Likes

Thanks, this is just what I was looking for!
I’ve not been able to find the Baud settings, I’ve been trying common different combinations but not been able to connect yet.
Anyone have them to hand?

it’s 115200,8,N,1, no flow control.

Thanks, it was flow control I had wrong.

I’m part way there, as I see all the Amp settings displayed in my session (Minicom/screen) as the Amp powers up and transmits is’t initial settings, however, I’m not able to transmit anything back to the amp.
I assume I should see the keystrokes echo back in my connection session as I type them? (I currently don’t)
I see the transmit LED on the FTDI blink as I press keystrokes, but nothing on the screen or a response from the amp.
I’ll try some additional troubleshooting, to confirm my setup and comment back here.
I’m hoping my learnings here will be useful to someone in the future

The UART is used as an API, not a shell, so no echo feedback. And for each command, it is supposed to end with ; for example, to set volume to 50, you need to send VOL:50;

Thanks @zpl1025 I have it working now!
I must have got the syntax wrong like included a space when I tried the commands in the past, but with no response I thought I’d wired it wrong.
Either way, this gives me just what I was looking for and hopefully with a Raspberry Pico and two multiplexers I’ll be able to control 3 Amps via 1 UART.

I recently bought the amp 2.1 module. Is it also possible to connect to the serial interface?

as no free IOs for board AMP2.1, so no UART on this board, sorry.

Ok, is there an other way to change the bluetooth device-name?
I also have bought the ACPWorkbench.

The bluetooth device name will follow the name you set on APP, it will take effect when next boot