Rotel Amplifier integration via MQTT

I wrote an integration between an A12 Rotel Amplifier (which communicates over an RS232 port) and Home Assistant through MQTT, here:

The integration requires a daemon to bridge between RS232 and MQTT, which can be run as follows, assuming the MQTT broker and RS232 ports are set correctly:

docker run --rm --name rotel --device=/dev/ttyUSB1 \
  ghcr.io/djthorpe/rotel-linux-aarch64:1.0.7 \
  rotel -mqtt localhost:1883 -tty /dev/ttyUSB1

You can then create a card that looks like this:

image

If that’s of any interest, happy for any pull requests or issues.

1 Like

This is amazing. Been looking to integrate my A12 into my HA set up for a long time with no luck. I’ll grab a serial-to-USB soon and give it a try!

did you succeed ? I don’ t know how to make the container container ?

I have generated a Docker token, and installed Go on the RPi.
When I try to build the repo, I get “unauthorized: unauthenticated: User cannot be authenticated with the token provided”

What should i be looking to change in the makefile so that the token is correct?

Problem solved in Git Issues.

Wouldn’t it be simpler to send commands to TCP/IP port 9590? It works on my 1572 amplifier.

PoC:

import socket
import sys

if __name__ == '__main__':
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    server_address = ('ROTEL', 9590)
    sock.connect(server_address)

    sock.sendall(bytes(sys.argv[1],'UTF-8'))

    sock.close()

python rotel.py power_on!

UPDATE:
k4Mr3/Rotel-RA-1572: Home Assistant custom component