August 2024 update: you might like or prefer this HomeAssistant integration by binarylogic https://github.com/binarylogic/trinnov-altitude-homeassistant
Send HTTP calls to control your Trinnov processor (tested with JBL Synthesis SDP-75)
This is a simple Python server application designed to run in a home automation system.
- 🟢 Reverse engineering Trinnov's websocket from the amplifier's internal webpage (why the leading byte arrays and the 15 trailing zeroes in the volume variable ?)
- 🟢 First iteration (volume up/down/dim/undim)
- 🟢 Add a "set volume" call
- 🟢 Get variables (IP, port) from env (Docker, Kubernetes)
- 🟢 Add sources switch
- 🔴 Get volume from the amp at startup, and update it from time to time
- 🟠 Cleaner code, refactoring
The app provides a web server with endpoints to control the volume and source of an amplifier via its WebSocket messages.
Since most home automation systems work best with HTTP calls, there it is.
It is still a WIP as I'm building a new home theater (and the home around it) that should be ready in 2025. I hope this project will be fully useable and integrated by then.
-
Volume Control Endpoints:
/volume/plus
orup
: Increase the volume/volume/minus
ordown
: Decrease the volume/volume/mute
: Mute/volume/unmute
: Unmute/volume/togglemute
: Toggle mute/volume/dim
: Dim the volume/volume/undim
: Undim the volume/volume/toggledim
: Toggles the dim feature
-
Source Control Endpoints:
/source/0
: Switch to HDMI1./source/1
: Switch to HDMI2.- ........
/source/29
: Switch to ANALOG SE4 IN./source/hdmi4
: Switch to ROON.
When any of the endpoints are called, a message is sent to the amplifier via a WebSocket connection.
TRINNOV_AMPLIFIER_IP
: The IP address of the amplifier (default is mine,192.168.1.91
)TRINNOV_REMOTE_PORT
: port on which you want this Python app to listen to (default5555
)
Ensure you have at least Python / PIP installed, docker if you wish to run this as a container (mine is running in a Kubernetes cluster)
-
Build the Docker image:
docker build -t your-dockerhub-username/trinnov-remote:latest .
-
Push the Docker image to Docker Hub:
docker push your-dockerhub-username/trinnov-remote:latest
- Apply the Kubernetes deployment:
kubectl apply -f deployment.yaml
-
Install the required Python packages:
pip install Flask websockets
-
Run the application:
python app.py
GET /volume/plus
: Increase the volume.GET /volume/minus
: Decrease the volume.GET /volume/mute
: Mute the volume.GET /volume/dim
: Dim the volume.GET /volume/undim
: Undim the volume.
GET /source/hdmi1
: Switch to HDMI1.GET /source/hdmi2
: Switch to HDMI2.GET /source/hdmi3
: Switch to HDMI3.GET /source/hdmi4
: Switch to HDMI4.
To increase the volume:
curl http://your-server-ip:5555/volume/plus
To dim the volume, have a conversation with the intruder then go back to your movie:
curl http://your-server-ip:5555/volume/toggledim
...
curl http://your-server-ip:5555/volume/toggledim
To change the source to HDMI1:
curl http://your-server-ip:5555/source/0
Volume is set to -60 when the app starts. The app being the "source of truth" in my system. Feel free to modify the code to suit your needs.
(this will change in a future update, I want to get the amp's config at startup and update it periodically)
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.