Control your amplifier using Android TV remote using HDMI CEC
2.0K
Allows controlling volume of your legacy amplifier with TV's physical or soft remote (Android TV and during casting).
Audio is taken from TV using typical optical or coax link and sent to amplifier, while control commands are read from HDMI CEC. On my Philips TV, if TV's builtin speakers are disabled there are no keypress commands sent over HDMI-CEC. This container image solves this by imitating HDMI sound system (a soundbar), that connects to TV using single HDMI cable. TV has to be configured to use a HDMI sound system and Raspberry PI must be connected to HDMI port supporting HDMI ARC.
Toslink audio output typically remains active whatever the configuration on TV allowing amplifier to function, while Raspberry Pi reads control signals and remote keypresses from HDMI cable using CEC protocol.
This runs as docker container on Raspberry Pi and uses a patched libcec to support ARC signalling protocol.
Requires --privileged and --device /dev/mem:/dev/mem option to be able to work HDMI hardware.
docker run -d --privileged \
--name mqtt-audio-controller \
--device /dev/mem:/dev/mem \
-e MQTT_BROKER="192.168.0.2" \
-e MQTT_PORT="1883" \
-e MQTT_PREFIX="media" \
-e MQTT_USER="cec-mqtt" \
-e MQTT_PASSWORD="strongpass" \
-e CEC_ENABLED="1" \
-e CEC_PORT="RPI" \
-e CEC_DEVICES="0,8" \
ingemars/mqtt-audio-controller > /dev/null
The bridge publishes to the following topics:
| topic | body | remark |
|---|---|---|
prefix/cec/id | on / off | Report power status of device with id id, where id 0 is TV. |
prefix/cec/volumeup | on | Notify that volume UP was pressed. |
prefix/cec/volumedown | on | Notify that volume DOWN was pressed. |
prefix/cec/volumemute | on | Notify that MUTE was pressed. |
id is the address (0-15) of the device on the CEC-bus.
Content type
Image
Digest
Size
85.1 MB
Last updated
over 5 years ago
docker pull ingemars/mqtt-audio-controller